mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user