UPDATE IGNORE and REPLACE always return " Deadlock found..."

Bug #1372296 reported by Philip Stoev
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Status tracked in 5.6
5.6
Confirmed
Undecided
Unassigned

Bug Description

In stock MySQL , UPDATE IGNORE and REPLACE are used to silence errors that may have happened during the DML. In Galera, those statements do not work and always return a "Deadlock found when trying to get lock; try restarting transaction".

Note that UPDATE IGNORE may not be safe to replicate. Here is a related mysql error message:

"Error: 1719 SQLSTATE: HY000 (ER_BINLOG_UNSAFE_UPDATE_IGNORE)

Message: UPDATE IGNORE is unsafe because the order in which rows are updated determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave."

Test cases:

create table t2 (f1 integer primary key) engine=innodb;
insert into t2 values (1),(2);
update ignore t2 set f1=2 where f1=1;
update t2 set f1=2 where f1=1;

create table t2 (f1 integer primary key) engine=innodb;
insert into t2 values (1);
replace into t2 values (1);

Revision history for this message
Philip Stoev (philip-stoev-f) wrote :

INSERT IGNORE is also affected.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.