forked from MariaDB/server
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-33850 : For Galera, create sequence with low cache got signal 6 …
…error: [ERROR] WSREP: FSM: no such a transition REPLICATING -> COMMITTED Problem was that transacton was BF-aborted after certification succeeded and transaction tried to rollback and during rollback binlog stmt cache containing sequence value reservations was written into binlog. Transaction must replay because certification succeeded but transaction must not be written into binlog yet, it will be done during commit after the replay. Fix is to skip binlog write if transaction must replay and in replay we need to reset binlog stmt cache.
- Loading branch information
1 parent
f1d7e0c
commit 3dec940
Showing
10 changed files
with
840 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 110 additions & 0 deletions
110
mysql-test/suite/galera/r/galera_sequences_bf_kill.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
connection node_2; | ||
connection node_1; | ||
connection node_1; | ||
CREATE SEQUENCE s INCREMENT=0 CACHE=10 ENGINE=InnoDB; | ||
CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 INT) ENGINE=InnoDB; | ||
INSERT INTO t1 VALUES (1, 0), (3, 0); | ||
connection node_1; | ||
START TRANSACTION; | ||
INSERT INTO t1 VALUES (4, next value for s); | ||
INSERT INTO t1 VALUES (5, next value for s); | ||
INSERT INTO t1 VALUES (6, next value for s); | ||
INSERT INTO t1 VALUES (7, next value for s); | ||
INSERT INTO t1 VALUES (8, next value for s); | ||
INSERT INTO t1 VALUES (9, next value for s); | ||
INSERT INTO t1 VALUES (10, next value for s); | ||
INSERT INTO t1 VALUES (11, next value for s); | ||
INSERT INTO t1 VALUES (12, next value for s); | ||
INSERT INTO t1 VALUES (13, next value for s); | ||
INSERT INTO t1 VALUES (14, next value for s); | ||
SELECT * FROM t1 WHERE f1 > 0 FOR UPDATE; | ||
f1 f2 | ||
1 0 | ||
3 0 | ||
4 1 | ||
5 3 | ||
6 5 | ||
7 7 | ||
8 9 | ||
9 11 | ||
10 13 | ||
11 15 | ||
12 17 | ||
13 19 | ||
14 21 | ||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; | ||
SET SESSION wsrep_sync_wait=0; | ||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; | ||
connection node_2; | ||
INSERT INTO t1 VALUES (2, 2); | ||
connection node_1a; | ||
SET SESSION wsrep_on = 0; | ||
SET SESSION wsrep_on = 1; | ||
SET GLOBAL wsrep_provider_options = 'dbug='; | ||
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync'; | ||
connection node_1; | ||
COMMIT; | ||
connection node_1a; | ||
SET SESSION wsrep_on = 0; | ||
SET SESSION wsrep_on = 1; | ||
SET GLOBAL wsrep_provider_options = 'dbug='; | ||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end'; | ||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; | ||
SET SESSION wsrep_on = 0; | ||
SET SESSION wsrep_on = 1; | ||
SET GLOBAL wsrep_provider_options = 'dbug='; | ||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end'; | ||
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync'; | ||
connection node_1; | ||
wsrep_local_replays | ||
1 | ||
connection node_1; | ||
SELECT * FROM t1; | ||
f1 f2 | ||
1 0 | ||
2 2 | ||
3 0 | ||
4 1 | ||
5 3 | ||
6 5 | ||
7 7 | ||
8 9 | ||
9 11 | ||
10 13 | ||
11 15 | ||
12 17 | ||
13 19 | ||
14 21 | ||
SELECT LASTVAL(s); | ||
LASTVAL(s) | ||
21 | ||
connection node_2; | ||
SELECT * FROM t1; | ||
f1 f2 | ||
1 0 | ||
2 2 | ||
3 0 | ||
4 1 | ||
5 3 | ||
6 5 | ||
7 7 | ||
8 9 | ||
9 11 | ||
10 13 | ||
11 15 | ||
12 17 | ||
13 19 | ||
14 21 | ||
SELECT LASTVAL(s); | ||
LASTVAL(s) | ||
NULL | ||
connection node_1; | ||
SELECT NEXTVAL(s); | ||
NEXTVAL(s) | ||
41 | ||
connection node_2; | ||
SELECT NEXTVAL(s); | ||
NEXTVAL(s) | ||
62 | ||
DROP SEQUENCE s; | ||
DROP TABLE t1; |
Oops, something went wrong.