Closed aclstack closed 5 years ago
[root@XXXX~]# cat 3.sql |soar panic: runtime error: index out of range
goroutine 1 [running]: github.com/XiaoMi/soar/vendor/github.com/ziutek/mymysql/mysql.Row.Str(0xc4203e0180, 0xc, 0xc, 0xffffffffffffffff, 0x0, 0x0) src/github.com/XiaoMi/soar/vendor/github.com/ziutek/mymysql/mysql/row.go:39 +0x1ac github.com/XiaoMi/soar/database.(Connector).ShowIndex(0xc4202c47d0, 0xc4202b83a0, 0xb, 0xb, 0x11b8d40, 0x1) src/github.com/XiaoMi/soar/database/show.go:242 +0x8f0 github.com/XiaoMi/soar/advisor.(IndexAdvisor).calcCardinality(0xc420148300, 0xc420030870, 0x2, 0x2, 0x0, 0xc4202c6d20, 0x11b7d38) src/github.com/XiaoMi/soar/advisor/index.go:902 +0x6bb github.com/XiaoMi/soar/advisor.(*IndexAdvisor).IndexAdvise(0xc420148300, 0xc4202ac680, 0x12, 0xc4202b8598) src/github.com/XiaoMi/soar/advisor/index.go:223 +0x1543 main.main() src/github.com/XiaoMi/soar/cmd/soar/soar.go:237 +0x31c6
mysql 5.1 show index from db.tb doesn't have column Index_Comment raise this panic.
show index from db.tb
Index_Comment
[root@XXXX~]# cat 3.sql |soar panic: runtime error: index out of range
goroutine 1 [running]: github.com/XiaoMi/soar/vendor/github.com/ziutek/mymysql/mysql.Row.Str(0xc4203e0180, 0xc, 0xc, 0xffffffffffffffff, 0x0, 0x0) src/github.com/XiaoMi/soar/vendor/github.com/ziutek/mymysql/mysql/row.go:39 +0x1ac github.com/XiaoMi/soar/database.(Connector).ShowIndex(0xc4202c47d0, 0xc4202b83a0, 0xb, 0xb, 0x11b8d40, 0x1) src/github.com/XiaoMi/soar/database/show.go:242 +0x8f0 github.com/XiaoMi/soar/advisor.(IndexAdvisor).calcCardinality(0xc420148300, 0xc420030870, 0x2, 0x2, 0x0, 0xc4202c6d20, 0x11b7d38) src/github.com/XiaoMi/soar/advisor/index.go:902 +0x6bb github.com/XiaoMi/soar/advisor.(*IndexAdvisor).IndexAdvise(0xc420148300, 0xc4202ac680, 0x12, 0xc4202b8598) src/github.com/XiaoMi/soar/advisor/index.go:223 +0x1543 main.main() src/github.com/XiaoMi/soar/cmd/soar/soar.go:237 +0x31c6