You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
upgrade from 4.0.16 to v5.3.0
MySQL [randgen]> SELECT DISTINCT SUM( INSTR( col_double_undef_unsigned, col_char(20)_key_signed ) ) AS field1 FROM lt WHERE IF( 'm', "but", ('2013-07-27' LIKE col_char(20)_undef_signed )) GROUP BY NULLIF( col_double_undef_unsigned, col_float_key_signed ) ORDER BY CAST( "think" AS UNSIGNED ) LIMIT 68;
ERROR 1105 (HY000): runtime error: invalid memory address or nil pointer dereference
MySQL [randgen]> exit
Min Reproduce Step
SELECT DISTINCT INSTR( col_double_undef_unsigned, col_char(20)_key_signed) FROM table_90_latin1_4 ;
tiup start v5.3.0 (with new collation opened)
create table
load data local infile '/home/arenatlx/download/data.txt' into table table_90_latin1_4;
SELECT DISTINCT SUM... // two error log, and a panic
mainly caused by the function clone (missed the repertoire which leading the error in deriveCollation when getFunction)
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
upgrade from 4.0.16 to v5.3.0
MySQL [randgen]> SELECT DISTINCT SUM( INSTR(
col_double_undef_unsigned
,col_char(20)_key_signed
) ) AS field1 FROM lt WHERE IF( 'm', "but", ('2013-07-27' LIKEcol_char(20)_undef_signed
)) GROUP BY NULLIF(col_double_undef_unsigned
,col_float_key_signed
) ORDER BY CAST( "think" AS UNSIGNED ) LIMIT 68;ERROR 1105 (HY000): runtime error: invalid memory address or nil pointer dereference
MySQL [randgen]> exit
Min Reproduce Step
SELECT DISTINCT INSTR(
col_double_undef_unsigned
,col_char(20)_key_signed
) FROM table_90_latin1_4 ;show_create_table.txt
data.txt
2. What did you expect to see? (Required)
[conn.go:986] ["connection running loop panic"] [conn=63] [lastSQL="SELECT DISTINCT SUM( INSTR( `col_double_undef_unsigned`, `col_char(20)_key_signed` ) ) AS field1 FROM table_90_latin1_4 WHERE IF( 'm', \"but\", ( '2013-07-27' LIKE `col_char(20)_undef_signed` ) ) GROUP BY NULLIF( `col_double_undef_unsigned`, `col_float_key_signed` ) ORDER BY CAST( \"think\" AS UNSIGNED ) LIMIT 68"] [err="runtime error: invalid memory address or nil pointer dereference"] [stack="goroutine 141478 [running]:\ngithub.com/pingcap/tidb/server.(*clientConn).Run.func1(0x42b4970, 0xc003608c60, 0xc0034cc000)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:984 +0xf5\npanic(0x3905020, 0x5a1b440)\n\t/usr/local/go/src/runtime/panic.go:965 +0x1b9\ngithub.com/pingcap/tidb/planner/core.(*basePhysicalAgg).ResolveIndices(0xc00780cee0, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:392 +0x247\ngithub.com/pingcap/tidb/planner/core.(*basePhysicalPlan).ResolveIndices(0xc005cf9688, 0xc007b9def8, 0x128e3bb)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:651 +0x63\ngithub.com/pingcap/tidb/planner/core.(*physicalSchemaProducer).ResolveIndices(0xc005cf9680, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:640 +0x31\ngithub.com/pingcap/tidb/planner/core.(*basePhysicalPlan).ResolveIndices(0xc00780ce08, 0xc0075d0900, 0x100000000000000)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:651 +0x63\ngithub.com/pingcap/tidb/planner/core.(*physicalSchemaProducer).ResolveIndices(...)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:640\ngithub.com/pingcap/tidb/planner/core.(*basePhysicalAgg).ResolveIndices(0xc00780ce00, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:386 +0x46\ngithub.com/pingcap/tidb/planner/core.(*basePhysicalPlan).ResolveIndices(0xc00780cd28, 0xc007ba1350, 0xc003270ac0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:651 +0x63\ngithub.com/pingcap/tidb/planner/core.(*physicalSchemaProducer).ResolveIndices(...)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:640\ngithub.com/pingcap/tidb/planner/core.(*basePhysicalAgg).ResolveIndices(0xc00780cd20, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:386 +0x46\ngithub.com/pingcap/tidb/planner/core.(*basePhysicalPlan).ResolveIndices(0xc00200bb88, 0xc003684a40, 0xc007cd11c8)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:651 +0x63\ngithub.com/pingcap/tidb/planner/core.(*physicalSchemaProducer).ResolveIndices(0xc00200bb80, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/resolve_indices.go:640 +0x31\ngithub.com/pingcap/tidb/planner/core.physicalOptimize(0x42fa9b8, 0xc00780cc40, 0xc004d279e8, 0x42fa9b8, 0xc00780cb60, 0x42fa9b8, 0xc00780cc40, 0x0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/optimizer.go:383 +0x243\ngithub.com/pingcap/tidb/planner/core.DoOptimize(0x42b4970, 0xc006558a50, 0x42fed38, 0xc005da7c00, 0x5dea, 0x42fa9b8, 0xc00780cc40, 0x0, 0x0, 0x0, ...)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/optimizer.go:235 +0x185\ngithub.com/pingcap/tidb/planner.optimize(0x42b4970, 0xc006558a50, 0x42fed38, 0xc005da7c00, 0x42cd6e8, 0xc0053453b0, 0x42f3eb8, 0xc006028700, 0x0, 0x0, ...)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/optimize.go:389 +0x6eb\ngithub.com/pingcap/tidb/planner.Optimize(0x42b4970, 0xc006558a50, 0x42fed38, 0xc005da7c00, 0x42cd6e8, 0xc0053453b0, 0x42f3eb8, 0xc006028700, 0x0, 0x0, ...)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/optimize.go:220 +0x1334\ngithub.com/pingcap/tidb/ex"]
no panic
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
v5.3.0
The text was updated successfully, but these errors were encountered: