From 39c5ae17ce20c449feabd005acfc68254156d79d Mon Sep 17 00:00:00 2001 From: marko <> Date: Wed, 1 Aug 2007 13:00:16 +0000 Subject: [PATCH] branches/zip: innodb-index.test: Replace numeric error codes with symbolic ones. --- mysql-test/innodb-index.test | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/mysql-test/innodb-index.test b/mysql-test/innodb-index.test index 32154206cb3..a44115a7979 100644 --- a/mysql-test/innodb-index.test +++ b/mysql-test/innodb-index.test @@ -3,15 +3,15 @@ create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb; insert into t1 values (5,5,'oo','oo'),(4,4,'tr','tr'),(3,4,'ad','ad'),(2,3,'ak','ak'); commit; ---error 1061 +--error ER_DUP_KEYNAME alter table t1 add index b (b), add index b (b); ---error 1060 +--error ER_DUP_FIELDNAME alter table t1 add index (b,b); alter table t1 add index d2 (d); show create table t1; explain select * from t1 order by d; select * from t1 order by d; ---error 1582 +--error ER_DUP_ENTRY alter table t1 add unique index (b); show create table t1; alter table t1 add index (b); @@ -102,15 +102,15 @@ create table t4(a int not null, d int not null, e int, primary key (a), key (d)) create table t2(a int not null, b int not null, c int not null, d int not null, e int, primary key (a), foreign key (b) references t1(b), foreign key (c) references t3(c), foreign key (d) references t4(d)) engine = innodb; ---error 1542 +--error ER_DROP_INDEX_FK alter table t1 drop index b; ---error 1542 +--error ER_DROP_INDEX_FK alter table t3 drop index c; ---error 1542 +--error ER_DROP_INDEX_FK alter table t4 drop index d; ---error 1542 +--error ER_DROP_INDEX_FK alter table t2 drop index b; ---error 1542 +--error ER_DROP_INDEX_FK alter table t2 drop index b, drop index c, drop index d; set foreign_key_checks=0; insert into t1 values (1,1,1); @@ -133,7 +133,7 @@ engine = innodb default charset=utf8; insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,2,'ad','ad'),(4,4,'afe','afe'); commit; --replace_regex /Duplicate entry '[0-9]*'/Duplicate entry ''/ ---error 1582 +--error ER_DUP_ENTRY alter table t1 add unique index (b); insert into t1 values(8,9,'fff','fff'); select * from t1; @@ -172,7 +172,7 @@ engine = innodb default charset=ucs2; insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,2,'ad','ad'),(4,4,'afe','afe'); commit; --replace_regex /Duplicate entry '[0-9]*'/Duplicate entry ''/ ---error 1582 +--error ER_DUP_ENTRY alter table t1 add unique index (b); show create table t1; alter table t1 add index (b); @@ -200,11 +200,11 @@ drop table t1; create table t1(a int not null, b int) engine = innodb; insert into t1 values (1,1),(1,1),(1,1),(1,1); ---error 1582 +--error ER_DUP_ENTRY alter table t1 add unique index (a); ---error 1582 +--error ER_DUP_ENTRY alter table t1 add unique index (b); ---error 1582 +--error ER_DUP_ENTRY alter table t1 add unique index (a), add unique index(b); show create table t1; drop table t1; @@ -221,9 +221,9 @@ drop table t1; create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb; insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,3,'ac','ac'),(4,4,'afe','afe'); ---error 1582 +--error ER_DUP_ENTRY alter table t1 add unique index (b), add unique index (c), add unique index (d); ---error 1582 +--error ER_DUP_ENTRY alter table t1 add unique index (b), add index (d), add unique index (c); show create table t1; drop table t1;