Details
Description
Please see the repro file for instructions to reproduce.
I have verified the issue manually using two mysql terminals so I can confirm 100% repeatability.
I tested these DB engines:
- MySQL 5.6 - affected
- MySQL 5.7+ - NOT affected
- MariaDB 10.5.4, 10.7, 10.11, 11.0, 11.5, 11.7 - affected
(TLTR; all released MariaDB versions till today are affected and this issue is fixed in MySQL since v5.7 (at least since 5.7.15))
The issue and the expectation is, when transaction is turned off, only explicit "BEGIN/START TRANSACTION" command can start a new transaction. In the repro, transaction is turned off by a deadlock error (not sure if that is expected, but I would say that is fine after an error/deadlock), but then, COMMIT on a different connection starts a new transaction!
As this behaviour is highly dangerous I am marking this issue as CRITICAL.
Attachments
Issue Links
- causes
-
MDEV-37117 Assertion `!thd->transaction->xid_state.is_explicit_XA() || thd->lex->xa_opt == XA_ONE_PHASE' failed after deadlock between XA
-
- Closed
-
- relates to
-
MDEV-32652 Commit/rollback must emit an error when not inside active transaction
-
- In Review
-