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)
Reproduced on pd/tikv/tidb (3/3/3) cluster
> drop table if exists t;
> create table t (a int) shard_row_id_bits = 5;
> alter table t auto_increment = 72057594037927936;
> insert into t set a=1;
> alter table t shard_row_id_bits = 10;
Error 1467: shard_row_id_bits 10 will cause next global auto ID 72057594039457405 overflow"
-- The error information should show 72057594037927936
mysql root@172.16.4.61:test> create table t1 (a int auto_increment primary key);
Query OK, 0 rows affected
Time: 0.563s
mysql root@172.16.4.61:test> insert into t1 values()
Query OK, 1 row affected
Time: 0.060s
mysql root@172.16.4.61:test> alter table t1 auto_increment = 10000
You're about to run a destructive command.
Do you want to proceed? (y/n): y
Your call!
Query OK, 0 rows affected
Time: 1.059s
mysql root@172.16.4.61:test> insert into t1 values()
Query OK, 1 row affected
Time: 0.057s
mysql root@172.16.4.61:test> select * from t1
+-------+
| a |
+-------+
| 1 |
| 93497 |
+-------+
2 rows in set
Time: 0.063s
2. What did you expect to see? (Required)
> alter table t shard_row_id_bits = 10;
Error 1467: shard_row_id_bits 10 will cause next global auto ID 72057594039457405 overflow"
> select * from t1;
+-------+
| a |
+-------+
| 1 |
| 10000 |
+-------+
3. What did you see instead (Required)
> alter table t shard_row_id_bits = 10;
Error 1467: shard_row_id_bits 10 will cause next global auto ID 72057594037927936 overflow"
> select * from t1;
+-------+
| a |
+-------+
| 1 |
| 93497 |
+-------+
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Reproduced on pd/tikv/tidb (3/3/3) cluster
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. Affected version (Required)
5. Root Cause Analysis
The text was updated successfully, but these errors were encountered: