1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +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:
jimw@rama.(none)
2007-06-06 10:57:07 -07:00
parent 13adcedc90
commit 3c93323d28
58 changed files with 237 additions and 238 deletions

View File

@@ -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;