1CREATE TABLE t(a INT PRIMARY KEY, b INT)ENGINE=InnoDB; 2INSERT INTO t VALUES(2,2),(4,4),(8,8),(16,16),(32,32); 3COMMIT; 4XA START '123'; 5INSERT INTO t VALUES(1,1); 6XA END '123'; 7XA PREPARE '123'; 8CONNECT con1,localhost,root,,; 9XA START '456'; 10INSERT INTO t VALUES(3,47),(5,67); 11UPDATE t SET b=2*b WHERE a BETWEEN 5 AND 8; 12XA END '456'; 13XA PREPARE '456'; 14CONNECT con2,localhost,root,,; 15XA START '789'; 16UPDATE t SET b=4*a WHERE a=32; 17XA END '789'; 18XA PREPARE '789'; 19CONNECT con3,localhost,root,,; 20# restart 21SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; 22SELECT * FROM t; 23a b 241 1 252 2 263 47 274 4 285 134 298 16 3016 16 3132 128 32COMMIT; 33# restart 34SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; 35SELECT * FROM t; 36a b 371 1 382 2 393 47 404 4 415 134 428 16 4316 16 4432 128 45COMMIT; 46XA RECOVER; 47formatID gtrid_length bqual_length data 481 3 0 123 491 3 0 456 501 3 0 789 51XA ROLLBACK '123'; 52XA ROLLBACK '456'; 53XA COMMIT '789'; 54SELECT * FROM t; 55a b 562 2 574 4 588 8 5916 16 6032 128 61DROP TABLE t; 62