3
0
mirror of https://github.com/ergochat/ergo.git synced 2026-03-02 05:18:12 +01:00

mysql: fix channels allocation

This commit is contained in:
Shivaram Lingamneni 2026-03-01 06:04:07 -05:00
parent 3e83f52f3a
commit 23e1ef384c

View File

@ -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