1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

bug #14573 (Error on adding auto_increment on to a column with '0' values)

This commit is contained in:
holyfoot@deer.(none)
2006-05-12 18:02:42 +05:00
parent e672bdc824
commit 034508f6ca
6 changed files with 54 additions and 12 deletions

View File

@@ -418,3 +418,9 @@ a val
2 1
3 1
drop table t1;
CREATE TABLE t1 (t1 INT(10) PRIMARY KEY, t2 INT(10));
INSERT INTO t1 VALUES(0, 0);
INSERT INTO t1 VALUES(1, 1);
ALTER TABLE t1 CHANGE t1 t1 INT(10) auto_increment;
ERROR 23000: ALTER TABLE causes auto_increment resequencing, causing Duplicate entry '1' for key 'PRIMARY'
DROP TABLE t1;