Skip to content

Commit c41cbfa

Browse files
committed
Merge 10.7 into 10.8
2 parents 6a282df + 5f160b4 commit c41cbfa

27 files changed

+1066
-176
lines changed

debian/additions/mariadb.conf.d/50-server.cnf

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,11 @@
1212
# * Basic Settings
1313
#
1414

15-
user = mysql
15+
#user = mysql
1616
pid-file = /run/mysqld/mysqld.pid
1717
basedir = /usr
18-
datadir = /var/lib/mysql
19-
tmpdir = /tmp
20-
lc-messages-dir = /usr/share/mysql
21-
lc-messages = en_US
22-
skip-external-locking
18+
#datadir = /var/lib/mysql
19+
#tmpdir = /tmp
2320

2421
# Broken reverse DNS slows down connections considerably and name resolve is
2522
# safe to skip if there are no "host by domain name" access grants
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
connection node_2;
2+
connection node_1;
3+
connection node_1;
4+
set global wsrep_on=OFF;
5+
reset master;
6+
set global wsrep_on=ON;
7+
connection node_2;
8+
set global wsrep_on=OFF;
9+
reset master;
10+
set global wsrep_on=ON;
11+
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
12+
INSERT INTO t1 VALUES (1);
13+
CREATE TABLE t2 (id INT) ENGINE=InnoDB;
14+
INSERT INTO t2 VALUES (1);
15+
INSERT INTO t2 VALUES (1);
16+
connection node_2;
17+
SELECT COUNT(*) = 1 FROM t1;
18+
COUNT(*) = 1
19+
1
20+
SELECT COUNT(*) = 2 FROM t2;
21+
COUNT(*) = 2
22+
1
23+
connection node_1;
24+
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
25+
include/show_binlog_events.inc
26+
Log_name Pos Event_type Server_id End_log_pos Info
27+
hostname1-bin.000001 # Gtid # # GTID #-#-#
28+
hostname1-bin.000001 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
29+
hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-#
30+
hostname1-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1)
31+
hostname1-bin.000001 # Table_map # # table_id: # (test.t1)
32+
hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
33+
hostname1-bin.000001 # Xid # # COMMIT /* XID */
34+
hostname1-bin.000001 # Gtid # # GTID #-#-#
35+
hostname1-bin.000001 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
36+
hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-#
37+
hostname1-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
38+
hostname1-bin.000001 # Table_map # # table_id: # (test.t2)
39+
hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
40+
hostname1-bin.000001 # Xid # # COMMIT /* XID */
41+
hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-#
42+
hostname1-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
43+
hostname1-bin.000001 # Table_map # # table_id: # (test.t2)
44+
hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
45+
hostname1-bin.000001 # Xid # # COMMIT /* XID */
46+
hostname1-bin.000001 # Gtid # # GTID #-#-#
47+
hostname1-bin.000001 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
48+
connection node_2;
49+
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
50+
COUNT(*) = 2
51+
1
52+
include/show_binlog_events.inc
53+
Log_name Pos Event_type Server_id End_log_pos Info
54+
hostname1-bin.000001 # Gtid # # GTID #-#-#
55+
hostname1-bin.000001 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
56+
hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-#
57+
hostname1-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1)
58+
hostname1-bin.000001 # Table_map # # table_id: # (test.t1)
59+
hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
60+
hostname1-bin.000001 # Xid # # COMMIT /* XID */
61+
hostname1-bin.000001 # Gtid # # GTID #-#-#
62+
hostname1-bin.000001 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
63+
hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-#
64+
hostname1-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
65+
hostname1-bin.000001 # Table_map # # table_id: # (test.t2)
66+
hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
67+
hostname1-bin.000001 # Xid # # COMMIT /* XID */
68+
hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-#
69+
hostname1-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
70+
hostname1-bin.000001 # Table_map # # table_id: # (test.t2)
71+
hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
72+
hostname1-bin.000001 # Xid # # COMMIT /* XID */
73+
hostname1-bin.000001 # Gtid # # GTID #-#-#
74+
hostname1-bin.000001 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
75+
DROP TABLE t1;
76+
DROP TABLE t2;
77+
#cleanup
78+
connection node_1;
79+
SET GLOBAL wsrep_on=OFF;
80+
RESET MASTER;
Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
--- r/galera_sst_mariabackup.result 2021-04-10 14:25:04.142716409 +0300
2+
+++ r/galera_sst_mariabackup,debug.reject 2021-04-10 14:53:30.033162191 +0300
3+
@@ -516,5 +516,189 @@
4+
1
5+
DROP TABLE t1;
6+
COMMIT;
7+
+Performing State Transfer on a server that has been killed and restarted
8+
+while a DDL was in progress on it
9+
+connection node_1;
10+
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
11+
+SET AUTOCOMMIT=OFF;
12+
+START TRANSACTION;
13+
+INSERT INTO t1 VALUES (1,'node1_committed_before');
14+
+INSERT INTO t1 VALUES (2,'node1_committed_before');
15+
+INSERT INTO t1 VALUES (3,'node1_committed_before');
16+
+INSERT INTO t1 VALUES (4,'node1_committed_before');
17+
+INSERT INTO t1 VALUES (5,'node1_committed_before');
18+
+connection node_2;
19+
+START TRANSACTION;
20+
+INSERT INTO t1 VALUES (6,'node2_committed_before');
21+
+INSERT INTO t1 VALUES (7,'node2_committed_before');
22+
+INSERT INTO t1 VALUES (8,'node2_committed_before');
23+
+INSERT INTO t1 VALUES (9,'node2_committed_before');
24+
+INSERT INTO t1 VALUES (10,'node2_committed_before');
25+
+COMMIT;
26+
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
27+
+connection node_1;
28+
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
29+
+connection node_2;
30+
+SET wsrep_sync_wait = 0;
31+
+Killing server ...
32+
+connection node_1;
33+
+SET AUTOCOMMIT=OFF;
34+
+START TRANSACTION;
35+
+INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
36+
+INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
37+
+INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
38+
+INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
39+
+INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
40+
+COMMIT;
41+
+START TRANSACTION;
42+
+INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
43+
+INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
44+
+INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
45+
+INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
46+
+INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
47+
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
48+
+SET AUTOCOMMIT=OFF;
49+
+START TRANSACTION;
50+
+INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
51+
+INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
52+
+INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
53+
+INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
54+
+INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
55+
+connection node_2;
56+
+Performing --wsrep-recover ...
57+
+connection node_2;
58+
+Starting server ...
59+
+Using --wsrep-start-position when starting mysqld ...
60+
+SET AUTOCOMMIT=OFF;
61+
+START TRANSACTION;
62+
+INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
63+
+INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
64+
+INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
65+
+INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
66+
+INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
67+
+COMMIT;
68+
+connection node_1;
69+
+INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
70+
+INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
71+
+INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
72+
+INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
73+
+INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
74+
+COMMIT;
75+
+SET AUTOCOMMIT=OFF;
76+
+START TRANSACTION;
77+
+INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
78+
+INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
79+
+INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
80+
+INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
81+
+INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
82+
+COMMIT;
83+
+connection node_1a_galera_st_kill_slave_ddl;
84+
+INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
85+
+INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
86+
+INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
87+
+INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
88+
+INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
89+
+ROLLBACK;
90+
+SET AUTOCOMMIT=ON;
91+
+SET SESSION wsrep_sync_wait=15;
92+
+SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
93+
+EXPECT_3
94+
+3
95+
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
96+
+EXPECT_35
97+
+35
98+
+SELECT * FROM t1;
99+
+id f1 f2
100+
+1 node1_committed_before NULL
101+
+2 node1_committed_before NULL
102+
+3 node1_committed_before NULL
103+
+4 node1_committed_before NULL
104+
+5 node1_committed_before NULL
105+
+6 node2_committed_before NULL
106+
+7 node2_committed_before NULL
107+
+8 node2_committed_before NULL
108+
+9 node2_committed_before NULL
109+
+10 node2_committed_before NULL
110+
+11 node1_committed_during NULL
111+
+12 node1_committed_during NULL
112+
+13 node1_committed_during NULL
113+
+14 node1_committed_during NULL
114+
+15 node1_committed_during NULL
115+
+16 node1_to_be_committed_after NULL
116+
+17 node1_to_be_committed_after NULL
117+
+18 node1_to_be_committed_after NULL
118+
+19 node1_to_be_committed_after NULL
119+
+20 node1_to_be_committed_after NULL
120+
+26 node2_committed_after NULL
121+
+27 node2_committed_after NULL
122+
+28 node2_committed_after NULL
123+
+29 node2_committed_after NULL
124+
+30 node2_committed_after NULL
125+
+31 node1_to_be_committed_after NULL
126+
+32 node1_to_be_committed_after NULL
127+
+33 node1_to_be_committed_after NULL
128+
+34 node1_to_be_committed_after NULL
129+
+35 node1_to_be_committed_after NULL
130+
+36 node1_committed_after NULL
131+
+37 node1_committed_after NULL
132+
+38 node1_committed_after NULL
133+
+39 node1_committed_after NULL
134+
+40 node1_committed_after NULL
135+
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
136+
+COUNT(*) = 0
137+
+1
138+
+COMMIT;
139+
+connection node_1;
140+
+SET AUTOCOMMIT=ON;
141+
+SET SESSION wsrep_sync_wait=15;
142+
+SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
143+
+EXPECT_3
144+
+3
145+
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
146+
+EXPECT_35
147+
+35
148+
+SELECT * FROM t1;
149+
+id f1 f2
150+
+1 node1_committed_before NULL
151+
+2 node1_committed_before NULL
152+
+3 node1_committed_before NULL
153+
+4 node1_committed_before NULL
154+
+5 node1_committed_before NULL
155+
+6 node2_committed_before NULL
156+
+7 node2_committed_before NULL
157+
+8 node2_committed_before NULL
158+
+9 node2_committed_before NULL
159+
+10 node2_committed_before NULL
160+
+11 node1_committed_during NULL
161+
+12 node1_committed_during NULL
162+
+13 node1_committed_during NULL
163+
+14 node1_committed_during NULL
164+
+15 node1_committed_during NULL
165+
+16 node1_to_be_committed_after NULL
166+
+17 node1_to_be_committed_after NULL
167+
+18 node1_to_be_committed_after NULL
168+
+19 node1_to_be_committed_after NULL
169+
+20 node1_to_be_committed_after NULL
170+
+26 node2_committed_after NULL
171+
+27 node2_committed_after NULL
172+
+28 node2_committed_after NULL
173+
+29 node2_committed_after NULL
174+
+30 node2_committed_after NULL
175+
+31 node1_to_be_committed_after NULL
176+
+32 node1_to_be_committed_after NULL
177+
+33 node1_to_be_committed_after NULL
178+
+34 node1_to_be_committed_after NULL
179+
+35 node1_to_be_committed_after NULL
180+
+36 node1_committed_after NULL
181+
+37 node1_committed_after NULL
182+
+38 node1_committed_after NULL
183+
+39 node1_committed_after NULL
184+
+40 node1_committed_after NULL
185+
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
186+
+COUNT(*) = 0
187+
+1
188+
+DROP TABLE t1;
189+
+COMMIT;
190+
+SET GLOBAL debug_dbug = $debug_orig;
191+
disconnect node_2;
192+
disconnect node_1;

0 commit comments

Comments
 (0)