1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge branch '10.6' into '10.11'

This commit is contained in:
Julius Goryavsky
2025-04-02 05:50:52 +02:00
79 changed files with 1517 additions and 94 deletions

View File

@@ -24,6 +24,6 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`f1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender .+ ?is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
connection node_1;
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=false';

View File

@@ -66,7 +66,7 @@ SHOW STATUS LIKE 'wsrep_desync_count';
Variable_name Value
wsrep_desync_count 0
SET @@global.wsrep_desync = 0;
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender .+ ?is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
connection node_1;
# Wait until both nodes are back to cluster
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=false';

View File

@@ -13,4 +13,4 @@ SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME
VARIABLE_VALUE
Primary
SET SESSION wsrep_sync_wait=DEFAULT;
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender .+ ?is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");

View File

@@ -0,0 +1,22 @@
connection node_2;
connection node_1;
connect con1,127.0.0.1,root,,test,$NODE_MYPORT_1;
connection node_1;
CALL mtr.add_suppression("CREATE TABLE isolation failure");
SET DEBUG_SYNC = 'wsrep_kill_thd_before_enter_toi SIGNAL may_kill WAIT_FOR continue';
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
connection con1;
SET DEBUG_SYNC = 'now WAIT_FOR may_kill';
SET DEBUG_SYNC = 'now SIGNAL continue';
connection node_1;
Got one of the listed errors
connection node_2;
SHOW TABLES LIKE 't1';
Tables_in_test (t1)
connection con1;
SHOW TABLES LIKE 't1';
Tables_in_test (t1)
SET DEBUG_SYNC = 'RESET';
disconnect con1;
disconnect node_2;
disconnect node_1;

View File

@@ -26,3 +26,4 @@ COUNT(*) = 1
1
DROP TABLE t1;
connection node_1;
SET GLOBAL wsrep_mode = DEFAULT;

View File

@@ -53,7 +53,7 @@ FOUND 2 /Resuming and resyncing the provider/ in mysqld.2.err
FOUND 1 /Server not desynched from group at BLOCK_DDL because WSREP_MODE_BF_MARIABACKUP is used./ in mysqld.2.err
# Should return FOUND 1 as server did desync and pause at BLOCK_COMMIT
FOUND 1 /Server desynched from group during BACKUP STAGE BLOCK_COMMIT./ in mysqld.2.err
SET GLOBAL wsrep_mode = "";
SET GLOBAL wsrep_mode = DEFAULT;
connection node_1;
DROP TABLE t;
disconnect node_2;

View File

@@ -47,6 +47,9 @@ select NEXT VALUE FOR Seq1_1;
NEXT VALUE FOR Seq1_1
4
connection node_1;
SHOW CREATE SEQUENCE Seq1_1;
Table Create Table
Seq1_1 CREATE SEQUENCE `Seq1_1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 nocache nocycle ENGINE=InnoDB
DROP SEQUENCE Seq1_1;
connection node_1;
CREATE TABLE t2 (d CHAR(1)KEY);

View File

@@ -0,0 +1,152 @@
connection node_2;
connection node_1;
connection node_1;
CREATE SEQUENCE s INCREMENT=0 CACHE=5 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
INSERT INTO t1 VALUES (22, next value for s);
INSERT INTO t1 VALUES (23, next value for s);
INSERT INTO t1 VALUES (24, next value for s);
INSERT INTO t1 VALUES (25, next value for s);
INSERT INTO t1 VALUES (26, next value for s);
INSERT INTO t1 VALUES (27, next value for s);
INSERT INTO t1 VALUES (28, next value for s);
INSERT INTO t1 VALUES (29, next value for s);
INSERT INTO t1 VALUES (30, next value for s);
INSERT INTO t1 VALUES (31, next value for s);
INSERT INTO t1 VALUES (32, next value for s);
INSERT INTO t1 VALUES (33, next value for s);
INSERT INTO t1 VALUES (34, next value for s);
INSERT INTO t1 VALUES (35, next value for s);
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
22 31
23 33
24 35
25 37
26 39
27 41
28 43
29 45
30 47
31 49
32 51
33 53
34 55
35 57
SELECT LASTVAL(s);
LASTVAL(s)
57
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
22 31
23 33
24 35
25 37
26 39
27 41
28 43
29 45
30 47
31 49
32 51
33 53
34 55
35 57
SELECT LASTVAL(s);
LASTVAL(s)
NULL
connection node_1;
SELECT NEXTVAL(s);
NEXTVAL(s)
59
connection node_2;
SELECT NEXTVAL(s);
NEXTVAL(s)
62
DROP SEQUENCE s;
DROP TABLE t1;

View File

@@ -0,0 +1,350 @@
connection node_2;
connection node_1;
connection node_1;
CREATE SEQUENCE s INCREMENT=0 CACHE=5 ENGINE=InnoDB;
CREATE TABLE t1 (f1 INT PRIMARY KEY DEFAULT NEXTVAL(s), f2 INT) ENGINE=InnoDB;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_1;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
COMMIT;
connection node_2;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
COMMIT;
connection node_2a;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
COMMIT;
connection node_1a;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
COMMIT;
connection node_2;
SELECT LASTVAL(s);
LASTVAL(s)
40
connection node_1;
SELECT LASTVAL(s);
LASTVAL(s)
19
connection node_2a;
SELECT LASTVAL(s);
LASTVAL(s)
60
connection node_1a;
SELECT LASTVAL(s);
LASTVAL(s)
79
connection node_1;
SELECT * FROM t1;
f1 f2
1 1
3 1
5 1
7 1
9 1
11 1
13 1
15 1
17 1
19 1
22 1
24 1
26 1
28 1
30 1
32 1
34 1
36 1
38 1
40 1
42 1
44 1
46 1
48 1
50 1
52 1
54 1
56 1
58 1
60 1
61 1
63 1
65 1
67 1
69 1
71 1
73 1
75 1
77 1
79 1
connection node_2;
SELECT * FROM t1;
f1 f2
1 1
3 1
5 1
7 1
9 1
11 1
13 1
15 1
17 1
19 1
22 1
24 1
26 1
28 1
30 1
32 1
34 1
36 1
38 1
40 1
42 1
44 1
46 1
48 1
50 1
52 1
54 1
56 1
58 1
60 1
61 1
63 1
65 1
67 1
69 1
71 1
73 1
75 1
77 1
79 1
connection node_1;
DROP TABLE t1;
DROP SEQUENCE s;
connection node_1;
CREATE SEQUENCE s INCREMENT=0 CACHE=5 ENGINE=InnoDB;
CREATE TABLE t1 (f1 INT PRIMARY KEY DEFAULT NEXTVAL(s), f2 INT) ENGINE=InnoDB;
connection node_1;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
ROLLBACK;
connection node_2;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
ROLLBACK;
connection node_2a;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
ROLLBACK;
connection node_1a;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
ROLLBACK;
connection node_2;
SELECT LASTVAL(s);
LASTVAL(s)
20
connection node_1;
SELECT LASTVAL(s);
LASTVAL(s)
19
connection node_2a;
SELECT LASTVAL(s);
LASTVAL(s)
40
connection node_1a;
SELECT LASTVAL(s);
LASTVAL(s)
39
connection node_1;
SELECT * FROM t1;
f1 f2
connection node_2;
SELECT * FROM t1;
f1 f2
connection node_1;
DROP TABLE t1;
DROP SEQUENCE s;
connection node_1;
CREATE SEQUENCE s INCREMENT=0 CACHE=5 ENGINE=InnoDB;
CREATE TABLE t1 (f1 INT PRIMARY KEY DEFAULT NEXTVAL(s), f2 INT) ENGINE=InnoDB;
connection node_1;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
connection node_1a;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
connection node_2a;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
connection node_2;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
connection node_1;
COMMIT;
connection node_1a;
ROLLBACK;
connection node_2;
COMMIT;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2a;
ROLLBACK;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
SELECT LASTVAL(s);
LASTVAL(s)
40
connection node_1;
SELECT LASTVAL(s);
LASTVAL(s)
19
connection node_2a;
SELECT LASTVAL(s);
LASTVAL(s)
20
connection node_1a;
SELECT LASTVAL(s);
LASTVAL(s)
39
connection node_1;
SELECT * FROM t1;
f1 f2
1 1
3 1
5 1
7 1
9 1
11 1
13 1
15 1
17 1
19 1
connection node_2;
SELECT * FROM t1;
f1 f2
1 1
3 1
5 1
7 1
9 1
11 1
13 1
15 1
17 1
19 1
connection node_1;
DROP TABLE t1;
DROP SEQUENCE s;