Closed lcwangchao closed 1 year ago
The panic stack is here
[2023/04/14 21:17:19.125 +08:00] [INFO] [conn.go:1154] ["command dispatched failed"] [conn=2199023255957] [connInfo="id:2199023255957, addr:127.0.0.1:58798 status:10, collation:utf8_general_ci, user:root"] [command=Query] [status="inTxn:0, autocommit:1"] [sql="select * from tx where aes_decrypt(s1, 'b')='' and aes_decrypt(s2, 'd')=''"] [txn_mode=PESSIMISTIC] [timestamp=440789430986604544] [err="runtime error: index out of range [1] with length 1\ngithub.com/pingcap/tidb/executor.(*recordSet).Next.func1\n\t/Users/wangchao/Code/pingcap/tidb/executor/adapter.go:146\nruntime.gopanic\n\t/Users/wangchao/.gvm/gos/go1.20.2/src/runtime/panic.go:890\nruntime.goPanicIndex\n\t/Users/wangchao/.gvm/gos/go1.20.2/src/runtime/panic.go:113\ngithub.com/pingcap/tidb/util/chunk.(*Column).GetBytes\n\t/Users/wangchao/Code/pingcap/tidb/util/chunk/column.go:591\ngithub.com/pingcap/tidb/expression.(*builtinAesDecryptSig).vecEvalString\n\t/Users/wangchao/Code/pingcap/tidb/expression/builtin_encryption_vec.go:77\ngithub.com/pingcap/tidb/expression.(*ScalarFunction).VecEvalString\n\t/Users/wangchao/Code/pingcap/tidb/expression/scalar_function.go:58\ngithub.com/pingcap/tidb/expression.(*builtinEQStringSig).vecEvalInt\n\t/Users/wangchao/Code/pingcap/tidb/expression/builtin_compare_vec_generated.go:1003\ngithub.com/pingcap/tidb/expression.(*ScalarFunction).VecEvalInt\n\t/Users/wangchao/Code/pingcap/tidb/expression/scalar_function.go:48\ngithub.com/pingcap/tidb/expression.EvalExpr\n\t/Users/wangchao/Code/pingcap/tidb/expression/expression.go:574\ngithub.com/pingcap/tidb/expression.VecEvalBool\n\t/Users/wangchao/Code/pingcap/tidb/expression/expression.go:369\ngithub.com/pingcap/tidb/expression.vectorizedFilter\n\t/Users/wangchao/Code/pingcap/tidb/expression/chunk_executor.go:489\ngithub.com/pingcap/tidb/expression.VectorizedFilterConsiderNull\n\t/Users/wangchao/Code/pingcap/tidb/expression/chunk_executor.go:401\ngithub.com/pingcap/tidb/expression.VectorizedFilter\n\t/Users/wangchao/Code/pingcap/tidb/expression/chunk_executor.go:379\ngithub.com/pingcap/tidb/executor.(*SelectionExec).Next\n\t/Users/wangchao/Code/pingcap/tidb/executor/executor.go:1675\ngithub.com/pingcap/tidb/executor.Next\n\t/Users/wangchao/Code/pingcap/tidb/executor/executor.go:326\ngithub.com/pingcap/tidb/executor.(*ExecStmt).next\n\t/Users/wangchao/Code/pingcap/tidb/executor/adapter.go:1194\ngithub.com/pingcap/tidb/executor.(*recordSet).Next\n\t/Users/wangchao/Code/pingcap/tidb/executor/adapter.go:150\ngithub.com/pingcap/tidb/server.(*tidbResultSet).Next\n\t/Users/wangchao/Code/pingcap/tidb/server/driver_tidb.go:428\ngithub.com/pingcap/tidb/server.(*clientConn).writeChunks\n\t/Users/wangchao/Code/pingcap/tidb/server/conn.go:2281\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultSet\n\t/Users/wangchao/Code/pingcap/tidb/server/conn.go:2224\ngithub.com/pingcap/tidb/server.(*clientConn).handleStmt\n\t/Users/wangchao/Code/pingcap/tidb/server/conn.go:2097\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery\n\t/Users/wangchao/Code/pingcap/tidb/server/conn.go:1864\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch\n\t/Users/wangchao/Code/pingcap/tidb/server/conn.go:1342\ngithub.com/pingcap/tidb/server.(*clientConn).Run\n\t/Users/wangchao/Code/pingcap/tidb/server/conn.go:1123\ngithub.com/pingcap/tidb/server.(*Server).onConn\n\t/Users/wangchao/Code/pingcap/tidb/server/server.go:677\nruntime.goexit\n\t/Users/wangchao/.gvm/gos/go1.20.2/src/runtime/asm_arm64.s:1172"]
It panics here:
The vecEvalString
does handle the case input.NumRows() == 0
dup with #43063
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
no error
3. What did you see instead (Required)
4. What is your TiDB version? (Required)