From 23e1ef384c763343268b2d35899fcac3c8172c4e Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Sun, 1 Mar 2026 06:04:07 -0500 Subject: [PATCH] mysql: fix channels allocation --- irc/mysql/history.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irc/mysql/history.go b/irc/mysql/history.go index 2a069d38..bd21cf5b 100644 --- a/irc/mysql/history.go +++ b/irc/mysql/history.go @@ -1015,7 +1015,7 @@ func (mysql *MySQL) ListChannels(cfchannels []string) (results []history.TargetL defer cancel() var queryBuf strings.Builder - args := make([]interface{}, 0, len(results)) + args := make([]interface{}, 0, len(cfchannels)) // https://dev.mysql.com/doc/refman/8.0/en/group-by-optimization.html // this should be a "loose index scan" queryBuf.WriteString(`SELECT sequence.target, MAX(sequence.nanotime) FROM sequence