Commit Graph

2 Commits

Author SHA1 Message Date
2ab9aa9a94 Update 2.4.0 Change Date 2019-06-25 09:19:55 +03:00
9d1f094c45 MXS-2512 Add test for trx replay due to rollback
The test performs the following:

  CREATE tbl (x INT PRIMARY KEY)

  t1                            t2
  BEGIN                         BEGIN
  INSERT INTO tbl VALUES (1)
                                SELECT * FROM tbl FOR UPDATE

That will cause t2 to wait.

  INSERT INTO tbl VALUES (0)

That will cause t2 to be rolled back due to a deadlock.

Without transaction replay, the SELECT will return with an error.
With transaction replay, the deadlock error will be caught, the
transaction replayed and SELECT will return successfully.
2019-06-11 09:44:27 +03:00