Bug #57978 | PREPARED transactions forget locks on server restart | ||
---|---|---|---|
Submitted: | 4 Nov 2010 13:07 | ||
Reporter: | Marko Mäkelä | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S4 (Feature request) |
Version: | 5.0+ | OS: | Any |
Assigned to: | Assigned Account | CPU Architecture: | Any |
Tags: | 2PC, innodb, locks, prepared, prepared XA |
[4 Nov 2010 13:07]
Marko Mäkelä
[20 Oct 2015 9:41]
Andrei Elkin
A rather severe implication of not durable gap locks are seen in XA case. A prepared XA trx survives the server restart. And while it does not let a concurrent trx (INSERT below) to run before the server restart, the blocking ceases after the server restart. That indicates improper isolation at post-restart. --connection one CREATE TABLE IF NOT EXISTS t (a INT) ENGINE=InnoDB; INSERT INTO t VALUES(1); XA START '1'; DELETE FROM t; XA END '1'; XA PREPARE '1'; --connection two --error 1205 INSERT INTO t VALUES(2); SELECT count(*) as 'one' from t; --source include/restart_mysqld.inc INSERT INTO t VALUES(2); SELECT count(*) as 'two' from t;