Closed ekexium closed 3 years ago
The error stack:
[2020/12/17 16:27:55.908 +08:00] [INFO] [conn.go:809] ["command dispatched failed"] [conn=5220353665331627797] [connInfo="id:5220353665331627797, addr:127.0.0.1:63819 status:11, collation:utf8mb4_general_ci, user:root"] [command=Query] [status="inTxn:1, autocommit:1"] [sql="UPDATE t SET col_113 = CONCAT(col_113, \"-p\"), col_54 = ADDDATE(col_54, INTERVAL 1 DAY), col_0=col_0/2 WHERE col_0<-326494302 AND col_19<1291093116 AND col_103<411125082"] [txn_mode=PESSIMISTIC] [err="other error: invalid data type: invalid range,range.start should be smaller than range.end, but got [[116, 128, 0, 0, 0, 0, 0, 7, 124, 95, 114, 4, 128, 0, 0, 0, 0, 0, 0, 0],[116, 128, 0, 0, 0, 0, 0, 7, 124, 95, 114, 3, 127, 255, 255, 255, 236, 138, 23, 162]) github.com/pingcap/tidb/store/tikv.(copIteratorWorker).handleCopResponse \t/Users/pingcap/workspace/build-darwin-amd64-4.0/go/src/github.com/pingcap/tidb/store/tikv/coprocessor.go:1135 github.com/pingcap/tidb/store/tikv.(copIteratorWorker).handleTaskOnce \t/Users/pingcap/workspace/build-darwin-amd64-4.0/go/src/github.com/pingcap/tidb/store/tikv/coprocessor.go:908 github.com/pingcap/tidb/store/tikv.(copIteratorWorker).handleTask \t/Users/pingcap/workspace/build-darwin-amd64-4.0/go/src/github.com/pingcap/tidb/store/tikv/coprocessor.go:810 github.com/pingcap/tidb/store/tikv.(copIteratorWorker).run \t/Users/pingcap/workspace/build-darwin-amd64-4.0/go/src/github.com/pingcap/tidb/store/tikv/coprocessor.go:542 untime.goexit \t/usr/local/go/src/runtime/asm_amd64.s:1357"]
it's not about transaction or ddl, it's a bug caused by cluster index feature, smallest reproduce steps is:
MySQL [test]> set @@tidb_enable_clustered_index=1;
Query OK, 0 rows affected (0.000 sec)
MySQL [test]> create table t(k1 int, k2 int, primary key(k1, k2));
Query OK, 0 rows affected (0.564 sec)
MySQL [test]> select * from t where k1 < - 1;
ERROR 1105 (HY000): other error: invalid data type: invalid range,range.start should be smaller than range.end, but got [[116, 128, 0, 0, 0, 0, 0, 0, 68, 95, 114, 4, 128, 0, 0, 0, 0, 0, 0, 0],[116, 128, 0, 0, 0, 0, 0, 0, 68, 95, 114, 3, 127, 255, 255, 255, 255, 255, 255, 255])
Note: Make Sure that 'component', and 'severity' labels are added Example for how to fill out the template: https://github.com/pingcap/tidb/issues/20100
Bug Report
1. Minimal reproduce step (Required)
./amend-random -mode add-column
I used amend-random with git hash = bef496665b2632f7f96a64c41236a1407a30a469, because there's bug in the latest version.
Possibily Related log:
2. What did you expect to see? (Required)
There shouldn't be
invalid data type: invalid range,range.start should be smaller than range.end
errors.3. What did you see instead (Required)
4. What is your TiDB version? (Required)