mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +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:
@ -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() '
|
||||
|
Reference in New Issue
Block a user