diff options
Diffstat (limited to 'mysql-test/t/innodb.test')
-rw-r--r-- | mysql-test/t/innodb.test | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index e1e74ac8a11..6e33cf1f14c 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -53,7 +53,7 @@ INSERT INTO t1 VALUES (1,0,0),(3,1,1),(4,1,1),(8,2,2),(9,2,2),(17,3,2),(22,4,2), update t1 set parent_id=parent_id+100; select * from t1 where parent_id=102; update t1 set id=id+1000; --- error 1062,1022 +-- error ER_DUP_ENTRY_WITH_KEY_NAME,1022 update t1 set id=1024 where id=1009; select * from t1; update ignore t1 set id=id+1; # This will change all rows @@ -134,13 +134,13 @@ commit; select n, "after commit" from t1; commit; insert into t1 values (5); --- error 1062 +-- error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values (4); commit; select n, "after commit" from t1; set autocommit=1; insert into t1 values (6); --- error 1062 +-- error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values (4); select n from t1; set autocommit=0; @@ -214,7 +214,7 @@ drop table t1; CREATE TABLE t1 (id char(8) not null primary key, val int not null) engine=innodb; insert into t1 values ('pippo', 12); --- error 1062 +-- error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('pippo', 12); # Gives error delete from t1; delete from t1 where id = 'pippo'; @@ -342,9 +342,9 @@ CREATE TABLE t1 ( insert into t1 (ggid,passwd) values ('test1','xxx'); insert into t1 (ggid,passwd) values ('test2','yyy'); --- error 1062 +-- error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 (ggid,passwd) values ('test2','this will fail'); --- error 1062 +-- error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 (ggid,id) values ('this will fail',1); select * from t1 where ggid='test1'; @@ -353,7 +353,7 @@ select * from t1 where id=2; replace into t1 (ggid,id) values ('this will work',1); replace into t1 (ggid,passwd) values ('test2','this will work'); --- error 1062 +-- error ER_DUP_ENTRY_WITH_KEY_NAME update t1 set id=100,ggid='test2' where id=1; select * from t1; select * from t1 where id=1; @@ -524,7 +524,7 @@ drop table t1; create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) engine=innodb; insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL'); LOCK TABLES t1 WRITE; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values (99,1,2,'D'),(1,1,2,'D'); select id from t1; select id from t1; @@ -535,7 +535,7 @@ create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(3 insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL'); LOCK TABLES t1 WRITE; begin; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values (99,1,2,'D'),(1,1,2,'D'); select id from t1; insert ignore into t1 values (100,1,2,'D'),(1,1,99,'D'); @@ -1408,7 +1408,7 @@ create table t1 (rowid int not null auto_increment, val int not null,primary key (rowid), unique(val)) engine=innodb; replace into t1 (val) values ('1'),('2'); replace into t1 (val) values ('1'),('2'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 (val) values ('1'),('2'); select * from t1; drop table t1; @@ -1421,7 +1421,7 @@ create table t1 (a int not null auto_increment primary key, val int) engine=Inno insert into t1 (val) values (1); update t1 set a=2 where a=1; # We should get the following error because InnoDB does not update the counter ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 (val) values (1); select * from t1; drop table t1; @@ -1877,13 +1877,13 @@ create table t3 (s1 varchar(2) binary,primary key (s1)) engine=innodb; create table t4 (s1 char(2) binary,primary key (s1)) engine=innodb; insert into t1 values (0x41),(0x4120),(0x4100); --- error 1062 +-- error ER_DUP_ENTRY_WITH_KEY_NAME insert into t2 values (0x41),(0x4120),(0x4100); insert into t2 values (0x41),(0x4120); --- error 1062 +-- error ER_DUP_ENTRY_WITH_KEY_NAME insert into t3 values (0x41),(0x4120),(0x4100); insert into t3 values (0x41),(0x4100); --- error 1062 +-- error ER_DUP_ENTRY_WITH_KEY_NAME insert into t4 values (0x41),(0x4120),(0x4100); insert into t4 values (0x41),(0x4100); select hex(s1) from t1; |