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)
droptable if exists t1, t2, t3;
createtablet1 (a tinyint, b int) partition by range (a + b) (
partition p0 values less than (10)
);
createtablet2 (a tinyint, b int) partition by hash(a + b) partitions 5;
createtablet3 (a char, b char) partition by range columns (a) (
partition p0 values less than ('z')
);
altertable t3 change a c char;
2. What did you expect to see? (Required)
change column report error
mysql> alter table t3 change a c char;
ERROR 3855 (HY000): Column 'a' has a partitioning function dependency and cannot be dropped or renamed.
3. What did you see instead (Required)
mysql> alter table t3 change a c char;
ERROR 1105 (HY000): runtime error: invalid memory address or nil pointer dereference
[2022/11/07 15:07:59.234 +08:00] [ERROR] [conn.go:1058] ["connection running loop panic"] [conn=2199023256021] [lastSQL="alter table t3 change a c char"] [err="runtime error: invalid memory address or nil pointer dereference"] [stack="github.com/pingcap/tidb/server.(*clientConn).Run.func1\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1061\nruntime.gopanic\n\t/usr/local/go1.19.1/src/runtime/panic.go:884\ngithub.com/pingcap/tidb/executor.(*ExecStmt).Exec.func1\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/executor/adapter.go:438\nruntime.gopanic\n\t/usr/local/go1.19.1/src/runtime/panic.go:884\nruntime.panicmem\n\t/usr/local/go1.19.1/src/runtime/panic.go:260\nruntime.sigpanic\n\t/usr/local/go1.19.1/src/runtime/signal_unix.go:835\ngithub.com/pingcap/tidb/ddl.collectColumnsType\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/ddl/partition.go:1142\ngithub.com/pingcap/tidb/ddl.buildRangePartitionDefinitions\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/ddl/partition.go:1154\ngithub.com/pingcap/tidb/ddl.buildPartitionDefinitionsInfo\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/ddl/partition.go:1026\ngithub.com/pingcap/tidb/ddl.GetModifiableColumnJob\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/ddl/ddl_api.go:4689\ngithub.com/pingcap/tidb/ddl.(*ddl).getModifiableColumnJob\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/ddl/ddl_api.go:4495\ngithub.com/pingcap/tidb/ddl.(*ddl).ChangeColumn\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/ddl/ddl_api.go:4934\ngithub.com/pingcap/tidb/ddl.(*ddl).AlterTable\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/ddl/ddl_api.go:3312\ngithub.com/pingcap/tidb/executor.(*DDLExec).executeAlterTable\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/executor/ddl.go:377\ngithub.com/pingcap/tidb/executor.(*DDLExec).Next\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/executor/ddl.go:147\ngithub.com/pingcap/tidb/executor.Next\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/executor/executor.go:325\ngithub.com/pingcap/tidb/executor.(*ExecStmt).next\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/executor/adapter.go:1118\ngithub.com/pingcap/tidb/executor.(*ExecStmt).handleNoDelayExecutor\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/executor/adapter.go:891\ngithub.com/pingcap/tidb/executor.(*ExecStmt).handleNoDelay\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/executor/adapter.go:739\ngithub.com/pingcap/tidb/executor.(*ExecStmt).Exec\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/executor/adapter.go:544\ngithub.com/pingcap/tidb/session.runStmt\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:2333\ngithub.com/pingcap/tidb/session.(*session).ExecuteStmt\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:2197\ngithub.com/pingcap/tidb/server.(*TiDBContext).ExecuteStmt\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/driver_tidb.go:233\ngithub.com/pingcap/tidb/server.(*clientConn).handleStmt\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:2065\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1920\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1374\ngithub.com/pingcap/tidb/server.(*clientConn).Run\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1123\ngithub.com/pingcap/tidb/server.(*Server).onConn\n\t/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/server.go:625"]
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
change column report error
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: