Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
2.5.18
-
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.