mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
b1b2689f17
This patch changes statement rollback for streaming replication. Previously, a statement rollback was turned into full transaction rollback in the case where the transaction had already replicated a fragment. This was introduced in the initial implementation of streaming replication due to the fact that we do not have a mechanism to perform a statement rollback on the applying side. This policy is however overly pessimistic, causing full rollbacks even in cases where a local statement rollback, would not require a statement rollback on the applying side. This happens to be case when the statement itself has not replicated any fragments. So the patch changes the condition that determines if a statement rollback should be turned into a full rollback accordingly. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
15 lines
407 B
Text
15 lines
407 B
Text
connection node_2;
|
|
connection node_1;
|
|
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
|
|
SET SESSION wsrep_trx_fragment_size=1;
|
|
START TRANSACTION;
|
|
INSERT INTO t1 VALUES (1);
|
|
SET SESSION wsrep_cluster_name = ' ';
|
|
ERROR HY000: Variable 'wsrep_cluster_name' is a GLOBAL variable and should be set with SET GLOBAL
|
|
INSERT INTO t1 VALUES (2);
|
|
COMMIT;
|
|
SELECT f1 AS expect_1_and_2 FROM t1;
|
|
expect_1_and_2
|
|
1
|
|
2
|
|
DROP TABLE t1;
|