Fixed a bug: deadlock without any locking, simple select and update (Bug #7975).
Backported from 5.0.3. innobase/row/row0ins.c: If the SQL-query will update or replace duplicate records we take X-lock for duplicate records. sql/ha_innodb.cc: INSERT ON DUPLICATE KEY UPDATE will also update duplicate records and we should take X-lock in this case for duplicate records.
Showing
Please register or sign in to comment