[MXS-3959] Transaction replay doesn't reset transaction on implicit commit Created: 2022-01-21  Updated: 2022-01-31  Resolved: 2022-01-31

Status: Closed
Project: MariaDB MaxScale
Component/s: readwritesplit
Affects Version/s: 2.5.18
Fix Version/s: 2.5.19, 6.2.2

Type: Bug Priority: Minor
Reporter: markus makela Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None


 Description   

When transaction_replay is enabled, the following transaction is not treated as two separate transactions but one big transaction:

CREATE TABLE test.t1(id INT);
BEGIN;
INSERT INTO test.t1 VALUES (1);
BEGIN;
INSERT INTO test.t1 VALUES (2);
-- Transaction is replayed here
COMMIT;
 
-- This will return three rows
SELECT * FROM test.t1;

If the transaction ends up being replayed after the second transaction has started, the first transaction will be executed twice and you'll end up with three rows in the table instead of two.


Generated at Thu Feb 08 04:25:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.