mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 23:54:31 +02:00
bug #14573 (Error on adding auto_increment on to a column with '0' values)
mysql-test/r/auto_increment.result: test result mysql-test/t/auto_increment.test: test case sql/handler.cc: print_keydupp_error implemented sql/handler.h: handler::print_keydupp_error declared sql/share/errmsg.txt: error message added sql/sql_table.cc: now we return different error message for auto_increment case
This commit is contained in:
parent
77dedc31e9
commit
273e1e01fe
6 changed files with 54 additions and 12 deletions
|
|
@ -275,3 +275,14 @@ update t1 set a=2 where a=1;
|
|||
insert into t1 (val) values (1);
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test key duplications with auto-increment in ALTER TABLE
|
||||
# bug #14573
|
||||
#
|
||||
CREATE TABLE t1 (t1 INT(10) PRIMARY KEY, t2 INT(10));
|
||||
INSERT INTO t1 VALUES(0, 0);
|
||||
INSERT INTO t1 VALUES(1, 1);
|
||||
--error ER_DUP_ENTRY
|
||||
ALTER TABLE t1 CHANGE t1 t1 INT(10) auto_increment;
|
||||
DROP TABLE t1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue