diff options
author | unknown <monty@mysql.com/narttu.mysql.fi> | 2007-01-22 18:42:52 +0200 |
---|---|---|
committer | unknown <monty@mysql.com/narttu.mysql.fi> | 2007-01-22 18:42:52 +0200 |
commit | b4f80eedf3c25773d1e116ab915138096ec713f3 (patch) | |
tree | b7f3dc3063518fbbc2df9502576bcfa67d65bf34 /mysql-test/t | |
parent | 9b1336fec9072cab46ab237c0f94c85808b52be4 (diff) | |
download | mariadb-git-b4f80eedf3c25773d1e116ab915138096ec713f3.tar.gz |
Give warnings for unused objects
Changed error message to be compatible with old error file
Added new error message for new DUP_ENTRY syntax
BUILD/SETUP.sh:
Give warnings for unused objects
mysql-test/extra/binlog_tests/insert_select-binlog.test:
Changed to use new error message
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
Changed to use new error message
mysql-test/extra/rpl_tests/rpl_auto_increment.test:
Changed to use new error message
mysql-test/extra/rpl_tests/rpl_foreign_key.test:
Changed to use new error message
mysql-test/extra/rpl_tests/rpl_insert_id.test:
Changed to use new error message
mysql-test/extra/rpl_tests/rpl_insert_id_pk.test:
Changed to use new error message
mysql-test/extra/rpl_tests/rpl_loaddata.test:
Changed to use new error message
mysql-test/extra/rpl_tests/rpl_row_basic.test:
Changed to use new error message
mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test:
Changed to use new error message
mysql-test/extra/rpl_tests/rpl_trig004.test:
Changed to use new error message
mysql-test/include/mix1.inc:
Changed to use new error message
mysql-test/include/mix2.inc:
Changed to use new error message
mysql-test/include/ps_modify.inc:
Changed to use new error message
mysql-test/include/query_cache.inc:
Changed to use new error message
mysql-test/include/varchar.inc:
Changed to use new error message
mysql-test/r/create.result:
Changed to use new error message
mysql-test/r/rpl_sp.result:
Changed to use new error message
mysql-test/r/sp.result:
Changed to use new error message
mysql-test/r/view.result:
Changed to use new error message
mysql-test/t/auto_increment.test:
Changed to use new error message
mysql-test/t/create.test:
Changed to use new error message
mysql-test/t/create_select_tmp.test:
Changed to use new error message
mysql-test/t/ctype_utf8.test:
Changed to use new error message
mysql-test/t/delayed.test:
Changed to use new error message
mysql-test/t/heap.test:
Changed to use new error message
mysql-test/t/heap_btree.test:
Changed to use new error message
mysql-test/t/heap_hash.test:
Changed to use new error message
mysql-test/t/innodb.test:
Changed to use new error message
mysql-test/t/insert_select.test:
Changed to use new error message
mysql-test/t/insert_update.test:
Changed to use new error message
mysql-test/t/join_outer.test:
Changed to use new error message
mysql-test/t/key.test:
Changed to use new error message
mysql-test/t/merge.test:
Changed to use new error message
mysql-test/t/myisam.test:
Changed to use new error message
mysql-test/t/ndb_charset.test:
Changed to use new error message
mysql-test/t/ndb_index_unique.test:
Changed to use new error message
mysql-test/t/ndb_insert.test:
Changed to use new error message
mysql-test/t/ndb_replace.test:
Changed to use new error message
mysql-test/t/ndb_update.test:
Changed to use new error message
mysql-test/t/replace.test:
Changed to use new error message
mysql-test/t/rpl_err_ignoredtable.test:
Changed to use new error message
mysql-test/t/rpl_row_create_table.test:
Changed to use new error message
mysql-test/t/rpl_skip_error-slave.opt:
Changed to use new error message
mysql-test/t/rpl_sp.test:
Changed to use new error message
mysql-test/t/show_check.test:
Changed to use new error message
mysql-test/t/sp-error.test:
Changed to use new error message
mysql-test/t/sp.test:
Changed to use new error message
mysql-test/t/sp_trans.test:
Changed to use new error message
mysql-test/t/temp_table.test:
Changed to use new error message
mysql-test/t/type_binary.test:
Changed to use new error message
mysql-test/t/type_bit.test:
Changed to use new error message
mysql-test/t/type_bit_innodb.test:
Changed to use new error message
mysql-test/t/type_blob.test:
Changed to use new error message
mysql-test/t/type_varchar.test:
Changed to use new error message
mysql-test/t/view.test:
Changed to use new error message
sql/handler.cc:
ER_DUP_ENTRY -> ER_DUP_ENTRY_WITH_KEY_NAME
sql/share/errmsg.txt:
Changed error message to be compatible with old error file
Added new error message for new DUP_ENTRY syntax
sql/sql_table.cc:
ER_DUP_ENTRY -> ER_DUP_ENTRY_WITH_KEY_NAME
sql-bench/example:
Example file for how to run tests
Diffstat (limited to 'mysql-test/t')
36 files changed, 157 insertions, 155 deletions
diff --git a/mysql-test/t/auto_increment.test b/mysql-test/t/auto_increment.test index f869dc06187..f9a4a49d447 100644 --- a/mysql-test/t/auto_increment.test +++ b/mysql-test/t/auto_increment.test @@ -101,10 +101,10 @@ insert into t1 set i = 254; insert into t1 set i = null; select last_insert_id(); explain extended select last_insert_id(); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 set i = 254; select last_insert_id(); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 set i = null; select last_insert_id(); drop table t1; @@ -122,7 +122,7 @@ insert into t1 values (NULL, 10); select last_insert_id(); insert into t1 values (NULL, 15); select last_insert_id(); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values (NULL, 10); select last_insert_id(); @@ -277,7 +277,7 @@ create table t1 (rowid int not null auto_increment, val int not null,primary key (rowid), unique(val)); 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; @@ -300,7 +300,7 @@ 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); ---error ER_DUP_ENTRY +--error ER_DUP_ENTRY_WITH_KEY_NAME ALTER TABLE t1 CHANGE t1 t1 INT(10) auto_increment; DROP TABLE t1; diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index a2853ca3191..b4837b4ccbb 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -153,7 +153,7 @@ drop table if exists t1,t2; CREATE TABLE t1 (a int not null); INSERT INTO t1 values (1),(2),(1); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME CREATE TABLE t2 (primary key(a)) SELECT * FROM t1; --error 1146 SELECT * from t2; @@ -232,7 +232,7 @@ insert into t1 values (1,1); create table if not exists t1 select 2; select * from t1; create table if not exists t1 select 3 as 'a',4 as 'b'; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME create table if not exists t1 select 3 as 'a',3 as 'b'; show warnings; show status like "Opened_tables"; @@ -684,30 +684,30 @@ drop table t1; CREATE TABLE t1 (a int, b int); insert into t1 values (1,1),(1,2); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME CREATE TABLE t2 (primary key (a)) select * from t1; # This should give warning drop table if exists t2; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME CREATE TEMPORARY TABLE t2 (primary key (a)) select * from t1; # This should give warning drop table if exists t2; CREATE TABLE t2 (a int, b int, primary key (a)); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME CREATE TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1; SELECT * from t2; TRUNCATE table t2; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME INSERT INTO t2 select * from t1; SELECT * from t2; drop table t2; CREATE TEMPORARY TABLE t2 (a int, b int, primary key (a)); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1; SELECT * from t2; TRUNCATE table t2; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME INSERT INTO t2 select * from t1; SELECT * from t2; drop table t1,t2; diff --git a/mysql-test/t/create_select_tmp.test b/mysql-test/t/create_select_tmp.test index ba9898b7752..eacea1ac376 100644 --- a/mysql-test/t/create_select_tmp.test +++ b/mysql-test/t/create_select_tmp.test @@ -14,19 +14,19 @@ drop table if exists t1, t2; --enable_warnings CREATE TABLE t1 ( a int ); INSERT INTO t1 VALUES (1),(2),(1); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1; --error 1146 select * from t2; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1; --error 1146 select * from t2; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1; --error 1146 select * from t2; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1; --error 1146 select * from t2; diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test index 804b17ab6bb..da43166fdd0 100644 --- a/mysql-test/t/ctype_utf8.test +++ b/mysql-test/t/ctype_utf8.test @@ -210,9 +210,9 @@ drop table t2; create table t1 (c varchar(30) character set utf8, unique(c(10))); insert into t1 values ('1'),('2'),('3'),('x'),('y'),('z'); insert into t1 values ('aaaaaaaaaa'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('aaaaaaaaaaa'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('aaaaaaaaaaaa'); insert into t1 values (repeat('b',20)); select c c1 from t1 where c='1'; @@ -234,9 +234,9 @@ create table t1 (c varchar(30) character set utf8, unique(c(10))) engine=innodb; --enable_warnings insert into t1 values ('1'),('2'),('3'),('x'),('y'),('z'); insert into t1 values ('aaaaaaaaaa'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('aaaaaaaaaaa'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('aaaaaaaaaaaa'); insert into t1 values (repeat('b',20)); select c c1 from t1 where c='1'; @@ -256,23 +256,23 @@ create table t1 (c char(3) character set utf8, unique (c(2))); insert into t1 values ('1'),('2'),('3'),('4'),('x'),('y'),('z'); insert into t1 values ('a'); insert into t1 values ('aa'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('aaa'); insert into t1 values ('b'); insert into t1 values ('bb'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('bbb'); insert into t1 values ('а'); insert into t1 values ('аа'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('ааа'); insert into t1 values ('б'); insert into t1 values ('бб'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('ббб'); insert into t1 values ('ꪪ'); insert into t1 values ('ꪪꪪ'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('ꪪꪪꪪ'); drop table t1; # @@ -285,23 +285,23 @@ create table t1 (c char(3) character set utf8, unique (c(2))) engine=innodb; insert into t1 values ('1'),('2'),('3'),('4'),('x'),('y'),('z'); insert into t1 values ('a'); insert into t1 values ('aa'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('aaa'); insert into t1 values ('b'); insert into t1 values ('bb'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('bbb'); insert into t1 values ('а'); insert into t1 values ('аа'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('ааа'); insert into t1 values ('б'); insert into t1 values ('бб'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('ббб'); insert into t1 values ('ꪪ'); insert into t1 values ('ꪪꪪ'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('ꪪꪪꪪ'); drop table t1; # @@ -314,14 +314,14 @@ unique key a using hash (c(1)) ) engine=heap; show create table t1; insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('aa'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('aaa'); insert into t1 values ('б'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('бб'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('ббб'); select c as c_all from t1 order by c; select c as c_a from t1 where c='a'; @@ -338,14 +338,14 @@ unique key a using btree (c(1)) ) engine=heap; show create table t1; insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('aa'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('aaa'); insert into t1 values ('б'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('бб'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('ббб'); select c as c_all from t1 order by c; select c as c_a from t1 where c='a'; @@ -363,14 +363,14 @@ unique key a (c(1)) ) engine=innodb; --enable_warnings insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('aa'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('aaa'); insert into t1 values ('б'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('бб'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('ббб'); select c as c_all from t1 order by c; select c as c_a from t1 where c='a'; @@ -384,9 +384,9 @@ drop table t1; create table t1 (c varchar(30) character set utf8 collate utf8_bin, unique(c(10))); insert into t1 values ('1'),('2'),('3'),('x'),('y'),('z'); insert into t1 values ('aaaaaaaaaa'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('aaaaaaaaaaa'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('aaaaaaaaaaaa'); insert into t1 values (repeat('b',20)); select c c1 from t1 where c='1'; @@ -407,23 +407,23 @@ create table t1 (c char(3) character set utf8 collate utf8_bin, unique (c(2))); insert into t1 values ('1'),('2'),('3'),('4'),('x'),('y'),('z'); insert into t1 values ('a'); insert into t1 values ('aa'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('aaa'); insert into t1 values ('b'); insert into t1 values ('bb'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('bbb'); insert into t1 values ('а'); insert into t1 values ('аа'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('ааа'); insert into t1 values ('б'); insert into t1 values ('бб'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('ббб'); insert into t1 values ('ꪪ'); insert into t1 values ('ꪪꪪ'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('ꪪꪪꪪ'); drop table t1; @@ -437,14 +437,14 @@ unique key a using hash (c(1)) ) engine=heap; show create table t1; insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('aa'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('aaa'); insert into t1 values ('б'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('бб'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('ббб'); select c as c_all from t1 order by c; select c as c_a from t1 where c='a'; @@ -461,14 +461,14 @@ unique key a using btree (c(1)) ) engine=heap; show create table t1; insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('aa'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('aaa'); insert into t1 values ('б'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('бб'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('ббб'); select c as c_all from t1 order by c; select c as c_a from t1 where c='a'; @@ -486,14 +486,14 @@ unique key a (c(1)) ) engine=innodb; --enable_warnings insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('aa'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('aaa'); insert into t1 values ('б'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('бб'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('ббб'); select c as c_all from t1 order by c; select c as c_a from t1 where c='a'; diff --git a/mysql-test/t/delayed.test b/mysql-test/t/delayed.test index 03d8e20dd8f..347c8a9dc55 100644 --- a/mysql-test/t/delayed.test +++ b/mysql-test/t/delayed.test @@ -185,7 +185,7 @@ INSERT INTO t1 VALUES( 49, 71), (NULL, 72), (NULL, 73); INSERT INTO t1 VALUES(NULL, 81), (NULL, 82), (NULL, 83); # Create a duplicate value. SET insert_id= 114; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME INSERT INTO t1 VALUES(NULL, 91); INSERT INTO t1 VALUES (NULL, 92), (NULL, 93); # Check what we have now diff --git a/mysql-test/t/heap.test b/mysql-test/t/heap.test index e501fce1eeb..624597cd8d7 100644 --- a/mysql-test/t/heap.test +++ b/mysql-test/t/heap.test @@ -128,7 +128,7 @@ SELECT * FROM t1 WHERE b=NULL; explain SELECT * FROM t1 WHERE b IS NULL; SELECT * FROM t1 WHERE b<=>NULL; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME INSERT INTO t1 VALUES (1,3); DROP TABLE t1; @@ -270,7 +270,7 @@ explain select count(*) from t1 where v like 'a%'; explain select count(*) from t1 where v between 'a' and 'a '; explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME alter table t1 add unique(v); select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a' order by length(concat('*',v,'*',c,'*',t,'*')); explain select * from t1 where v='a'; @@ -296,17 +296,17 @@ drop table t1; create table t1 (a char(10), unique (a)); insert into t1 values ('a'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('a '); alter table t1 modify a varchar(10); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('a '),('a '),('a '),('a '); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('a '); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('a '); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('a '); update t1 set a='a ' where a like 'a '; update t1 set a='a ' where a like 'a '; @@ -357,7 +357,7 @@ explain select count(*) from t1 where v between 'a' and 'a '; --replace_column 9 # explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME alter table t1 add unique(v); select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a' order by length(concat('*',v,'*',c,'*',t,'*')); # Number of rows is not constant for b-trees keys @@ -372,17 +372,17 @@ drop table t1; create table t1 (a char(10), unique using btree (a)) engine=heap; insert into t1 values ('a'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('a '); alter table t1 modify a varchar(10); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('a '),('a '),('a '),('a '); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('a '); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('a '); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ('a '); update t1 set a='a ' where a like 'a '; update t1 set a='a ' where a like 'a '; @@ -432,7 +432,7 @@ create table t1 (a int not null, b int not null auto_increment, # create table t1 (c char(255), primary key(c(90))); insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"); drop table t1; diff --git a/mysql-test/t/heap_btree.test b/mysql-test/t/heap_btree.test index 03ba8661a3c..68aa79834fc 100644 --- a/mysql-test/t/heap_btree.test +++ b/mysql-test/t/heap_btree.test @@ -143,7 +143,7 @@ SELECT * FROM t1 WHERE b=NULL; explain SELECT * FROM t1 WHERE b IS NULL; SELECT * FROM t1 WHERE b<=>NULL; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME INSERT INTO t1 VALUES (1,3); DROP TABLE t1; diff --git a/mysql-test/t/heap_hash.test b/mysql-test/t/heap_hash.test index 28a75a5ee11..774f83f43b0 100644 --- a/mysql-test/t/heap_hash.test +++ b/mysql-test/t/heap_hash.test @@ -128,7 +128,7 @@ SELECT * FROM t1 WHERE b=NULL; explain SELECT * FROM t1 WHERE b IS NULL; SELECT * FROM t1 WHERE b<=>NULL; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME INSERT INTO t1 VALUES (1,3); DROP TABLE t1; diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 7e9a0e1ed18..df44fcf0105 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -52,7 +52,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 @@ -133,13 +133,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; @@ -213,7 +213,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'; @@ -341,9 +341,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'; @@ -352,7 +352,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; @@ -523,7 +523,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; @@ -534,7 +534,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'); @@ -1407,7 +1407,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; @@ -1420,7 +1420,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; @@ -1876,13 +1876,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; diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test index 6f86ed897ac..dfe647fe87b 100644 --- a/mysql-test/t/insert_select.test +++ b/mysql-test/t/insert_select.test @@ -10,7 +10,7 @@ create table t1 (bandID MEDIUMINT UNSIGNED NOT NULL PRIMARY KEY, payoutID SMALLI insert into t1 (bandID,payoutID) VALUES (1,6),(2,6),(3,4),(4,9),(5,10),(6,1),(7,12),(8,12); create table t2 (payoutID SMALLINT UNSIGNED NOT NULL PRIMARY KEY); insert into t2 (payoutID) SELECT DISTINCT payoutID FROM t1; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t2 (payoutID) SELECT payoutID+10 FROM t1; insert ignore into t2 (payoutID) SELECT payoutID+10 FROM t1; select * from t2; @@ -101,7 +101,7 @@ create table t1 (a int not null primary key, b char(10)); create table t2 (a int not null, b char(10)); insert into t1 values (1,"t1:1"),(3,"t1:3"); insert into t2 values (2,"t2:2"), (3,"t2:3"); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 select * from t2; select * from t1; # REPLACE .. SELECT is not yet supported by PS diff --git a/mysql-test/t/insert_update.test b/mysql-test/t/insert_update.test index b3813864464..8a3e0306025 100644 --- a/mysql-test/t/insert_update.test +++ b/mysql-test/t/insert_update.test @@ -12,7 +12,7 @@ INSERT t1 VALUES (8,4,50) ON DUPLICATE KEY UPDATE c=c+1000; SELECT * FROM t1; INSERT t1 VALUES (1,4,60) ON DUPLICATE KEY UPDATE c=c+10000; SELECT * FROM t1; --- error 1062 +-- error ER_DUP_ENTRY_WITH_KEY_NAME INSERT t1 VALUES (1,9,70) ON DUPLICATE KEY UPDATE c=c+100000, b=4; SELECT * FROM t1; TRUNCATE TABLE t1; @@ -63,7 +63,7 @@ INSERT t1 SELECT 8,4,50 FROM DUAL ON DUPLICATE KEY UPDATE c=c+1000; SELECT * FROM t1; INSERT t1 SELECT 1,4,60 FROM DUAL ON DUPLICATE KEY UPDATE c=c+10000; SELECT * FROM t1; --- error 1062 +-- error ER_DUP_ENTRY_WITH_KEY_NAME INSERT t1 SELECT 1,9,70 FROM DUAL ON DUPLICATE KEY UPDATE c=c+100000, b=4; SELECT * FROM t1; TRUNCATE TABLE t1; diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test index 72a2935337d..9bc88a95ffe 100644 --- a/mysql-test/t/join_outer.test +++ b/mysql-test/t/join_outer.test @@ -97,7 +97,7 @@ WHERE t1.uniq_id = 4 ORDER BY t2.c_amount; INSERT INTO t2 VALUES (2,3,3000,6000,0,0,746584,837484,'yes'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME INSERT INTO t2 VALUES (2,3,3000,6000,0,0,746584,837484,'yes'); INSERT INTO t2 VALUES (7,3,1000,2000,0,0,746294,937484,'yes'); diff --git a/mysql-test/t/key.test b/mysql-test/t/key.test index 7c6b38cb871..0a5eb17f6f5 100644 --- a/mysql-test/t/key.test +++ b/mysql-test/t/key.test @@ -150,7 +150,7 @@ create table t1 ); INSERT INTO t1 VALUES (1, 1, 1, 1, 'a'); INSERT INTO t1 VALUES (1, 1, 1, 1, 'b'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME INSERT INTO t1 VALUES (1, 1, 1, 1, 'a'); drop table t1; @@ -243,13 +243,13 @@ show create table t1; insert t1 values ('cccc', 'tttt'), (0xD0B1212223D0B1D0B1D0B1D0B1D0B1, 0xD0B1D0B1212223D0B1D0B1D0B1D0B1), (0xD0B1222123D0B1D0B1D0B1D0B1D0B1, 0xD0B1D0B1222123D0B1D0B1D0B1D0B1); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert t1 (c) values ('cc22'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert t1 (t) values ('ttt22'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert t1 (c) values (0xD0B1212322D0B1D0B1D0B1D0B1D0B1); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert t1 (t) values (0xD0B1D0B1212322D0B1D0B1D0B1D0B1); select c from t1 where c='cccc'; select t from t1 where t='tttt'; @@ -438,7 +438,7 @@ insert into t1 values(1, 'b', 'b', NULL); # Drop some indexes for new adds. alter table t1 drop index i3, drop index i2, drop index i1; # Add indexes, one is unique on non-unique values. ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME alter table t1 add index i3 (c3), add index i2 (c2), add unique index i1 (c1); drop table t1; diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test index 5498468d902..ac2b9471fe9 100644 --- a/mysql-test/t/merge.test +++ b/mysql-test/t/merge.test @@ -195,9 +195,9 @@ select * from t6 order by a,b; insert into t1 values (99,NULL); select * from t4 where a+0 > 90; # bug#4008 - cannot determine a unique key that caused "dupl. key error" ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert t5 values (1,1); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert t6 values (2,1); insert t5 values (1,1) on duplicate key update b=b+10; insert t6 values (2,1) on duplicate key update b=b+20; diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 5a663718878..b7faa59307e 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -453,9 +453,9 @@ create table t1 (a int not null auto_increment primary key, b text not null, uni insert into t1 (b) values ('a'),('b'),('c'); select concat(b,'.') from t1; update t1 set b='b ' where a=2; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME update t1 set b='b ' where a > 1; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 (b) values ('b'); select * from t1; delete from t1 where b='b'; diff --git a/mysql-test/t/ndb_charset.test b/mysql-test/t/ndb_charset.test index a429ee5e1dc..2cdb1972225 100644 --- a/mysql-test/t/ndb_charset.test +++ b/mysql-test/t/ndb_charset.test @@ -38,9 +38,9 @@ create table t1 ( # ok insert into t1 values('aAa'); # fail ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values('aaa'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values('AAA'); # 1 select * from t1 order by a; @@ -61,9 +61,9 @@ create table t1 ( ) engine=ndb; # insert into t1 values ('A'),('b '),('C '),('d '),('E'),('f'); --- error 1062 +-- error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values('b'); --- error 1062 +-- error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values('a '); # select a,length(a) from t1 order by a; @@ -106,9 +106,9 @@ create table t1 ( # ok insert into t1 values(1, 'aAa'); # fail ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values(2, 'aaa'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values(3, 'AAA'); # 1 select * from t1 order by p; @@ -131,9 +131,9 @@ create table t1 ( ) engine=ndb; # insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f'); --- error 1062 +-- error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values(99,'b'); --- error 1062 +-- error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values(99,'a '); # select a,length(a) from t1 order by a; @@ -231,7 +231,7 @@ drop table t1; # ('a','A '),('B ','b'),('c','C '),('D','d'),('e ','E'),('F','f '), # ('A','b '),('b ','C'),('C','d '),('d','E'),('E ','f'), # ('a','C '),('B ','d'),('c','E '),('D','f'); -#-- error 1062 +#-- error ER_DUP_ENTRY_WITH_KEY_NAME #insert into t1 values('d','f'); # #select a,b,length(a),length(b) from t1 order by a,b limit 3; diff --git a/mysql-test/t/ndb_index_unique.test b/mysql-test/t/ndb_index_unique.test index 94bba98662c..9893dce7367 100644 --- a/mysql-test/t/ndb_index_unique.test +++ b/mysql-test/t/ndb_index_unique.test @@ -22,7 +22,7 @@ select * from t1 where b = 4 order by b; insert into t1 values(7,8,3); select * from t1 where b = 4 order by a; --- error 1062 +-- error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values(8, 2, 3); select * from t1 order by a; delete from t1 where a = 1; @@ -59,7 +59,7 @@ select * from t1 use index (bc) where b IS NULL and c IS NULL order by a; select * from t1 use index (bc) where b IS NULL and c = 2 order by a; select * from t1 use index (bc) where b < 4 order by a; select * from t1 use index (bc) where b IS NOT NULL order by a; --- error 1062 +-- error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values(5,1,1); drop table t1; @@ -82,7 +82,7 @@ select * from t2 where c = 6; insert into t2 values(7,8,3); select * from t2 where b = 4 order by a; --- error 1062 +-- error ER_DUP_ENTRY_WITH_KEY_NAME insert into t2 values(8, 2, 3); select * from t2 order by a; delete from t2 where a = 1; @@ -133,7 +133,7 @@ insert into t1 values (-1,NULL), (0,0), (1,NULL),(2,2),(3,NULL),(4,4); select * from t1 order by pk; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values (5,0); select * from t1 order by pk; delete from t1 where a = 0; @@ -152,7 +152,7 @@ insert into t2 values (-1,1,17,NULL),(0,NULL,18,NULL),(1,3,19,'abc'); select * from t2 order by pk; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t2 values(2,3,19,'abc'); select * from t2 order by pk; delete from t2 where c IS NOT NULL; @@ -321,7 +321,7 @@ create table t1 (a int primary key, b varchar(1000) not null, unique key (b)) engine=ndb charset=utf8; insert into t1 values (1, repeat(_utf8 0xe288ab6474, 200)); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values (2, repeat(_utf8 0xe288ab6474, 200)); select a, sha1(b) from t1; diff --git a/mysql-test/t/ndb_insert.test b/mysql-test/t/ndb_insert.test index bf25ca9a133..936bcb305ab 100644 --- a/mysql-test/t/ndb_insert.test +++ b/mysql-test/t/ndb_insert.test @@ -433,7 +433,7 @@ SELECT COUNT(*) FROM t1; # # Insert duplicate rows # ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME INSERT INTO t1 VALUES (1,1,1); --error 1022 diff --git a/mysql-test/t/ndb_replace.test b/mysql-test/t/ndb_replace.test index 476a607ed44..fcbefe710ca 100644 --- a/mysql-test/t/ndb_replace.test +++ b/mysql-test/t/ndb_replace.test @@ -21,7 +21,7 @@ replace into t1 (gesuchnr,benutzer_id) values (1,1); insert into t1 (gesuchnr, benutzer_id) value (3,2); replace into t1 (gesuchnr,benutzer_id) values (1,1); replace into t1 (gesuchnr,benutzer_id) values (1,1); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 (gesuchnr,benutzer_id) values (1,1); replace into t1 (gesuchnr,benutzer_id) values (1,1); select * from t1 order by gesuchnr; diff --git a/mysql-test/t/ndb_update.test b/mysql-test/t/ndb_update.test index 45e3add4639..2eb736aecfd 100644 --- a/mysql-test/t/ndb_update.test +++ b/mysql-test/t/ndb_update.test @@ -23,7 +23,7 @@ UPDATE t1 set b = c; select * from t1 order by pk1; UPDATE t1 set pk1 = 4 where pk1 = 1; select * from t1 order by pk1; --- error 1062 +-- error ER_DUP_ENTRY_WITH_KEY_NAME UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4; select * from t1 order by pk1; UPDATE t1 set pk1 = pk1 + 10; diff --git a/mysql-test/t/replace.test b/mysql-test/t/replace.test index 269854fb180..4e88379241c 100644 --- a/mysql-test/t/replace.test +++ b/mysql-test/t/replace.test @@ -25,9 +25,9 @@ drop table t1; create table t1 (a tinyint not null auto_increment primary key, b char(20) default "default_value"); insert into t1 values (126,"first"),(63, "middle"),(0,"last"); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values (0,"error"); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME replace into t1 values (0,"error"); replace into t1 values (126,"first updated"); replace into t1 values (63,default); diff --git a/mysql-test/t/rpl_err_ignoredtable.test b/mysql-test/t/rpl_err_ignoredtable.test index 42ca8cf2e8b..4d4be6ae786 100644 --- a/mysql-test/t/rpl_err_ignoredtable.test +++ b/mysql-test/t/rpl_err_ignoredtable.test @@ -11,7 +11,7 @@ connection master; create table t1 (a int primary key); create table t4 (a int primary key); # generate an error that goes to the binlog ---error 1022, 1062 +--error 1022, ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values (1),(1); insert into t4 values (1),(2); save_master_pos; diff --git a/mysql-test/t/rpl_row_create_table.test b/mysql-test/t/rpl_row_create_table.test index 3a711e5b496..3900f33088c 100644 --- a/mysql-test/t/rpl_row_create_table.test +++ b/mysql-test/t/rpl_row_create_table.test @@ -63,7 +63,7 @@ SELECT * FROM t6 ORDER BY a,b,c; connection master; # Test for erroneous constructions ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3; # Shouldn't be written to the binary log --replace_regex /table_id: [0-9]+/table_id: #/ @@ -71,7 +71,7 @@ SHOW BINLOG EVENTS FROM 1256; # Test that INSERT-SELECT works the same way as for SBR. CREATE TABLE t7 (a INT, b INT UNIQUE); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME INSERT INTO t7 SELECT a,b FROM tt3; SELECT * FROM t7 ORDER BY a,b; # Should be written to the binary log diff --git a/mysql-test/t/rpl_skip_error-slave.opt b/mysql-test/t/rpl_skip_error-slave.opt index f6f258f799f..acb0b77cc03 100644 --- a/mysql-test/t/rpl_skip_error-slave.opt +++ b/mysql-test/t/rpl_skip_error-slave.opt @@ -1 +1 @@ ---slave-skip-error=1053,1062 +--slave-skip-error=1053,1579 diff --git a/mysql-test/t/rpl_sp.test b/mysql-test/t/rpl_sp.test index 22ab72df104..dfcd8fd3b5b 100644 --- a/mysql-test/t/rpl_sp.test +++ b/mysql-test/t/rpl_sp.test @@ -152,7 +152,7 @@ create procedure foo4() delimiter ;| ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME call foo4(); show warnings; @@ -307,7 +307,7 @@ delimiter ;| do fn1(100); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME select fn1(20); select * from t2; diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index be803a74c7b..938baec51d1 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -30,7 +30,7 @@ check table t1 changed; check table t1 medium; check table t1 extended; show index from t1; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values (5,5,5); optimize table t1; optimize table t1; diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test index 456a23123d3..3f3aba383d7 100644 --- a/mysql-test/t/sp-error.test +++ b/mysql-test/t/sp-error.test @@ -586,7 +586,7 @@ begin end| set @x = 0| ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME call bug3279(@x)| select @x| drop procedure bug3279| diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index 8f4763c636a..9cf95fd484f 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -1763,11 +1763,11 @@ insert into t3 (a) values (1)| create procedure h_ee() deterministic begin - declare continue handler for 1062 -- ER_DUP_ENTRY + declare continue handler for 1579 -- ER_DUP_ENTRY_WITH_KEY_NAME select 'Outer (bad)' as 'h_ee'; begin - declare continue handler for 1062 -- ER_DUP_ENTRY + declare continue handler for 1579 -- ER_DUP_ENTRY_WITH_KEY_NAME select 'Inner (good)' as 'h_ee'; insert into t3 values (1); @@ -1777,7 +1777,7 @@ end| create procedure h_es() deterministic begin - declare continue handler for 1062 -- ER_DUP_ENTRY + declare continue handler for 1579 -- ER_DUP_ENTRY_WITH_KEY_NAME select 'Outer (good)' as 'h_es'; begin @@ -1823,7 +1823,7 @@ end| create procedure h_ex() deterministic begin - declare continue handler for 1062 -- ER_DUP_ENTRY + declare continue handler for 1579 -- ER_DUP_ENTRY_WITH_KEY_NAME select 'Outer (good)' as 'h_ex'; begin @@ -1842,7 +1842,7 @@ begin select 'Outer (bad)' as 'h_se'; begin - declare continue handler for 1062 -- ER_DUP_ENTRY + declare continue handler for 1579 -- ER_DUP_ENTRY_WITH_KEY_NAME select 'Inner (good)' as 'h_se'; insert into t3 values (1); @@ -2015,7 +2015,7 @@ begin select 'Outer (bad)' as 'h_xe'; begin - declare continue handler for 1062 -- ER_DUP_ENTRY + declare continue handler for 1579 -- ER_DUP_ENTRY_WITH_KEY_NAME select 'Inner (good)' as 'h_xe'; insert into t3 values (1); @@ -4507,7 +4507,7 @@ begin select bug12379(); end| ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME select bug12379()| select 1| # statement-based binlogging will show warning which row-based won't; @@ -4518,7 +4518,7 @@ select 2| call bug12379_2()| --enable_warnings select 3| ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME call bug12379_3()| select 4| @@ -4600,7 +4600,7 @@ end| call bug6127()| select * from t3| ---error ER_DUP_ENTRY +--error ER_DUP_ENTRY_WITH_KEY_NAME call bug6127()| select * from t3| set sql_mode=@sm| @@ -5528,11 +5528,11 @@ insert into t3 values (1)| create procedure bug15011() deterministic begin - declare continue handler for 1062 + declare continue handler for 1579 select 'Outer' as 'Handler'; begin - declare continue handler for 1062 + declare continue handler for 1579 select 'Inner' as 'Handler'; insert into t3 values (1); diff --git a/mysql-test/t/sp_trans.test b/mysql-test/t/sp_trans.test index 325e11b1ec9..a79f6c7e7e0 100644 --- a/mysql-test/t/sp_trans.test +++ b/mysql-test/t/sp_trans.test @@ -89,7 +89,7 @@ create function bug10015_5(i int) returns int end if; return i; end| ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values (bug10015_5(4)), (bug10015_5(5))| select * from t1| drop function bug10015_5| diff --git a/mysql-test/t/temp_table.test b/mysql-test/t/temp_table.test index 123007b10c7..d06fde87b34 100644 --- a/mysql-test/t/temp_table.test +++ b/mysql-test/t/temp_table.test @@ -73,7 +73,7 @@ drop table t1,t2; # create temporary table t1 (a int not null); insert into t1 values (1),(1); --- error 1062 +-- error ER_DUP_ENTRY_WITH_KEY_NAME alter table t1 add primary key (a); drop table t1; diff --git a/mysql-test/t/type_binary.test b/mysql-test/t/type_binary.test index 1639aff4711..c547d68d006 100644 --- a/mysql-test/t/type_binary.test +++ b/mysql-test/t/type_binary.test @@ -31,7 +31,7 @@ drop table t1; create table t1 (s1 binary(2) primary key); insert into t1 values (0x01); insert into t1 values (0x0120); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 values (0x0100); select hex(s1) from t1 order by s1; # check index search diff --git a/mysql-test/t/type_bit.test b/mysql-test/t/type_bit.test index 48ad24ff6b7..8141bdedd50 100644 --- a/mysql-test/t/type_bit.test +++ b/mysql-test/t/type_bit.test @@ -39,7 +39,7 @@ drop table t1; create table t1 (a bit); insert into t1 values (b'0'), (b'1'), (b'000'), (b'100'), (b'001'); select hex(a) from t1; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME alter table t1 add unique (a); drop table t1; diff --git a/mysql-test/t/type_bit_innodb.test b/mysql-test/t/type_bit_innodb.test index dbca69d67f0..4ee97782452 100644 --- a/mysql-test/t/type_bit_innodb.test +++ b/mysql-test/t/type_bit_innodb.test @@ -40,7 +40,7 @@ drop table t1; create table t1 (a bit) engine=innodb; insert into t1 values (b'0'), (b'1'), (b'000'), (b'100'), (b'001'); select hex(a) from t1; ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME alter table t1 add unique (a); drop table t1; diff --git a/mysql-test/t/type_blob.test b/mysql-test/t/type_blob.test index 6d79dcc863b..cd8f2d48eea 100644 --- a/mysql-test/t/type_blob.test +++ b/mysql-test/t/type_blob.test @@ -334,9 +334,9 @@ drop table t1; # create table t1 (id integer primary key auto_increment, txt text not null, unique index txt_index (txt (20))); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 (txt) values ('Chevy'), ('Chevy '); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME insert into t1 (txt) values ('Chevy'), ('CHEVY'); alter table t1 drop index txt_index, add index txt_index (txt(20)); insert into t1 (txt) values ('Chevy '); diff --git a/mysql-test/t/type_varchar.test b/mysql-test/t/type_varchar.test index 439e98471b2..818fb1d19ca 100644 --- a/mysql-test/t/type_varchar.test +++ b/mysql-test/t/type_varchar.test @@ -25,7 +25,7 @@ select v='a' from t1; select binary v='a' from t1; select binary v='a ' from t1; insert into t1 values('a'); ---error 1062 +--error ER_DUP_ENTRY_WITH_KEY_NAME alter table t1 add primary key (v); drop table t1; create table t1 (v varbinary(20)); diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 7175db1db4e..3e28d8f225e 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -2553,7 +2553,9 @@ CREATE VIEW v1 AS FROM t1 HAVING Age < 75; SHOW CREATE VIEW v1; +set timestamp=1136066400; SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75; +set timestamp=1136066400; SELECT * FROM v1; DROP VIEW v1; |