mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#19978: INSERT .. ON DUPLICATE erroneously reports some records were
updated. INSERT ... ON DUPLICATE KEY UPDATE reports that a record was updated when the duplicate key occurs even if the record wasn't actually changed because the update values are the same as those in the record. Now the compare_record() function is used to check whether the record was changed and the update of a record reported only if the record differs from the original one.
This commit is contained in:
@ -265,4 +265,17 @@ INSERT INTO bug21774_2.t1 SELECT t1.* FROM t1;
|
||||
|
||||
DROP DATABASE bug21774_1;
|
||||
DROP DATABASE bug21774_2;
|
||||
USE test;
|
||||
|
||||
#
|
||||
# Bug#19978: INSERT .. ON DUPLICATE erroneously reports some records were
|
||||
# updated.
|
||||
#
|
||||
create table t1(f1 int primary key, f2 int);
|
||||
--enable_info
|
||||
insert into t1 values (1,1);
|
||||
insert into t1 values (1,1) on duplicate key update f2=1;
|
||||
insert into t1 values (1,1) on duplicate key update f2=2;
|
||||
--disable_info
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user