| 1 |
INSTALL PLUGIN clone SONAME 'CLONE_PLUGIN'; |
| 2 |
CREATE TABLE t1(col1 INT PRIMARY KEY, col2 int, col3 varchar(64), col4 BLOB); |
| 3 |
CREATE TABLE t2(col1 INT PRIMARY KEY, col2 int, col3 varchar(64), col4 BLOB) |
| 4 |
PARTITION BY KEY(col1) PARTITIONS 5; |
| 5 |
CREATE PROCEDURE execute_dml( |
| 6 |
p_dml_type INT, |
| 7 |
p_key_min INT, |
| 8 |
p_key_range INT, |
| 9 |
p_loop_count INT, |
| 10 |
p_frequency INT, |
| 11 |
p_is_rand INT) |
| 12 |
BEGIN |
| 13 |
DECLARE v_idx INT DEFAULT 0; |
| 14 |
DECLARE v_commit INT DEFAULT 0; |
| 15 |
DECLARE v_key INT DEFAULT 0; |
| 16 |
/* Loop and INSERT data at random position */ |
| 17 |
WHILE(v_idx < p_loop_count) DO |
| 18 |
/* Generate key between 1 to p_loop_count */ |
| 19 |
IF p_is_rand = 1 THEN |
| 20 |
SET v_key = p_key_min + FLOOR(RAND() * p_key_range); |
| 21 |
ELSE |
| 22 |
SET v_key = p_key_min + (v_idx % p_key_range); |
| 23 |
END IF; |
| 24 |
CASE p_dml_type |
| 25 |
WHEN 0 THEN |
| 26 |
SET @clol3_text = CONCAT('Clone Test Row - ', v_key); |
| 27 |
INSERT INTO t1 (col1, col2, col3, col4) VALUES ( |
| 28 |
v_key, v_key * 10, |
| 29 |
@clol3_text, REPEAT('Large Column Data ', 2048)) |
| 30 |
ON DUPLICATE KEY UPDATE col2 = col2 + 1; |
| 31 |
INSERT INTO t2 (col1, col2, col3, col4) VALUES ( |
| 32 |
v_key, v_key * 10, |
| 33 |
@clol3_text, REPEAT('Large Column Data ', 2048)) |
| 34 |
ON DUPLICATE KEY UPDATE col2 = col2 + 1; |
| 35 |
WHEN 1 THEN |
| 36 |
UPDATE t1 SET col2 = v_idx + 1 WHERE col1 = v_key; |
| 37 |
UPDATE t2 SET col2 = v_idx + 1 WHERE col1 = v_key; |
| 38 |
WHEN 2 THEN |
| 39 |
DELETE FROM t1 WHERE col1 = v_key; |
| 40 |
DELETE FROM t2 WHERE col1 = v_key; |
| 41 |
ELSE |
| 42 |
DELETE FROM t1; |
| 43 |
DELETE FROM t2; |
| 44 |
END CASE; |
| 45 |
SET v_idx = v_idx + 1; |
| 46 |
/* Commit or rollback work at specified frequency. */ |
| 47 |
IF v_idx % p_frequency = 0 THEN |
| 48 |
SET v_commit = FLOOR(RAND() * 2); |
| 49 |
IF v_commit = 0 AND p_is_rand = 1 THEN |
| 50 |
ROLLBACK; |
| 51 |
START TRANSACTION; |
| 52 |
ELSE |
| 53 |
COMMIT; |
| 54 |
START TRANSACTION; |
| 55 |
END IF; |
| 56 |
END IF; |
| 57 |
END WHILE; |
| 58 |
COMMIT; |
| 59 |
END| |
| 60 |
call execute_dml(0, 0, 150, 150, 10, 0); |
| 61 |
SHOW CREATE TABLE t1; |
| 62 |
Table Create Table |
| 63 |
t1 CREATE TABLE `t1` ( |
| 64 |
`col1` int NOT NULL, |
| 65 |
`col2` int DEFAULT NULL, |
| 66 |
`col3` varchar(64) DEFAULT NULL, |
| 67 |
`col4` blob, |
| 68 |
PRIMARY KEY (`col1`) |
| 69 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 70 |
SELECT count(*) from t1; |
| 71 |
count(*) |
| 72 |
150 |
| 73 |
SELECT col1, col2, col3, SUBSTRING(col4, 1000, 32) FROM t1 ORDER BY col1 LIMIT 10; |
| 74 |
col1 col2 col3 SUBSTRING(col4, 1000, 32) |
| 75 |
0 0 Clone Test Row - 0 umn Data Large Column Data Large |
| 76 |
1 10 Clone Test Row - 1 umn Data Large Column Data Large |
| 77 |
2 20 Clone Test Row - 2 umn Data Large Column Data Large |
| 78 |
3 30 Clone Test Row - 3 umn Data Large Column Data Large |
| 79 |
4 40 Clone Test Row - 4 umn Data Large Column Data Large |
| 80 |
5 50 Clone Test Row - 5 umn Data Large Column Data Large |
| 81 |
6 60 Clone Test Row - 6 umn Data Large Column Data Large |
| 82 |
7 70 Clone Test Row - 7 umn Data Large Column Data Large |
| 83 |
8 80 Clone Test Row - 8 umn Data Large Column Data Large |
| 84 |
9 90 Clone Test Row - 9 umn Data Large Column Data Large |
| 85 |
SELECT col1, col2, col3, SUBSTRING(col4, 1000, 32) FROM t1 ORDER BY col1 DESC LIMIT 10; |
| 86 |
col1 col2 col3 SUBSTRING(col4, 1000, 32) |
| 87 |
149 1490 Clone Test Row - 149 umn Data Large Column Data Large |
| 88 |
148 1480 Clone Test Row - 148 umn Data Large Column Data Large |
| 89 |
147 1470 Clone Test Row - 147 umn Data Large Column Data Large |
| 90 |
146 1460 Clone Test Row - 146 umn Data Large Column Data Large |
| 91 |
145 1450 Clone Test Row - 145 umn Data Large Column Data Large |
| 92 |
144 1440 Clone Test Row - 144 umn Data Large Column Data Large |
| 93 |
143 1430 Clone Test Row - 143 umn Data Large Column Data Large |
| 94 |
142 1420 Clone Test Row - 142 umn Data Large Column Data Large |
| 95 |
141 1410 Clone Test Row - 141 umn Data Large Column Data Large |
| 96 |
140 1400 Clone Test Row - 140 umn Data Large Column Data Large |
| 97 |
SHOW CREATE TABLE t2; |
| 98 |
Table Create Table |
| 99 |
t2 CREATE TABLE `t2` ( |
| 100 |
`col1` int NOT NULL, |
| 101 |
`col2` int DEFAULT NULL, |
| 102 |
`col3` varchar(64) DEFAULT NULL, |
| 103 |
`col4` blob, |
| 104 |
PRIMARY KEY (`col1`) |
| 105 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 106 |
/*!50100 PARTITION BY KEY (col1) |
| 107 |
PARTITIONS 5 */ |
| 108 |
SELECT count(*) from t2; |
| 109 |
count(*) |
| 110 |
150 |
| 111 |
SELECT col1, col2, col3, SUBSTRING(col4, 1000, 32) FROM t2 ORDER BY col1 LIMIT 10; |
| 112 |
col1 col2 col3 SUBSTRING(col4, 1000, 32) |
| 113 |
0 0 Clone Test Row - 0 umn Data Large Column Data Large |
| 114 |
1 10 Clone Test Row - 1 umn Data Large Column Data Large |
| 115 |
2 20 Clone Test Row - 2 umn Data Large Column Data Large |
| 116 |
3 30 Clone Test Row - 3 umn Data Large Column Data Large |
| 117 |
4 40 Clone Test Row - 4 umn Data Large Column Data Large |
| 118 |
5 50 Clone Test Row - 5 umn Data Large Column Data Large |
| 119 |
6 60 Clone Test Row - 6 umn Data Large Column Data Large |
| 120 |
7 70 Clone Test Row - 7 umn Data Large Column Data Large |
| 121 |
8 80 Clone Test Row - 8 umn Data Large Column Data Large |
| 122 |
9 90 Clone Test Row - 9 umn Data Large Column Data Large |
| 123 |
SELECT col1, col2, col3, SUBSTRING(col4, 1000, 32) FROM t2 ORDER BY col1 DESC LIMIT 10; |
| 124 |
col1 col2 col3 SUBSTRING(col4, 1000, 32) |
| 125 |
149 1490 Clone Test Row - 149 umn Data Large Column Data Large |
| 126 |
148 1480 Clone Test Row - 148 umn Data Large Column Data Large |
| 127 |
147 1470 Clone Test Row - 147 umn Data Large Column Data Large |
| 128 |
146 1460 Clone Test Row - 146 umn Data Large Column Data Large |
| 129 |
145 1450 Clone Test Row - 145 umn Data Large Column Data Large |
| 130 |
144 1440 Clone Test Row - 144 umn Data Large Column Data Large |
| 131 |
143 1430 Clone Test Row - 143 umn Data Large Column Data Large |
| 132 |
142 1420 Clone Test Row - 142 umn Data Large Column Data Large |
| 133 |
141 1410 Clone Test Row - 141 umn Data Large Column Data Large |
| 134 |
140 1400 Clone Test Row - 140 umn Data Large Column Data Large |
| 135 |
# In connection default - Cloning database |
| 136 |
SET GLOBAL DEBUG ="+d,clone_no_zero_copy"; |
| 137 |
SET DEBUG_SYNC = 'RESET'; |
| 138 |
SET DEBUG_SYNC = 'clone_file_copy SIGNAL start_dml1 WAIT_FOR resume_clone1'; |
| 139 |
SET DEBUG_SYNC = 'clone_page_copy SIGNAL start_dml2 WAIT_FOR resume_clone2'; |
| 140 |
SET GLOBAL clone_autotune_concurrency = OFF; |
| 141 |
SET GLOBAL clone_max_concurrency = 8; |
| 142 |
CLONE LOCAL DATA DIRECTORY = 'CLONE_DATADIR'; |
| 143 |
# In connection con1 - Running Update Random [0 - 150 Key Range] |
| 144 |
SET DEBUG_SYNC = 'now WAIT_FOR start_dml1'; |
| 145 |
START TRANSACTION; |
| 146 |
CALL execute_dml(1, 0, 150, 200, 100, 1); |
| 147 |
COMMIT; |
| 148 |
# Flush all dirty buffers |
| 149 |
SET GLOBAL innodb_buf_flush_list_now = 1; |
| 150 |
SET DEBUG_SYNC = 'now SIGNAL resume_clone1'; |
| 151 |
SET DEBUG_SYNC = 'now WAIT_FOR start_dml2'; |
| 152 |
START TRANSACTION; |
| 153 |
CALL execute_dml(1, 0, 150, 200, 100, 1); |
| 154 |
COMMIT; |
| 155 |
SET DEBUG_SYNC = 'now SIGNAL resume_clone2'; |
| 156 |
# In connection default - Cloning database |
| 157 |
SET GLOBAL DEBUG ="-d,clone_no_zero_copy"; |
| 158 |
# Restart cloned database |
| 159 |
# restart: --datadir=CLONE_DATADIR |
| 160 |
SHOW CREATE TABLE t1; |
| 161 |
Table Create Table |
| 162 |
t1 CREATE TABLE `t1` ( |
| 163 |
`col1` int NOT NULL, |
| 164 |
`col2` int DEFAULT NULL, |
| 165 |
`col3` varchar(64) DEFAULT NULL, |
| 166 |
`col4` blob, |
| 167 |
PRIMARY KEY (`col1`) |
| 168 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 169 |
SELECT count(*) from t1; |
| 170 |
count(*) |
| 171 |
150 |
| 172 |
SELECT col1, col3, SUBSTRING(col4, 1000, 32) FROM t1 ORDER BY col1 LIMIT 10; |
| 173 |
col1 col3 SUBSTRING(col4, 1000, 32) |
| 174 |
0 Clone Test Row - 0 umn Data Large Column Data Large |
| 175 |
1 Clone Test Row - 1 umn Data Large Column Data Large |
| 176 |
2 Clone Test Row - 2 umn Data Large Column Data Large |
| 177 |
3 Clone Test Row - 3 umn Data Large Column Data Large |
| 178 |
4 Clone Test Row - 4 umn Data Large Column Data Large |
| 179 |
5 Clone Test Row - 5 umn Data Large Column Data Large |
| 180 |
6 Clone Test Row - 6 umn Data Large Column Data Large |
| 181 |
7 Clone Test Row - 7 umn Data Large Column Data Large |
| 182 |
8 Clone Test Row - 8 umn Data Large Column Data Large |
| 183 |
9 Clone Test Row - 9 umn Data Large Column Data Large |
| 184 |
SELECT col1, col3, SUBSTRING(col4, 1000, 32) FROM t1 ORDER BY col1 DESC LIMIT 10; |
| 185 |
col1 col3 SUBSTRING(col4, 1000, 32) |
| 186 |
149 Clone Test Row - 149 umn Data Large Column Data Large |
| 187 |
148 Clone Test Row - 148 umn Data Large Column Data Large |
| 188 |
147 Clone Test Row - 147 umn Data Large Column Data Large |
| 189 |
146 Clone Test Row - 146 umn Data Large Column Data Large |
| 190 |
145 Clone Test Row - 145 umn Data Large Column Data Large |
| 191 |
144 Clone Test Row - 144 umn Data Large Column Data Large |
| 192 |
143 Clone Test Row - 143 umn Data Large Column Data Large |
| 193 |
142 Clone Test Row - 142 umn Data Large Column Data Large |
| 194 |
141 Clone Test Row - 141 umn Data Large Column Data Large |
| 195 |
140 Clone Test Row - 140 umn Data Large Column Data Large |
| 196 |
SHOW CREATE TABLE t2; |
| 197 |
Table Create Table |
| 198 |
t2 CREATE TABLE `t2` ( |
| 199 |
`col1` int NOT NULL, |
| 200 |
`col2` int DEFAULT NULL, |
| 201 |
`col3` varchar(64) DEFAULT NULL, |
| 202 |
`col4` blob, |
| 203 |
PRIMARY KEY (`col1`) |
| 204 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 205 |
/*!50100 PARTITION BY KEY (col1) |
| 206 |
PARTITIONS 5 */ |
| 207 |
SELECT count(*) from t2; |
| 208 |
count(*) |
| 209 |
150 |
| 210 |
SELECT col1, col3, SUBSTRING(col4, 1000, 32) FROM t2 ORDER BY col1 LIMIT 10; |
| 211 |
col1 col3 SUBSTRING(col4, 1000, 32) |
| 212 |
0 Clone Test Row - 0 umn Data Large Column Data Large |
| 213 |
1 Clone Test Row - 1 umn Data Large Column Data Large |
| 214 |
2 Clone Test Row - 2 umn Data Large Column Data Large |
| 215 |
3 Clone Test Row - 3 umn Data Large Column Data Large |
| 216 |
4 Clone Test Row - 4 umn Data Large Column Data Large |
| 217 |
5 Clone Test Row - 5 umn Data Large Column Data Large |
| 218 |
6 Clone Test Row - 6 umn Data Large Column Data Large |
| 219 |
7 Clone Test Row - 7 umn Data Large Column Data Large |
| 220 |
8 Clone Test Row - 8 umn Data Large Column Data Large |
| 221 |
9 Clone Test Row - 9 umn Data Large Column Data Large |
| 222 |
SELECT col1, col3, SUBSTRING(col4, 1000, 32) FROM t2 ORDER BY col1 DESC LIMIT 10; |
| 223 |
col1 col3 SUBSTRING(col4, 1000, 32) |
| 224 |
149 Clone Test Row - 149 umn Data Large Column Data Large |
| 225 |
148 Clone Test Row - 148 umn Data Large Column Data Large |
| 226 |
147 Clone Test Row - 147 umn Data Large Column Data Large |
| 227 |
146 Clone Test Row - 146 umn Data Large Column Data Large |
| 228 |
145 Clone Test Row - 145 umn Data Large Column Data Large |
| 229 |
144 Clone Test Row - 144 umn Data Large Column Data Large |
| 230 |
143 Clone Test Row - 143 umn Data Large Column Data Large |
| 231 |
142 Clone Test Row - 142 umn Data Large Column Data Large |
| 232 |
141 Clone Test Row - 141 umn Data Large Column Data Large |
| 233 |
140 Clone Test Row - 140 umn Data Large Column Data Large |
| 234 |
call execute_dml(3, 0, 1, 1, 1, 0); |
| 235 |
call execute_dml(0, 0, 150, 150, 100, 0); |
| 236 |
SELECT col1, col2, col3, SUBSTRING(col4, 1000, 32) FROM t1 ORDER BY col1 LIMIT 10; |
| 237 |
col1 col2 col3 SUBSTRING(col4, 1000, 32) |
| 238 |
0 0 Clone Test Row - 0 umn Data Large Column Data Large |
| 239 |
1 10 Clone Test Row - 1 umn Data Large Column Data Large |
| 240 |
2 20 Clone Test Row - 2 umn Data Large Column Data Large |
| 241 |
3 30 Clone Test Row - 3 umn Data Large Column Data Large |
| 242 |
4 40 Clone Test Row - 4 umn Data Large Column Data Large |
| 243 |
5 50 Clone Test Row - 5 umn Data Large Column Data Large |
| 244 |
6 60 Clone Test Row - 6 umn Data Large Column Data Large |
| 245 |
7 70 Clone Test Row - 7 umn Data Large Column Data Large |
| 246 |
8 80 Clone Test Row - 8 umn Data Large Column Data Large |
| 247 |
9 90 Clone Test Row - 9 umn Data Large Column Data Large |
| 248 |
SELECT col1, col2, col3, SUBSTRING(col4, 1000, 32) FROM t1 ORDER BY col1 DESC LIMIT 10; |
| 249 |
col1 col2 col3 SUBSTRING(col4, 1000, 32) |
| 250 |
149 1490 Clone Test Row - 149 umn Data Large Column Data Large |
| 251 |
148 1480 Clone Test Row - 148 umn Data Large Column Data Large |
| 252 |
147 1470 Clone Test Row - 147 umn Data Large Column Data Large |
| 253 |
146 1460 Clone Test Row - 146 umn Data Large Column Data Large |
| 254 |
145 1450 Clone Test Row - 145 umn Data Large Column Data Large |
| 255 |
144 1440 Clone Test Row - 144 umn Data Large Column Data Large |
| 256 |
143 1430 Clone Test Row - 143 umn Data Large Column Data Large |
| 257 |
142 1420 Clone Test Row - 142 umn Data Large Column Data Large |
| 258 |
141 1410 Clone Test Row - 141 umn Data Large Column Data Large |
| 259 |
140 1400 Clone Test Row - 140 umn Data Large Column Data Large |
| 260 |
SELECT col1, col2, col3, SUBSTRING(col4, 1000, 32) FROM t2 ORDER BY col1 LIMIT 10; |
| 261 |
col1 col2 col3 SUBSTRING(col4, 1000, 32) |
| 262 |
0 0 Clone Test Row - 0 umn Data Large Column Data Large |
| 263 |
1 10 Clone Test Row - 1 umn Data Large Column Data Large |
| 264 |
2 20 Clone Test Row - 2 umn Data Large Column Data Large |
| 265 |
3 30 Clone Test Row - 3 umn Data Large Column Data Large |
| 266 |
4 40 Clone Test Row - 4 umn Data Large Column Data Large |
| 267 |
5 50 Clone Test Row - 5 umn Data Large Column Data Large |
| 268 |
6 60 Clone Test Row - 6 umn Data Large Column Data Large |
| 269 |
7 70 Clone Test Row - 7 umn Data Large Column Data Large |
| 270 |
8 80 Clone Test Row - 8 umn Data Large Column Data Large |
| 271 |
9 90 Clone Test Row - 9 umn Data Large Column Data Large |
| 272 |
SELECT col1, col2, col3, SUBSTRING(col4, 1000, 32) FROM t2 ORDER BY col1 DESC LIMIT 10; |
| 273 |
col1 col2 col3 SUBSTRING(col4, 1000, 32) |
| 274 |
149 1490 Clone Test Row - 149 umn Data Large Column Data Large |
| 275 |
148 1480 Clone Test Row - 148 umn Data Large Column Data Large |
| 276 |
147 1470 Clone Test Row - 147 umn Data Large Column Data Large |
| 277 |
146 1460 Clone Test Row - 146 umn Data Large Column Data Large |
| 278 |
145 1450 Clone Test Row - 145 umn Data Large Column Data Large |
| 279 |
144 1440 Clone Test Row - 144 umn Data Large Column Data Large |
| 280 |
143 1430 Clone Test Row - 143 umn Data Large Column Data Large |
| 281 |
142 1420 Clone Test Row - 142 umn Data Large Column Data Large |
| 282 |
141 1410 Clone Test Row - 141 umn Data Large Column Data Large |
| 283 |
140 1400 Clone Test Row - 140 umn Data Large Column Data Large |
| 284 |
# restart: |
| 285 |
SET GLOBAL innodb_redo_log_capacity = 100*1024*1024; |
| 286 |
SET GLOBAL DEBUG ="+d,clone_arch_log_stop_file_end"; |
| 287 |
SET DEBUG_SYNC = 'RESET'; |
| 288 |
SET DEBUG_SYNC = 'clone_file_copy SIGNAL start_dml1 WAIT_FOR resume_clone1'; |
| 289 |
SET DEBUG_SYNC = 'clone_page_copy SIGNAL start_dml2 WAIT_FOR resume_clone2'; |
| 290 |
SET GLOBAL clone_autotune_concurrency = OFF; |
| 291 |
SET GLOBAL clone_max_concurrency = 8; |
| 292 |
CLONE LOCAL DATA DIRECTORY = 'CLONE_DATADIR'; |
| 293 |
# In connection con1 - Running Update Random [0 - 10 Key Range] |
| 294 |
SET DEBUG_SYNC = 'now WAIT_FOR start_dml1'; |
| 295 |
START TRANSACTION; |
| 296 |
CALL execute_dml(1, 0, 10, 10, 10, 1); |
| 297 |
COMMIT; |
| 298 |
# Flush all dirty buffers |
| 299 |
SET GLOBAL innodb_buf_flush_list_now = 1; |
| 300 |
SET DEBUG_SYNC = 'now SIGNAL resume_clone1'; |
| 301 |
SET DEBUG_SYNC = 'now WAIT_FOR start_dml2'; |
| 302 |
START TRANSACTION; |
| 303 |
call execute_dml(3, 0, 1, 1, 1, 0); |
| 304 |
call execute_dml(0, 0, 150, 150, 10, 0); |
| 305 |
COMMIT; |
| 306 |
SET DEBUG_SYNC = 'now SIGNAL resume_clone2'; |
| 307 |
# In connection default - Cloning database |
| 308 |
SET GLOBAL DEBUG ="-d,clone_arch_log_stop_file_end"; |
| 309 |
SET GLOBAL innodb_redo_log_capacity = 100*1024*1024; |
| 310 |
SET GLOBAL DEBUG ="+d,clone_arch_log_stop_file_end"; |
| 311 |
SET GLOBAL DEBUG ="+d,clone_arch_log_extra_bytes"; |
| 312 |
SET DEBUG_SYNC = 'RESET'; |
| 313 |
SET DEBUG_SYNC = 'clone_file_copy SIGNAL start_dml1 WAIT_FOR resume_clone1'; |
| 314 |
SET DEBUG_SYNC = 'clone_page_copy SIGNAL start_dml2 WAIT_FOR resume_clone2'; |
| 315 |
SET GLOBAL clone_autotune_concurrency = OFF; |
| 316 |
SET GLOBAL clone_max_concurrency = 8; |
| 317 |
CLONE LOCAL DATA DIRECTORY = 'CLONE_DATADIR'; |
| 318 |
# In connection con1 - Running Update Random [0 - 10 Key Range] |
| 319 |
SET DEBUG_SYNC = 'now WAIT_FOR start_dml1'; |
| 320 |
START TRANSACTION; |
| 321 |
CALL execute_dml(1, 0, 10, 10, 10, 1); |
| 322 |
COMMIT; |
| 323 |
# Flush all dirty buffers |
| 324 |
SET GLOBAL innodb_buf_flush_list_now = 1; |
| 325 |
SET DEBUG_SYNC = 'now SIGNAL resume_clone1'; |
| 326 |
SET DEBUG_SYNC = 'now WAIT_FOR start_dml2'; |
| 327 |
START TRANSACTION; |
| 328 |
call execute_dml(3, 0, 1, 1, 1, 0); |
| 329 |
call execute_dml(0, 0, 150, 150, 10, 0); |
| 330 |
COMMIT; |
| 331 |
SET DEBUG_SYNC = 'now SIGNAL resume_clone2'; |
| 332 |
# In connection default - Cloning database |
| 333 |
SET GLOBAL DEBUG ="-d,clone_arch_log_stop_file_end"; |
| 334 |
SET GLOBAL DEBUG ="-d,clone_arch_log_extra_bytes"; |
| 335 |
SET DEBUG_SYNC = 'RESET'; |
| 336 |
SET DEBUG_SYNC = 'clone_file_copy SIGNAL start_dml1 WAIT_FOR resume_clone1'; |
| 337 |
SET GLOBAL clone_autotune_concurrency = OFF; |
| 338 |
SET GLOBAL clone_max_concurrency = 8; |
| 339 |
CLONE LOCAL DATA DIRECTORY = 'CLONE_DATADIR'; |
| 340 |
# In connection con1 - Running Update Random [0 - 10 Key Range] |
| 341 |
SET DEBUG_SYNC = 'now WAIT_FOR start_dml1'; |
| 342 |
START TRANSACTION; |
| 343 |
CALL execute_dml(1, 0, 10, 10, 10, 1); |
| 344 |
COMMIT; |
| 345 |
# In connection default - Cloning database |
| 346 |
Got one of the listed errors |
| 347 |
# restart: |
| 348 |
SET DEBUG_SYNC = 'RESET'; |
| 349 |
SET DEBUG_SYNC = 'clone_file_copy SIGNAL start_dml1 WAIT_FOR resume_clone1'; |
| 350 |
SET DEBUG_SYNC = 'clone_page_copy SIGNAL start_dml2 WAIT_FOR resume_clone2'; |
| 351 |
SET GLOBAL clone_autotune_concurrency = OFF; |
| 352 |
SET GLOBAL clone_max_concurrency = 8; |
| 353 |
CLONE LOCAL DATA DIRECTORY = 'CLONE_DATADIR'; |
| 354 |
# In connection con1 - Running Update Random [0 - 10 Key Range] |
| 355 |
SET DEBUG_SYNC = 'now WAIT_FOR start_dml1'; |
| 356 |
START TRANSACTION; |
| 357 |
CALL execute_dml(1, 0, 10, 10, 10, 1); |
| 358 |
COMMIT; |
| 359 |
# Flush all dirty buffers |
| 360 |
SET GLOBAL innodb_buf_flush_list_now = 1; |
| 361 |
SET DEBUG_SYNC = 'now SIGNAL resume_clone1'; |
| 362 |
SET DEBUG_SYNC = 'now WAIT_FOR start_dml2'; |
| 363 |
START TRANSACTION; |
| 364 |
call execute_dml(3, 0, 1, 1, 1, 0); |
| 365 |
call execute_dml(0, 0, 50, 50, 10, 0); |
| 366 |
COMMIT; |
| 367 |
# In connection default - Cloning database |
| 368 |
Got one of the listed errors |
| 369 |
# restart: |
| 370 |
SET DEBUG_SYNC = 'RESET'; |
| 371 |
SET DEBUG_SYNC = 'clone_file_copy SIGNAL start_dml1 WAIT_FOR resume_clone1'; |
| 372 |
SET DEBUG_SYNC = 'clone_page_copy SIGNAL start_dml2 WAIT_FOR resume_clone2'; |
| 373 |
SET DEBUG_SYNC = 'clone_redo_copy SIGNAL start_dml3 WAIT_FOR resume_clone3'; |
| 374 |
SET GLOBAL clone_autotune_concurrency = OFF; |
| 375 |
SET GLOBAL clone_max_concurrency = 8; |
| 376 |
CLONE LOCAL DATA DIRECTORY = 'CLONE_DATADIR'; |
| 377 |
# In connection con1 - Running Update Random [0 - 10 Key Range] |
| 378 |
SET DEBUG_SYNC = 'now WAIT_FOR start_dml1'; |
| 379 |
START TRANSACTION; |
| 380 |
CALL execute_dml(1, 0, 10, 10, 10, 1); |
| 381 |
COMMIT; |
| 382 |
# Flush all dirty buffers |
| 383 |
SET GLOBAL innodb_buf_flush_list_now = 1; |
| 384 |
SET DEBUG_SYNC = 'now SIGNAL resume_clone1'; |
| 385 |
SET DEBUG_SYNC = 'now WAIT_FOR start_dml2'; |
| 386 |
START TRANSACTION; |
| 387 |
call execute_dml(3, 0, 1, 1, 1, 0); |
| 388 |
call execute_dml(0, 0, 50, 50, 10, 0); |
| 389 |
COMMIT; |
| 390 |
# Flush all dirty buffers |
| 391 |
SET GLOBAL innodb_buf_flush_list_now = 1; |
| 392 |
SET DEBUG_SYNC = 'now SIGNAL resume_clone2'; |
| 393 |
SET DEBUG_SYNC = 'now WAIT_FOR start_dml3'; |
| 394 |
START TRANSACTION; |
| 395 |
call execute_dml(3, 0, 1, 1, 1, 0); |
| 396 |
call execute_dml(0, 0, 50, 50, 10, 0); |
| 397 |
COMMIT; |
| 398 |
# In connection default - Cloning database |
| 399 |
Got one of the listed errors |
| 400 |
# restart: |
| 401 |
DROP TABLE t1; |
| 402 |
DROP TABLE t2; |
| 403 |
DROP PROCEDURE execute_dml; |
| 404 |
UNINSTALL PLUGIN clone; |
| 405 |
SET DEBUG_SYNC = 'RESET'; |