报错内容是:
[2022/12/14 17:23:21.151 +08:00] [ERROR] [analyze.go:1435] ["analyze worker panicked"] [recover="runtime error: slice bounds out of range [-1:]"] [stack="github.com/pingcap/tidb/executor.(*AnalyzeColumnsExec).subBuildWorker.func1\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/analyze.go:1435\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:838\nruntime.goPanicSliceB\n\t/usr/local/go/src/runtime/panic.go:117\ngithub.com/pingcap/tidb/statistics.BuildHistAndTopN\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/statistics/builder.go:346\ngithub.com/pingcap/tidb/executor.(*AnalyzeColumnsExec).subBuildWorker\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/analyze.go:1559\ngithub.com/pingcap/tidb/executor.(*AnalyzeColumnsExec).buildSamplingStats.func3\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/analyze.go:1136\ngithub.com/pingcap/tidb/executor.(*notifyErrorWaitGroupWrapper).Run.func1\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/analyze.go:2653"]
[2022/12/14 17:23:21.152 +08:00] [ERROR] [analyze.go:151] ["analyze failed"] [error="runtime error: slice bounds out of range [-1:]"]
[2022/12/14 17:23:21.156 +08:00] [INFO] [analyze.go:252] ["analyze table `****`.`****` has failed"] [partition=] ["job info"="auto analyze table all columns with 256 buckets, 500 topn, 1 samplerate"] ["start time"=2022/12/14 17:23:21.052 +08:00] ["end time"=2022/12/14 17:23:21.152 +08:00] [cost=99.980454ms]
[2022/12/14 17:23:21.156 +08:00] [INFO] [tidb.go:264] ["rollbackTxn called due to ddl/autocommit failure"]
[2022/12/14 17:23:21.156 +08:00] [WARN] [session.go:1949] ["run statement failed"] [schemaVersion=963] [error="runtime error: slice bounds out of range [-1:]"] [session="{\n \"currDBName\": \"\",\n \"id\": 4481862282489364483,\n \"status\": 2,\n \"strictMode\": true,\n \"user\": null\n}"]
[2022/12/14 17:23:21.156 +08:00] [ERROR] [update.go:1218] ["[stats] auto analyze failed"] [sql="analyze table `****`.`****`"] [cost_time=111.698937ms] [error="runtime error: slice bounds out of range [-1:]"]
这个表很小,select *没有问题,业务使用也没问题,但是analyze table会报错