summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <jimw@rama.(none)>2007-06-06 10:57:07 -0700
committerunknown <jimw@rama.(none)>2007-06-06 10:57:07 -0700
commit0f6047e455b82e0246317be5ec49ffc4fccceb42 (patch)
tree14e9cb6702b9a4a6f6a762ef63264a1b2e3a9205 /mysql-test
parent10a21ed042e39c8800893dbb8ba711d54daf4896 (diff)
downloadmariadb-git-0f6047e455b82e0246317be5ec49ffc4fccceb42.tar.gz
Bug #28842 Different 'duplicate key' error code between 5.0 and 5.1
The patch for WL 1563 added a new duplicate key error message so that the key name could be provided instead of the key number. But the error code for the new message was used even though that did not need to change. This could cause unnecessary problems for applications that used the old ER_DUP_ENTRY error code to detect duplicate key errors. mysql-test/t/auto_increment.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/create.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/create_select_tmp.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/ctype_ucs2_def.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/ctype_utf8.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/delayed.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/heap.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/heap_btree.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/heap_hash.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/innodb.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/insert_select.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/insert_update.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/join_outer.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/key.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/merge.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/myisam.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/ndb_basic.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/ndb_charset.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/ndb_index_unique.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/ndb_insert.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/ndb_replace.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/ndb_update.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/replace.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/rpl_err_ignoredtable.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/rpl_ndb_do_table.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/rpl_row_create_table.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/rpl_sp.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/show_check.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/sp-error.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/sp.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/sp_trans.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/sp_trans_log.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/temp_table.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/type_binary.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/type_bit.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/type_bit_innodb.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/type_blob.test: Update ER_DUP_ENTRY-related error message values mysql-test/t/type_varchar.test: Update ER_DUP_ENTRY-related error message values mysql-test/r/create.result: Update ER_DUP_ENTRY-related error message values mysql-test/r/rpl_sp.result: Update ER_DUP_ENTRY-related error message values mysql-test/r/sp.result: Update ER_DUP_ENTRY-related error message values mysql-test/include/mix1.inc: Update ER_DUP_ENTRY-related error message values mysql-test/include/mix2.inc: Update ER_DUP_ENTRY-related error message values mysql-test/include/ps_modify.inc: Update ER_DUP_ENTRY-related error message values mysql-test/include/query_cache.inc: Update ER_DUP_ENTRY-related error message values mysql-test/include/varchar.inc: Update ER_DUP_ENTRY-related error message values mysql-test/extra/binlog_tests/insert_select-binlog.test: Update ER_DUP_ENTRY-related error message values mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test: Update ER_DUP_ENTRY-related error message values mysql-test/extra/rpl_tests/rpl_auto_increment.test: Update ER_DUP_ENTRY-related error message values mysql-test/extra/rpl_tests/rpl_foreign_key.test: Update ER_DUP_ENTRY-related error message values mysql-test/extra/rpl_tests/rpl_insert_delayed.test: Update ER_DUP_ENTRY-related error message values mysql-test/extra/rpl_tests/rpl_insert_id.test: Update ER_DUP_ENTRY-related error message values mysql-test/extra/rpl_tests/rpl_insert_id_pk.test: Update ER_DUP_ENTRY-related error message values mysql-test/extra/rpl_tests/rpl_loaddata.test: Update ER_DUP_ENTRY-related error message values mysql-test/extra/rpl_tests/rpl_row_basic.test: Update ER_DUP_ENTRY-related error message values mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test: Update ER_DUP_ENTRY-related error message values mysql-test/extra/rpl_tests/rpl_trig004.test: Update ER_DUP_ENTRY-related error message values sql/handler.cc: Restore use of ER_DUP_ENTRY error code even when ER_DUP_ENTRY_WITH_KEY_NAME error message is being used. (Bug #28842)
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/extra/binlog_tests/insert_select-binlog.test4
-rw-r--r--mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test18
-rw-r--r--mysql-test/extra/rpl_tests/rpl_auto_increment.test4
-rw-r--r--mysql-test/extra/rpl_tests/rpl_foreign_key.test4
-rw-r--r--mysql-test/extra/rpl_tests/rpl_insert_delayed.test4
-rw-r--r--mysql-test/extra/rpl_tests/rpl_insert_id.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_insert_id_pk.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_loaddata.test6
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_basic.test6
-rw-r--r--mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_trig004.test2
-rw-r--r--mysql-test/include/mix1.inc14
-rw-r--r--mysql-test/include/mix2.inc28
-rw-r--r--mysql-test/include/ps_modify.inc4
-rw-r--r--mysql-test/include/query_cache.inc2
-rw-r--r--mysql-test/include/varchar.inc12
-rw-r--r--mysql-test/r/create.result2
-rw-r--r--mysql-test/r/rpl_sp.result4
-rw-r--r--mysql-test/r/sp.result16
-rw-r--r--mysql-test/t/auto_increment.test10
-rw-r--r--mysql-test/t/create.test20
-rw-r--r--mysql-test/t/create_select_tmp.test8
-rw-r--r--mysql-test/t/ctype_ucs2_def.test2
-rw-r--r--mysql-test/t/ctype_utf8.test90
-rw-r--r--mysql-test/t/delayed.test2
-rw-r--r--mysql-test/t/heap.test28
-rw-r--r--mysql-test/t/heap_btree.test2
-rw-r--r--mysql-test/t/heap_hash.test6
-rw-r--r--mysql-test/t/innodb.test28
-rw-r--r--mysql-test/t/insert_select.test4
-rw-r--r--mysql-test/t/insert_update.test4
-rw-r--r--mysql-test/t/join_outer.test2
-rw-r--r--mysql-test/t/key.test12
-rw-r--r--mysql-test/t/merge.test4
-rw-r--r--mysql-test/t/myisam.test4
-rw-r--r--mysql-test/t/ndb_basic.test6
-rw-r--r--mysql-test/t/ndb_charset.test18
-rw-r--r--mysql-test/t/ndb_index_unique.test14
-rw-r--r--mysql-test/t/ndb_insert.test2
-rw-r--r--mysql-test/t/ndb_replace.test2
-rw-r--r--mysql-test/t/ndb_update.test4
-rw-r--r--mysql-test/t/replace.test4
-rw-r--r--mysql-test/t/rpl_err_ignoredtable.test2
-rw-r--r--mysql-test/t/rpl_ndb_do_table.test4
-rw-r--r--mysql-test/t/rpl_row_create_table.test4
-rw-r--r--mysql-test/t/rpl_sp.test4
-rw-r--r--mysql-test/t/show_check.test2
-rw-r--r--mysql-test/t/sp-error.test2
-rw-r--r--mysql-test/t/sp.test22
-rw-r--r--mysql-test/t/sp_trans.test2
-rw-r--r--mysql-test/t/sp_trans_log.test2
-rw-r--r--mysql-test/t/temp_table.test2
-rw-r--r--mysql-test/t/type_binary.test2
-rw-r--r--mysql-test/t/type_bit.test2
-rw-r--r--mysql-test/t/type_bit_innodb.test2
-rw-r--r--mysql-test/t/type_blob.test4
-rw-r--r--mysql-test/t/type_varchar.test2
57 files changed, 235 insertions, 235 deletions
diff --git a/mysql-test/extra/binlog_tests/insert_select-binlog.test b/mysql-test/extra/binlog_tests/insert_select-binlog.test
index b09eebcb996..61f9bee04bf 100644
--- a/mysql-test/extra/binlog_tests/insert_select-binlog.test
+++ b/mysql-test/extra/binlog_tests/insert_select-binlog.test
@@ -13,7 +13,7 @@ insert into t1 values(2);
create table t2(a int);
insert into t2 values(1),(2);
reset master;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 select * from t2;
# The above should produce an error, but still be in the binlog;
# verify the binlog :
@@ -27,7 +27,7 @@ drop table t1, t2;
create table t1(a int);
insert into t1 values(1),(1);
reset master;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
create table t2(unique(a)) select a from t1;
# The above should produce an error, *and* not appear in the binlog
let $VERSION=`select version()`;
diff --git a/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test b/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test
index d6ccc403ce9..891f15d01b1 100644
--- a/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test
+++ b/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test
@@ -246,12 +246,12 @@ set autocommit=0;
CREATE TABLE t1 (a int, b int) engine=myisam;
reset master;
INSERT INTO t1 values (1,1),(1,2);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
CREATE TABLE t2 (primary key (a)) engine=innodb select * from t1;
# This should give warning
DROP TABLE if exists t2;
INSERT INTO t1 values (3,3);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
CREATE TEMPORARY TABLE t2 (primary key (a)) engine=innodb select * from t1;
ROLLBACK;
# This should give warning
@@ -259,12 +259,12 @@ DROP TABLE IF EXISTS t2;
CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb;
INSERT INTO t1 VALUES (4,4);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
CREATE TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1;
SELECT * from t2;
TRUNCATE table t2;
INSERT INTO t1 VALUES (5,5);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
INSERT INTO t2 select * from t1;
SELECT * FROM t2;
DROP TABLE t2;
@@ -274,25 +274,25 @@ CREATE TEMPORARY TABLE t2 (a int, b int, primary key (a)) engine=innodb ;
INSERT INTO t1 values (7,7);
ROLLBACK;
INSERT INTO t1 values (8,8);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1;
COMMIT;
INSERT INTO t1 values (9,9);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1;
ROLLBACK;
SELECT * from t2;
TRUNCATE table t2;
INSERT INTO t1 values (10,10);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
INSERT INTO t2 select * from t1;
SELECT * from t1;
INSERT INTO t2 values (100,100);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1;
COMMIT;
INSERT INTO t2 values (101,101);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1;
ROLLBACK;
SELECT * from t2;
diff --git a/mysql-test/extra/rpl_tests/rpl_auto_increment.test b/mysql-test/extra/rpl_tests/rpl_auto_increment.test
index 410aeecb7ee..1fa3cf034f6 100644
--- a/mysql-test/extra/rpl_tests/rpl_auto_increment.test
+++ b/mysql-test/extra/rpl_tests/rpl_auto_increment.test
@@ -76,7 +76,7 @@ insert into t1 values (NULL),(5),(NULL),(NULL);
insert into t1 values (500),(NULL),(502),(NULL),(NULL);
select * from t1;
set @@insert_id=600;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values(600),(NULL),(NULL);
set @@insert_id=600;
insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL);
@@ -119,7 +119,7 @@ set auto_increment_increment=11;
set auto_increment_offset=4;
insert into t1 values(null);
insert into t1 values(null);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values(null);
select a, mod(a-@@auto_increment_offset,@@auto_increment_increment) from t1 order by a;
diff --git a/mysql-test/extra/rpl_tests/rpl_foreign_key.test b/mysql-test/extra/rpl_tests/rpl_foreign_key.test
index 8558650fd04..583f2d85554 100644
--- a/mysql-test/extra/rpl_tests/rpl_foreign_key.test
+++ b/mysql-test/extra/rpl_tests/rpl_foreign_key.test
@@ -22,8 +22,8 @@ SET TIMESTAMP=1000000000;
CREATE TABLE t3 ( a INT UNIQUE );
SET FOREIGN_KEY_CHECKS=0;
# Had to add 1022 for run with ndb as ndb uses different
-# error and error code for error ER_DUP_ENTRY_WITH_KEY_NAME. Bug 16677
---error 1022, ER_DUP_ENTRY_WITH_KEY_NAME
+# error and error code for error ER_DUP_ENTRY. Bug 16677
+--error 1022, ER_DUP_ENTRY
INSERT INTO t3 VALUES (1),(1);
sync_slave_with_master;
diff --git a/mysql-test/extra/rpl_tests/rpl_insert_delayed.test b/mysql-test/extra/rpl_tests/rpl_insert_delayed.test
index 2cba7ab64c8..11856953959 100644
--- a/mysql-test/extra/rpl_tests/rpl_insert_delayed.test
+++ b/mysql-test/extra/rpl_tests/rpl_insert_delayed.test
@@ -42,7 +42,7 @@ if ($binlog_format_statement)
{
# statement below will be converted to non-delayed INSERT and so
# will stop at first error, guaranteeing replication.
- --error ER_DUP_ENTRY_WITH_KEY_NAME
+ --error ER_DUP_ENTRY
insert delayed into t1 values(10, "is Bond"), (20, "James Bond");
}
if (!$binlog_format_statement)
@@ -64,7 +64,7 @@ if ($binlog_format_statement)
# statement below will be converted to non-delayed INSERT and so
# will be binlogged with its ER_DUP_ENTRY error code, guaranteeing
# replication (slave will hit the same error code and so be fine).
- --error ER_DUP_ENTRY_WITH_KEY_NAME
+ --error ER_DUP_ENTRY
insert delayed into t1 values(20, "is Bond"), (10, "James Bond");
}
if (!$binlog_format_statement)
diff --git a/mysql-test/extra/rpl_tests/rpl_insert_id.test b/mysql-test/extra/rpl_tests/rpl_insert_id.test
index bd2abbac6de..8ee98e0bc76 100644
--- a/mysql-test/extra/rpl_tests/rpl_insert_id.test
+++ b/mysql-test/extra/rpl_tests/rpl_insert_id.test
@@ -97,7 +97,7 @@ SET TIMESTAMP=1000000000;
CREATE TABLE t1 ( a INT UNIQUE );
SET FOREIGN_KEY_CHECKS=0;
# Duplicate Key Errors
---error 1022, ER_DUP_ENTRY_WITH_KEY_NAME
+--error 1022, ER_DUP_ENTRY
INSERT INTO t1 VALUES (1),(1);
sync_slave_with_master;
connection master;
diff --git a/mysql-test/extra/rpl_tests/rpl_insert_id_pk.test b/mysql-test/extra/rpl_tests/rpl_insert_id_pk.test
index 5a646bd49e3..844f93d0906 100644
--- a/mysql-test/extra/rpl_tests/rpl_insert_id_pk.test
+++ b/mysql-test/extra/rpl_tests/rpl_insert_id_pk.test
@@ -80,7 +80,7 @@ SET TIMESTAMP=1000000000;
CREATE TABLE t1 ( a INT UNIQUE );
SET FOREIGN_KEY_CHECKS=0;
# Duplicate Key Errors codes
---error 1022, ER_DUP_ENTRY_WITH_KEY_NAME
+--error 1022, ER_DUP_ENTRY
INSERT INTO t1 VALUES (1),(1);
sync_slave_with_master;
connection master;
diff --git a/mysql-test/extra/rpl_tests/rpl_loaddata.test b/mysql-test/extra/rpl_tests/rpl_loaddata.test
index dea83f65898..f4dc655c9b2 100644
--- a/mysql-test/extra/rpl_tests/rpl_loaddata.test
+++ b/mysql-test/extra/rpl_tests/rpl_loaddata.test
@@ -131,7 +131,7 @@ connection master;
reset master;
eval create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60),
unique(day)) engine=$engine_type; # no transactions
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
'\n##\n' starting by '>' ignore 1 lines;
@@ -147,7 +147,7 @@ select * from t2;
alter table t2 drop key day;
connection master;
delete from t2;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
'\n##\n' starting by '>' ignore 1 lines;
@@ -161,7 +161,7 @@ drop table t1;
# BUG#17233 LOAD DATA INFILE: failure causes mysqld dbug_assert, binlog not flushed
CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
LOAD DATA INFILE "../std_data_ln/words.dat" INTO TABLE t1;
--disable warnings
diff --git a/mysql-test/extra/rpl_tests/rpl_row_basic.test b/mysql-test/extra/rpl_tests/rpl_row_basic.test
index 9ba06096faf..055e1eeb2d8 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_basic.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test
@@ -195,11 +195,11 @@ eval CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = $t
# First we make sure that the constraints are correctly set.
INSERT INTO t8 VALUES (99,99,99);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
INSERT INTO t8 VALUES (99,22,33);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
INSERT INTO t8 VALUES (11,99,33);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
INSERT INTO t8 VALUES (11,22,99);
SELECT * FROM t8 ORDER BY a;
diff --git a/mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test b/mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test
index 654cb523f74..89d57385d7b 100644
--- a/mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test
+++ b/mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test
@@ -19,7 +19,7 @@ set sql_log_bin=0;
insert into t1 values(2);
set sql_log_bin=1;
save_master_pos;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values(1),(2);
drop table t1;
save_master_pos;
diff --git a/mysql-test/extra/rpl_tests/rpl_trig004.test b/mysql-test/extra/rpl_tests/rpl_trig004.test
index 5144943bc64..45cb11f2787 100644
--- a/mysql-test/extra/rpl_tests/rpl_trig004.test
+++ b/mysql-test/extra/rpl_tests/rpl_trig004.test
@@ -29,7 +29,7 @@ delimiter ;//
INSERT INTO test.t2 VALUES (1, 0.0);
# Expect duplicate error 1022 == ndb
---error 1022, ER_DUP_ENTRY_WITH_KEY_NAME
+--error 1022, ER_DUP_ENTRY
INSERT INTO test.t2 VALUES (1, 0.0);
#show binlog events;
diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc
index 3c6628091ec..98323e44e97 100644
--- a/mysql-test/include/mix1.inc
+++ b/mysql-test/include/mix1.inc
@@ -649,24 +649,24 @@ drop table t1;
CREATE TABLE t1 (a int, b int);
insert into t1 values (1,1),(1,2);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
CREATE TABLE t2 (primary key (a)) select * from t1;
# This should give warning
drop table if exists t2;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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));
BEGIN;
INSERT INTO t2 values(100,100);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
CREATE TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1;
SELECT * from t2;
ROLLBACK;
SELECT * from t2;
TRUNCATE table t2;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
INSERT INTO t2 select * from t1;
SELECT * from t2;
drop table t2;
@@ -674,19 +674,19 @@ drop table t2;
CREATE TEMPORARY TABLE t2 (a int, b int, primary key (a));
BEGIN;
INSERT INTO t2 values(100,100);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1;
SELECT * from t2;
COMMIT;
BEGIN;
INSERT INTO t2 values(101,101);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1;
SELECT * from t2;
ROLLBACK;
SELECT * from t2;
TRUNCATE table t2;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
INSERT INTO t2 select * from t1;
SELECT * from t2;
drop table t1,t2;
diff --git a/mysql-test/include/mix2.inc b/mysql-test/include/mix2.inc
index 76666cb7bc0..b4c4a9b8836 100644
--- a/mysql-test/include/mix2.inc
+++ b/mysql-test/include/mix2.inc
@@ -96,7 +96,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 ER_DUP_ENTRY_WITH_KEY_NAME,1022
+-- error ER_DUP_ENTRY,1022
update t1 set id=1024 where id=1009;
select * from t1;
update ignore t1 set id=id+1; # This will change all rows
@@ -179,13 +179,13 @@ commit;
select n, "after commit" from t1;
commit;
insert into t1 values (5);
--- error ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
insert into t1 values (4);
commit;
select n, "after commit" from t1;
set autocommit=1;
insert into t1 values (6);
--- error ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
insert into t1 values (4);
select n from t1;
set autocommit=0;
@@ -259,7 +259,7 @@ drop table t1;
eval CREATE TABLE t1 (id char(8) not null primary key, val int not null) engine=$engine_type;
insert into t1 values ('pippo', 12);
--- error ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
insert into t1 values ('pippo', 12); # Gives error
delete from t1;
delete from t1 where id = 'pippo';
@@ -390,9 +390,9 @@ eval CREATE TABLE t1 (
insert into t1 (ggid,passwd) values ('test1','xxx');
insert into t1 (ggid,passwd) values ('test2','yyy');
--- error ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
insert into t1 (ggid,passwd) values ('test2','this will fail');
--- error ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
insert into t1 (ggid,id) values ('this will fail',1);
select * from t1 where ggid='test1';
@@ -401,7 +401,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 ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
update t1 set id=100,ggid='test2' where id=1;
select * from t1;
select * from t1 where id=1;
@@ -572,7 +572,7 @@ drop table t1;
eval 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=$engine_type;
insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
LOCK TABLES t1 WRITE;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values (99,1,2,'D'),(1,1,2,'D');
select id from t1;
select id from t1;
@@ -583,7 +583,7 @@ eval create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 c
insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
LOCK TABLES t1 WRITE;
begin;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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');
@@ -1513,7 +1513,7 @@ eval create table t1 (rowid int not null auto_increment, val int not null,primar
key (rowid), unique(val)) engine=$engine_type;
replace into t1 (val) values ('1'),('2');
replace into t1 (val) values ('1'),('2');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 (val) values ('1'),('2');
select * from t1;
drop table t1;
@@ -1528,7 +1528,7 @@ eval create table t1 (a int not null auto_increment primary key, val int) engine
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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 (val) values (1);
select * from t1;
drop table t1;
@@ -1894,13 +1894,13 @@ eval create table t3 (s1 varchar(2) binary,primary key (s1)) engine=$engine_type
eval create table t4 (s1 char(2) binary,primary key (s1)) engine=$engine_type;
insert into t1 values (0x41),(0x4120),(0x4100);
--- error ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
insert into t2 values (0x41),(0x4120),(0x4100);
insert into t2 values (0x41),(0x4120);
--- error ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
insert into t3 values (0x41),(0x4120),(0x4100);
insert into t3 values (0x41),(0x4100);
--- error ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
insert into t4 values (0x41),(0x4120),(0x4100);
insert into t4 values (0x41),(0x4100);
select hex(s1) from t1;
diff --git a/mysql-test/include/ps_modify.inc b/mysql-test/include/ps_modify.inc
index 9e38671263f..f66f888261d 100644
--- a/mysql-test/include/ps_modify.inc
+++ b/mysql-test/include/ps_modify.inc
@@ -193,7 +193,7 @@ prepare stmt1 from 'insert into t1 values(6, ? )';
execute stmt1 using @arg00;
select a,b from t1 where b = @arg00;
# the second insert fails, because the first column is primary key
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
execute stmt1 using @arg00;
set @arg00=NULL ;
prepare stmt1 from 'insert into t1 values(0, ? )';
@@ -272,7 +272,7 @@ execute stmt1 using @arg00, @arg01;
select * from t1 order by a;
set @arg00=81 ;
set @arg01=1 ;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
execute stmt1 using @arg00, @arg01;
## insert, autoincrement column and ' SELECT LAST_INSERT_ID() '
diff --git a/mysql-test/include/query_cache.inc b/mysql-test/include/query_cache.inc
index b54976886bd..fdd6bc50eae 100644
--- a/mysql-test/include/query_cache.inc
+++ b/mysql-test/include/query_cache.inc
@@ -90,7 +90,7 @@ delete from t3 where t1_id = 1 and t2_id = 1;
select t1.* from t1, t2, t3 where t3.state & 1 = 0 and t3.t1_id = t1.id and t3.t2_id = t2.id and t1.id = 1 order by t1.a asc;
begin;
insert into t3 VALUES ( NULL, 1, 1, 2 );
--- error ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
insert into t3 VALUES ( NULL, 1, 1, 2 );
commit;
select t1.* from t1, t2, t3 where t3.state & 1 = 0 and t3.t1_id = t1.id and t3.t2_id = t2.id and t1.id = 1 order by t1.a asc;
diff --git a/mysql-test/include/varchar.inc b/mysql-test/include/varchar.inc
index 2d683a15030..15306ed8385 100644
--- a/mysql-test/include/varchar.inc
+++ b/mysql-test/include/varchar.inc
@@ -81,7 +81,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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
alter table t1 add unique(v);
alter table t1 add key(v);
select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a';
@@ -179,17 +179,17 @@ drop table t1;
create table t1 (a char(10), unique (a));
insert into t1 values ('a ');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('a ');
alter table t1 modify a varchar(10);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('a '),('a '),('a '),('a ');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('a ');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('a ');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('a ');
update t1 set a='a ' where a like 'a%';
select concat(a,'.') from t1;
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index f570f6eb75c..e73b74ccac3 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -285,7 +285,7 @@ ERROR 23000: Duplicate entry '3' for key 'PRIMARY'
show warnings;
Level Code Message
Note 1050 Table 't1' already exists
-Error 1582 Duplicate entry '3' for key 'PRIMARY'
+Error 1062 Duplicate entry '3' for key 'PRIMARY'
show status like "Opened_tables";
Variable_name Value
Opened_tables 2
diff --git a/mysql-test/r/rpl_sp.result b/mysql-test/r/rpl_sp.result
index 6dc3be94e32..208c46c5fab 100644
--- a/mysql-test/r/rpl_sp.result
+++ b/mysql-test/r/rpl_sp.result
@@ -107,7 +107,7 @@ call foo4();
ERROR 23000: Duplicate entry '20' for key 'a'
show warnings;
Level Code Message
-Error 1582 Duplicate entry '20' for key 'a'
+Error 1062 Duplicate entry '20' for key 'a'
select * from t2;
a
20
@@ -241,7 +241,7 @@ return 10;
end|
do fn1(100);
Warnings:
-Error 1582 Duplicate entry '100' for key 'a'
+Error 1062 Duplicate entry '100' for key 'a'
select fn1(20);
ERROR 23000: Duplicate entry '20' for key 'a'
select * from t2;
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 86ede7a8f00..6c0330537ca 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -1497,10 +1497,10 @@ insert into t3 (a) values (1)|
create procedure h_ee()
deterministic
begin
-declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
+declare continue handler for 1062 -- ER_DUP_ENTRY
select 'Outer (bad)' as 'h_ee';
begin
-declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
+declare continue handler for 1062 -- ER_DUP_ENTRY
select 'Inner (good)' as 'h_ee';
insert into t3 values (1);
end;
@@ -1508,7 +1508,7 @@ end|
create procedure h_es()
deterministic
begin
-declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
+declare continue handler for 1062 -- ER_DUP_ENTRY
select 'Outer (good)' as 'h_es';
begin
-- integrity constraint violation
@@ -1545,7 +1545,7 @@ end|
create procedure h_ex()
deterministic
begin
-declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
+declare continue handler for 1062 -- ER_DUP_ENTRY
select 'Outer (good)' as 'h_ex';
begin
declare continue handler for sqlexception
@@ -1560,7 +1560,7 @@ begin
declare continue handler for sqlstate '23000'
select 'Outer (bad)' as 'h_se';
begin
-declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
+declare continue handler for 1062 -- ER_DUP_ENTRY
select 'Inner (good)' as 'h_se';
insert into t3 values (1);
end;
@@ -1700,7 +1700,7 @@ begin
declare continue handler for sqlexception
select 'Outer (bad)' as 'h_xe';
begin
-declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
+declare continue handler for 1062 -- ER_DUP_ENTRY
select 'Inner (good)' as 'h_xe';
insert into t3 values (1);
end;
@@ -4705,10 +4705,10 @@ insert into t3 values (1)|
create procedure bug15011()
deterministic
begin
-declare continue handler for 1582
+declare continue handler for 1062
select 'Outer' as 'Handler';
begin
-declare continue handler for 1582
+declare continue handler for 1062
select 'Inner' as 'Handler';
insert into t3 values (1);
end;
diff --git a/mysql-test/t/auto_increment.test b/mysql-test/t/auto_increment.test
index f9a4a49d447..99e9b783d55 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 set i = 254;
select last_insert_id();
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 fb589a5d11e..149982e23c5 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
create table if not exists t1 select 3 as 'a',3 as 'b';
show warnings;
show status like "Opened_tables";
@@ -698,7 +698,7 @@ create table t1 (a int);
create table if not exists t1 select 1 as a, 2 as b;
drop table t1;
# Finally error which happens during insert
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
create table t1 (primary key (a)) (select 1 as a) union all (select 1 as a);
# What happens if table already exists ?
create table t1 (i int);
@@ -712,7 +712,7 @@ create table t1 select coalesce('a' collate latin1_swedish_ci,'b' collate latin1
select * from t1;
# Error which happens during insertion of rows
alter table t1 add primary key (i);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
create table if not exists t1 (select 2 as i) union all (select 2 as i);
select * from t1;
drop table t1;
@@ -798,30 +798,30 @@ drop table t1;
CREATE TABLE t1 (a int, b int);
insert into t1 values (1,1),(1,2);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
CREATE TABLE t2 (primary key (a)) select * from t1;
# This should give warning
drop table if exists t2;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
CREATE TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1;
SELECT * from t2;
TRUNCATE table t2;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
INSERT INTO t2 select * from t1;
SELECT * from t2;
drop table t2;
CREATE TEMPORARY TABLE t2 (a int, b int, primary key (a));
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1;
SELECT * from t2;
TRUNCATE table t2;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 eacea1ac376..a61f9f2466c 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
--error 1146
select * from t2;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
--error 1146
select * from t2;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1;
--error 1146
select * from t2;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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_ucs2_def.test b/mysql-test/t/ctype_ucs2_def.test
index dcd8af0bbe1..050710b208b 100644
--- a/mysql-test/t/ctype_ucs2_def.test
+++ b/mysql-test/t/ctype_ucs2_def.test
@@ -25,7 +25,7 @@ CREATE TABLE t1(col1 VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL,
col2 VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL,
UNIQUE KEY key1 USING HASH (col1, col2)) ENGINE=MEMORY;
INSERT INTO t1 VALUES('A', 'A'), ('B', 'B'), ('C', 'C');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
INSERT INTO t1 VALUES('A ', 'A ');
DROP TABLE t1;
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index 7db651a2a24..03b3df44c73 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -230,9 +230,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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('aaaaaaaaaaa');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('aaaaaaaaaaaa');
insert into t1 values (repeat('b',20));
select c c1 from t1 where c='1';
@@ -254,9 +254,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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('aaaaaaaaaaa');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('aaaaaaaaaaaa');
insert into t1 values (repeat('b',20));
select c c1 from t1 where c='1';
@@ -276,23 +276,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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('aaa');
insert into t1 values ('b');
insert into t1 values ('bb');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('bbb');
insert into t1 values ('а');
insert into t1 values ('аа');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('ааа');
insert into t1 values ('б');
insert into t1 values ('бб');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('ббб');
insert into t1 values ('ꪪ');
insert into t1 values ('ꪪꪪ');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('ꪪꪪꪪ');
drop table t1;
#
@@ -305,23 +305,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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('aaa');
insert into t1 values ('b');
insert into t1 values ('bb');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('bbb');
insert into t1 values ('а');
insert into t1 values ('аа');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('ааа');
insert into t1 values ('б');
insert into t1 values ('бб');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('ббб');
insert into t1 values ('ꪪ');
insert into t1 values ('ꪪꪪ');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('ꪪꪪꪪ');
drop table t1;
#
@@ -334,14 +334,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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('aa');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('aaa');
insert into t1 values ('б');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('бб');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('ббб');
select c as c_all from t1 order by c;
select c as c_a from t1 where c='a';
@@ -358,14 +358,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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('aa');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('aaa');
insert into t1 values ('б');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('бб');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('ббб');
select c as c_all from t1 order by c;
select c as c_a from t1 where c='a';
@@ -383,14 +383,14 @@ unique key a (c(1))
) engine=innodb;
--enable_warnings
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('aa');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('aaa');
insert into t1 values ('б');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('бб');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('ббб');
select c as c_all from t1 order by c;
select c as c_a from t1 where c='a';
@@ -404,9 +404,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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('aaaaaaaaaaa');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('aaaaaaaaaaaa');
insert into t1 values (repeat('b',20));
select c c1 from t1 where c='1';
@@ -427,23 +427,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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('aaa');
insert into t1 values ('b');
insert into t1 values ('bb');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('bbb');
insert into t1 values ('а');
insert into t1 values ('аа');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('ааа');
insert into t1 values ('б');
insert into t1 values ('бб');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('ббб');
insert into t1 values ('ꪪ');
insert into t1 values ('ꪪꪪ');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('ꪪꪪꪪ');
drop table t1;
@@ -457,14 +457,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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('aa');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('aaa');
insert into t1 values ('б');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('бб');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('ббб');
select c as c_all from t1 order by c;
select c as c_a from t1 where c='a';
@@ -481,14 +481,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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('aa');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('aaa');
insert into t1 values ('б');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('бб');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('ббб');
select c as c_all from t1 order by c;
select c as c_a from t1 where c='a';
@@ -506,14 +506,14 @@ unique key a (c(1))
) engine=innodb;
--enable_warnings
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('aa');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('aaa');
insert into t1 values ('б');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('бб');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 a44288da9ec..396c06f43e7 100644
--- a/mysql-test/t/delayed.test
+++ b/mysql-test/t/delayed.test
@@ -184,7 +184,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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 b47a5fc2033..3f91b9966e7 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('a ');
alter table t1 modify a varchar(10);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('a '),('a '),('a '),('a ');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('a ');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('a ');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('a ');
alter table t1 modify a varchar(10);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('a '),('a '),('a '),('a ');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('a ');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values ('a ');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 4e7102806d6..0e8cc71dab5 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 3b9262e73f1..1e3491f89a9 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
INSERT INTO t1 VALUES (1,3);
DROP TABLE t1;
@@ -272,14 +272,14 @@ CREATE TABLE t1(col1 VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
col2 VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
UNIQUE KEY key1 USING HASH (col1, col2)) ENGINE=MEMORY;
INSERT INTO t1 VALUES('A', 'A');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
INSERT INTO t1 VALUES('A ', 'A ');
DROP TABLE t1;
CREATE TABLE t1(col1 VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
col2 VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
UNIQUE KEY key1 USING HASH (col1, col2)) ENGINE=MEMORY;
INSERT INTO t1 VALUES('A', 'A');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
INSERT INTO t1 VALUES('A ', 'A ');
DROP TABLE t1;
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index 439a7adc669..7af9cf09f79 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 ER_DUP_ENTRY_WITH_KEY_NAME,1022
+-- error ER_DUP_ENTRY,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 ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
insert into t1 values (4);
commit;
select n, "after commit" from t1;
set autocommit=1;
insert into t1 values (6);
--- error ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
insert into t1 (ggid,passwd) values ('test2','this will fail');
--- error ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 (val) values (1);
select * from t1;
drop table t1;
@@ -1744,13 +1744,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 ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
insert into t2 values (0x41),(0x4120),(0x4100);
insert into t2 values (0x41),(0x4120);
--- error ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
insert into t3 values (0x41),(0x4120),(0x4100);
insert into t3 values (0x41),(0x4100);
--- error ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
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 95a55b732c5..655b43d65ad 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 ff6ddf35c7b..f75b5aedffe 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 ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
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 708a618f10f..35aec71ebb8 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 99736e0f11f..f1eb8e68b49 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert t1 (c) values ('cc22');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert t1 (t) values ('ttt22');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert t1 (c) values (0xD0B1212322D0B1D0B1D0B1D0B1D0B1);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 69e0b19ebf0..e136dc0ca3c 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert t5 values (1,1);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 e66534f0cb9..b06fd536f45 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
update t1 set b='b ' where a > 1;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 (b) values ('b');
select * from t1;
delete from t1 where b='b';
diff --git a/mysql-test/t/ndb_basic.test b/mysql-test/t/ndb_basic.test
index 792006af621..f8b83b2b9ec 100644
--- a/mysql-test/t/ndb_basic.test
+++ b/mysql-test/t/ndb_basic.test
@@ -807,7 +807,7 @@ drop table t1,t2;
# insert ignore
create table t1 (a int not null primary key, b int not null) engine=ndb;
insert into t1 values (1,10), (2,20), (3,30);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 set a=1, b=100;
insert ignore into t1 set a=1, b=100;
select * from t1 order by a;
@@ -820,12 +820,12 @@ create table t1 (a int not null primary key, b int not null) engine=ndb;
create table t2 (c int not null primary key, d int not null) engine=ndb;
insert into t1 values (1,10), (2,10), (3,30), (4, 30);
insert into t2 values (1,10), (2,10), (3,30), (4, 30);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
update t1 set a = 1 where a = 3;
select * from t1 order by a;
update t1 set b = 1 where a > 1 order by a desc limit 1;
select * from t1 order by a;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
update t1,t2 set a = 1, c = 1 where a = 3 and c = 3;
select * from t1 order by a;
update ignore t1,t2 set a = 1, c = 1 where a = 3 and c = 3;
diff --git a/mysql-test/t/ndb_charset.test b/mysql-test/t/ndb_charset.test
index 2cdb1972225..2d9f66564bc 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values('aaa');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
insert into t1 values('b');
--- error ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values(2, 'aaa');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
insert into t1 values(99,'b');
--- error ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+#-- error ER_DUP_ENTRY
#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 e6d3fbb87a0..78757c3bcf7 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 ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
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 ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
insert into t2 values(8, 2, 3);
select * from t2 order by a;
delete from t2 where a = 1;
@@ -91,7 +91,7 @@ select * from t2 order by a;
# Bug #24818 CREATE UNIQUE INDEX (...) USING HASH on a NDB table crashes mysqld
create unique index bi using hash on t2(b);
--- error ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
insert into t2 values(9, 3, 1);
alter table t2 drop index bi;
insert into t2 values(9, 3, 1);
@@ -154,7 +154,7 @@ insert into t1 values (-1,NULL), (0,0), (1,NULL),(2,2),(3,NULL),(4,4);
select * from t1 order by pk;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values (5,0);
select * from t1 order by pk;
delete from t1 where a = 0;
@@ -173,7 +173,7 @@ insert into t2 values (-1,1,17,NULL),(0,NULL,18,NULL),(1,3,19,'abc');
select * from t2 order by pk;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t2 values(2,3,19,'abc');
select * from t2 order by pk;
delete from t2 where c IS NOT NULL;
@@ -342,7 +342,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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 092bebe2a37..bffb2edb54c 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 fcbefe710ca..aa2072b98dd 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 335c43bc796..73a0ebc69cb 100644
--- a/mysql-test/t/ndb_update.test
+++ b/mysql-test/t/ndb_update.test
@@ -23,11 +23,11 @@ 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
UPDATE t1 set pk1 = 4 where pk1 = 2;
UPDATE IGNORE t1 set pk1 = 4 where pk1 = 2;
select * from t1 order by pk1;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4;
UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4;
select * from t1 order by pk1;
diff --git a/mysql-test/t/replace.test b/mysql-test/t/replace.test
index 4e88379241c..ff910bdf5cf 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values (0,"error");
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 4d4be6ae786..4e06a6a7096 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, ER_DUP_ENTRY_WITH_KEY_NAME
+--error 1022, ER_DUP_ENTRY
insert into t1 values (1),(1);
insert into t4 values (1),(2);
save_master_pos;
diff --git a/mysql-test/t/rpl_ndb_do_table.test b/mysql-test/t/rpl_ndb_do_table.test
index 700c79766e1..55a40d85172 100644
--- a/mysql-test/t/rpl_ndb_do_table.test
+++ b/mysql-test/t/rpl_ndb_do_table.test
@@ -32,11 +32,11 @@ SELECT COUNT(*) FROM t1;
#
connection master;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
INSERT INTO t1 VALUES (3, repeat('bad',1));
connection slave;
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
INSERT INTO t1 VALUES (3, repeat('bad too',1));
# cleanup
diff --git a/mysql-test/t/rpl_row_create_table.test b/mysql-test/t/rpl_row_create_table.test
index d1b26f9e3f4..be10d48b757 100644
--- a/mysql-test/t/rpl_row_create_table.test
+++ b/mysql-test/t/rpl_row_create_table.test
@@ -67,7 +67,7 @@ SELECT * FROM t6 ORDER BY a,b,c;
connection master;
# Test for erroneous constructions
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
# Shouldn't be written to the binary log
--replace_column 1 # 4 #
@@ -76,7 +76,7 @@ SHOW BINLOG EVENTS FROM 1098;
# Test that INSERT-SELECT works the same way as for SBR.
CREATE TABLE t7 (a INT, b INT UNIQUE);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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_sp.test b/mysql-test/t/rpl_sp.test
index 84154e549b8..f363b64558a 100644
--- a/mysql-test/t/rpl_sp.test
+++ b/mysql-test/t/rpl_sp.test
@@ -153,7 +153,7 @@ create procedure foo4()
delimiter ;|
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
call foo4();
show warnings;
@@ -308,7 +308,7 @@ delimiter ;|
do fn1(100);
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
select fn1(20);
select * from t2;
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index 60e680c63f3..09b21db062f 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 a6005c3611a..69b1f77aa35 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
call bug3279(@x)|
select @x|
drop procedure bug3279|
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index 08a01be0fd2..8972e8bae4a 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -1767,11 +1767,11 @@ insert into t3 (a) values (1)|
create procedure h_ee()
deterministic
begin
- declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
+ declare continue handler for 1062 -- ER_DUP_ENTRY
select 'Outer (bad)' as 'h_ee';
begin
- declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
+ declare continue handler for 1062 -- ER_DUP_ENTRY
select 'Inner (good)' as 'h_ee';
insert into t3 values (1);
@@ -1781,7 +1781,7 @@ end|
create procedure h_es()
deterministic
begin
- declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
+ declare continue handler for 1062 -- ER_DUP_ENTRY
select 'Outer (good)' as 'h_es';
begin
@@ -1827,7 +1827,7 @@ end|
create procedure h_ex()
deterministic
begin
- declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
+ declare continue handler for 1062 -- ER_DUP_ENTRY
select 'Outer (good)' as 'h_ex';
begin
@@ -1846,7 +1846,7 @@ begin
select 'Outer (bad)' as 'h_se';
begin
- declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
+ declare continue handler for 1062 -- ER_DUP_ENTRY
select 'Inner (good)' as 'h_se';
insert into t3 values (1);
@@ -2019,7 +2019,7 @@ begin
select 'Outer (bad)' as 'h_xe';
begin
- declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
+ declare continue handler for 1062 -- ER_DUP_ENTRY
select 'Inner (good)' as 'h_xe';
insert into t3 values (1);
@@ -4511,7 +4511,7 @@ begin
select bug12379();
end|
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
select bug12379()|
select 1|
# statement-based binlogging will show warning which row-based won't;
@@ -4522,7 +4522,7 @@ select 2|
call bug12379_2()|
--enable_warnings
select 3|
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
call bug12379_3()|
select 4|
@@ -4604,7 +4604,7 @@ end|
call bug6127()|
select * from t3|
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
call bug6127()|
select * from t3|
set sql_mode=@sm|
@@ -5532,11 +5532,11 @@ insert into t3 values (1)|
create procedure bug15011()
deterministic
begin
- declare continue handler for 1582
+ declare continue handler for 1062
select 'Outer' as 'Handler';
begin
- declare continue handler for 1582
+ declare continue handler for 1062
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 a79f6c7e7e0..c07178b3230 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 values (bug10015_5(4)), (bug10015_5(5))|
select * from t1|
drop function bug10015_5|
diff --git a/mysql-test/t/sp_trans_log.test b/mysql-test/t/sp_trans_log.test
index 9b85981e2e1..447ec19b132 100644
--- a/mysql-test/t/sp_trans_log.test
+++ b/mysql-test/t/sp_trans_log.test
@@ -32,7 +32,7 @@ begin
end|
reset master|
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t2 values (bug23333(),1)|
--replace_column 2 # 5 # 6 #
show binlog events from 106 /* with fixes for #23333 will show there is the query */|
diff --git a/mysql-test/t/temp_table.test b/mysql-test/t/temp_table.test
index e10fd386bd3..d1ad7ab8ffa 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 ER_DUP_ENTRY_WITH_KEY_NAME
+-- error ER_DUP_ENTRY
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 a09e487f6cb..4d5a5312472 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 d0751549fae..ae725b3b235 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 4ee97782452..85c9127b2f6 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 e08b2de0f85..b6febf8e76d 100644
--- a/mysql-test/t/type_blob.test
+++ b/mysql-test/t/type_blob.test
@@ -333,9 +333,9 @@ drop table t1;
#
create table t1 (id integer primary key auto_increment, txt text not null, unique index txt_index (txt (20)));
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
insert into t1 (txt) values ('Chevy'), ('Chevy ');
---error ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
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 1b27a92e95c..1eb949a21e3 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 ER_DUP_ENTRY_WITH_KEY_NAME
+--error ER_DUP_ENTRY
alter table t1 add primary key (v);
drop table t1;
create table t1 (v varbinary(20));