| 1 |
--- r/galera_sst_mariabackup_gtid.result |
| 2 |
+++ r/galera_sst_mariabackup_gtid,debug.reject |
| 3 |
@@ -516,19 +516,203 @@ |
| 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 |
connection node_1; |
| 192 |
# Node_1 |
| 193 |
SHOW global variables like 'gtid%pos'; |
| 194 |
Variable_name Value |
| 195 |
-gtid_binlog_pos 100-10-24 |
| 196 |
-gtid_current_pos 100-10-24 |
| 197 |
+gtid_binlog_pos 100-10-33 |
| 198 |
+gtid_current_pos 100-10-33 |
| 199 |
gtid_slave_pos |
| 200 |
connection node_2; |
| 201 |
# Node_2 |
| 202 |
SHOW global variables like 'gtid%pos'; |
| 203 |
Variable_name Value |
| 204 |
-gtid_binlog_pos 100-10-24 |
| 205 |
-gtid_current_pos 100-10-24 |
| 206 |
+gtid_binlog_pos 100-10-33 |
| 207 |
+gtid_current_pos 100-10-33 |
| 208 |
gtid_slave_pos |
| 209 |
disconnect node_2; |
| 210 |
disconnect node_1; |