| 1 |
include/master-slave.inc |
| 2 |
Warnings: |
| 3 |
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 4 |
Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information. |
| 5 |
[connection master] |
| 6 |
[connection slave] |
| 7 |
CALL mtr.add_suppression("You need to use --log-bin to make --binlog-format work"); |
| 8 |
SET @save_replica_parallel_workers= @@global.replica_parallel_workers; |
| 9 |
SET @save_replica_parallel_type= @@global.replica_parallel_type; |
| 10 |
Warnings: |
| 11 |
Warning 1287 '@@replica_parallel_type' is deprecated and will be removed in a future release. |
| 12 |
SET @save_replica_preserve_commit_order= @@global.replica_preserve_commit_order; |
| 13 |
SET GLOBAL replica_parallel_type = 'LOGICAL_CLOCK'; |
| 14 |
Warnings: |
| 15 |
Warning 1287 '@@replica_parallel_type' is deprecated and will be removed in a future release. |
| 16 |
SET GLOBAL replica_parallel_workers= 8; |
| 17 |
SET GLOBAL replica_preserve_commit_order= ON; |
| 18 |
include/start_slave.inc |
| 19 |
[connection master1] |
| 20 |
CALL mtr.add_suppression(".*Following users were specified in CREATE USER IF NOT EXISTS but they already exist.*"); |
| 21 |
CALL mtr.add_suppression(".*Following users were specified in ALTER USER IF EXISTS but they do not exist.*"); |
| 22 |
SET @save_binlog_transaction_dependency_tracking= @@global.binlog_transaction_dependency_tracking; |
| 23 |
Warnings: |
| 24 |
Warning 1287 '@@binlog_transaction_dependency_tracking' is deprecated and will be removed in a future release. |
| 25 |
SET @@global.binlog_transaction_dependency_tracking = COMMIT_ORDER; |
| 26 |
Warnings: |
| 27 |
Warning 1287 '@@binlog_transaction_dependency_tracking' is deprecated and will be removed in a future release. |
| 28 |
CREATE TABLE t1 (c1 INT PRIMARY KEY) ENGINE = InnoDB; |
| 29 |
CREATE TABLE t2 (c1 INT PRIMARY KEY) ENGINE = InnoDB; |
| 30 |
CREATE TABLE commands (a INT AUTO_INCREMENT PRIMARY KEY, b VARCHAR(100)); |
| 31 |
LOAD DATA INFILE '../../std_data/acl.csv' INTO TABLE commands(b); |
| 32 |
include/sync_slave_sql_with_master.inc |
| 33 |
|
| 34 |
# Check for CREATE USER u1; |
| 35 |
|
| 36 |
# Setup |
| 37 |
|
| 38 |
|
| 39 |
# Block slave sql applier threads |
| 40 |
|
| 41 |
[connection slave] |
| 42 |
BEGIN; INSERT INTO t1 VALUES (1);; |
| 43 |
[connection slave] |
| 44 |
[connection slave] |
| 45 |
|
| 46 |
# Generate the transactions which can be applied in parallel on slave |
| 47 |
|
| 48 |
[connection master] |
| 49 |
# Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug |
| 50 |
BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; CREATE USER u1;; |
| 51 |
[connection server_1] |
| 52 |
BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;; |
| 53 |
# Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug |
| 54 |
|
| 55 |
# Verify the transactions are ordered correctly on slave |
| 56 |
|
| 57 |
[connection server_2] |
| 58 |
include/assert.inc [Verify table t1 is empty] |
| 59 |
include/assert.inc [Verify table t2 is empty] |
| 60 |
[connection slave] |
| 61 |
include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation] |
| 62 |
|
| 63 |
# Rollback the first insert so that slave applier threads can |
| 64 |
# unblock and proceed. Verify the transactions are applied. |
| 65 |
|
| 66 |
[connection slave] |
| 67 |
ROLLBACK;; |
| 68 |
TRUNCATE TABLE t1; TRUNCATE TABLE t2;; |
| 69 |
include/sync_slave_sql_with_master.inc |
| 70 |
|
| 71 |
# Check for CREATE USER IF NOT EXISTS u1; |
| 72 |
|
| 73 |
# Setup |
| 74 |
|
| 75 |
|
| 76 |
# Block slave sql applier threads |
| 77 |
|
| 78 |
[connection slave] |
| 79 |
BEGIN; INSERT INTO t1 VALUES (1);; |
| 80 |
[connection slave] |
| 81 |
[connection slave] |
| 82 |
|
| 83 |
# Generate the transactions which can be applied in parallel on slave |
| 84 |
|
| 85 |
[connection master] |
| 86 |
# Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug |
| 87 |
BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; CREATE USER IF NOT EXISTS u1;; |
| 88 |
Warnings: |
| 89 |
Note 3163 Authorization ID 'u1'@'%' already exists. |
| 90 |
[connection server_1] |
| 91 |
BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;; |
| 92 |
# Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug |
| 93 |
|
| 94 |
# Verify the transactions are ordered correctly on slave |
| 95 |
|
| 96 |
[connection server_2] |
| 97 |
include/assert.inc [Verify table t1 is empty] |
| 98 |
include/assert.inc [Verify table t2 is empty] |
| 99 |
[connection slave] |
| 100 |
include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation] |
| 101 |
|
| 102 |
# Rollback the first insert so that slave applier threads can |
| 103 |
# unblock and proceed. Verify the transactions are applied. |
| 104 |
|
| 105 |
[connection slave] |
| 106 |
ROLLBACK;; |
| 107 |
TRUNCATE TABLE t1; TRUNCATE TABLE t2;; |
| 108 |
include/sync_slave_sql_with_master.inc |
| 109 |
|
| 110 |
# Check for CREATE USER IF NOT EXISTS u2; |
| 111 |
|
| 112 |
# Setup |
| 113 |
|
| 114 |
|
| 115 |
# Block slave sql applier threads |
| 116 |
|
| 117 |
[connection slave] |
| 118 |
BEGIN; INSERT INTO t1 VALUES (1);; |
| 119 |
[connection slave] |
| 120 |
[connection slave] |
| 121 |
|
| 122 |
# Generate the transactions which can be applied in parallel on slave |
| 123 |
|
| 124 |
[connection master] |
| 125 |
# Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug |
| 126 |
BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; CREATE USER IF NOT EXISTS u2;; |
| 127 |
[connection server_1] |
| 128 |
BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;; |
| 129 |
# Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug |
| 130 |
|
| 131 |
# Verify the transactions are ordered correctly on slave |
| 132 |
|
| 133 |
[connection server_2] |
| 134 |
include/assert.inc [Verify table t1 is empty] |
| 135 |
include/assert.inc [Verify table t2 is empty] |
| 136 |
[connection slave] |
| 137 |
include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation] |
| 138 |
|
| 139 |
# Rollback the first insert so that slave applier threads can |
| 140 |
# unblock and proceed. Verify the transactions are applied. |
| 141 |
|
| 142 |
[connection slave] |
| 143 |
ROLLBACK;; |
| 144 |
TRUNCATE TABLE t1; TRUNCATE TABLE t2;; |
| 145 |
include/sync_slave_sql_with_master.inc |
| 146 |
|
| 147 |
# Check for CREATE ROLE r1; |
| 148 |
|
| 149 |
# Setup |
| 150 |
|
| 151 |
|
| 152 |
# Block slave sql applier threads |
| 153 |
|
| 154 |
[connection slave] |
| 155 |
BEGIN; INSERT INTO t1 VALUES (1);; |
| 156 |
[connection slave] |
| 157 |
[connection slave] |
| 158 |
|
| 159 |
# Generate the transactions which can be applied in parallel on slave |
| 160 |
|
| 161 |
[connection master] |
| 162 |
# Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug |
| 163 |
BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; CREATE ROLE r1;; |
| 164 |
[connection server_1] |
| 165 |
BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;; |
| 166 |
# Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug |
| 167 |
|
| 168 |
# Verify the transactions are ordered correctly on slave |
| 169 |
|
| 170 |
[connection server_2] |
| 171 |
include/assert.inc [Verify table t1 is empty] |
| 172 |
include/assert.inc [Verify table t2 is empty] |
| 173 |
[connection slave] |
| 174 |
include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation] |
| 175 |
|
| 176 |
# Rollback the first insert so that slave applier threads can |
| 177 |
# unblock and proceed. Verify the transactions are applied. |
| 178 |
|
| 179 |
[connection slave] |
| 180 |
ROLLBACK;; |
| 181 |
TRUNCATE TABLE t1; TRUNCATE TABLE t2;; |
| 182 |
include/sync_slave_sql_with_master.inc |
| 183 |
|
| 184 |
# Check for GRANT SELECT ON *.* TO r1; |
| 185 |
|
| 186 |
# Setup |
| 187 |
|
| 188 |
|
| 189 |
# Block slave sql applier threads |
| 190 |
|
| 191 |
[connection slave] |
| 192 |
BEGIN; INSERT INTO t1 VALUES (1);; |
| 193 |
[connection slave] |
| 194 |
[connection slave] |
| 195 |
|
| 196 |
# Generate the transactions which can be applied in parallel on slave |
| 197 |
|
| 198 |
[connection master] |
| 199 |
# Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug |
| 200 |
BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; GRANT SELECT ON *.* TO r1;; |
| 201 |
[connection server_1] |
| 202 |
BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;; |
| 203 |
# Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug |
| 204 |
|
| 205 |
# Verify the transactions are ordered correctly on slave |
| 206 |
|
| 207 |
[connection server_2] |
| 208 |
include/assert.inc [Verify table t1 is empty] |
| 209 |
include/assert.inc [Verify table t2 is empty] |
| 210 |
[connection slave] |
| 211 |
include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation] |
| 212 |
|
| 213 |
# Rollback the first insert so that slave applier threads can |
| 214 |
# unblock and proceed. Verify the transactions are applied. |
| 215 |
|
| 216 |
[connection slave] |
| 217 |
ROLLBACK;; |
| 218 |
TRUNCATE TABLE t1; TRUNCATE TABLE t2;; |
| 219 |
include/sync_slave_sql_with_master.inc |
| 220 |
|
| 221 |
# Check for DROP ROLE r1; |
| 222 |
|
| 223 |
# Setup |
| 224 |
|
| 225 |
|
| 226 |
# Block slave sql applier threads |
| 227 |
|
| 228 |
[connection slave] |
| 229 |
BEGIN; INSERT INTO t1 VALUES (1);; |
| 230 |
[connection slave] |
| 231 |
[connection slave] |
| 232 |
|
| 233 |
# Generate the transactions which can be applied in parallel on slave |
| 234 |
|
| 235 |
[connection master] |
| 236 |
# Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug |
| 237 |
BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; DROP ROLE r1;; |
| 238 |
[connection server_1] |
| 239 |
BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;; |
| 240 |
# Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug |
| 241 |
|
| 242 |
# Verify the transactions are ordered correctly on slave |
| 243 |
|
| 244 |
[connection server_2] |
| 245 |
include/assert.inc [Verify table t1 is empty] |
| 246 |
include/assert.inc [Verify table t2 is empty] |
| 247 |
[connection slave] |
| 248 |
include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation] |
| 249 |
|
| 250 |
# Rollback the first insert so that slave applier threads can |
| 251 |
# unblock and proceed. Verify the transactions are applied. |
| 252 |
|
| 253 |
[connection slave] |
| 254 |
ROLLBACK;; |
| 255 |
TRUNCATE TABLE t1; TRUNCATE TABLE t2;; |
| 256 |
include/sync_slave_sql_with_master.inc |
| 257 |
|
| 258 |
# Check for GRANT SELECT ON db1.* TO u1; |
| 259 |
|
| 260 |
# Setup |
| 261 |
|
| 262 |
|
| 263 |
# Block slave sql applier threads |
| 264 |
|
| 265 |
[connection slave] |
| 266 |
BEGIN; INSERT INTO t1 VALUES (1);; |
| 267 |
[connection slave] |
| 268 |
[connection slave] |
| 269 |
|
| 270 |
# Generate the transactions which can be applied in parallel on slave |
| 271 |
|
| 272 |
[connection master] |
| 273 |
# Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug |
| 274 |
BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; GRANT SELECT ON db1.* TO u1;; |
| 275 |
[connection server_1] |
| 276 |
BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;; |
| 277 |
# Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug |
| 278 |
|
| 279 |
# Verify the transactions are ordered correctly on slave |
| 280 |
|
| 281 |
[connection server_2] |
| 282 |
include/assert.inc [Verify table t1 is empty] |
| 283 |
include/assert.inc [Verify table t2 is empty] |
| 284 |
[connection slave] |
| 285 |
include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation] |
| 286 |
|
| 287 |
# Rollback the first insert so that slave applier threads can |
| 288 |
# unblock and proceed. Verify the transactions are applied. |
| 289 |
|
| 290 |
[connection slave] |
| 291 |
ROLLBACK;; |
| 292 |
TRUNCATE TABLE t1; TRUNCATE TABLE t2;; |
| 293 |
include/sync_slave_sql_with_master.inc |
| 294 |
|
| 295 |
# Check for REVOKE ALL PRIVILEGES ON *.* FROM u1; |
| 296 |
|
| 297 |
# Setup |
| 298 |
|
| 299 |
|
| 300 |
# Block slave sql applier threads |
| 301 |
|
| 302 |
[connection slave] |
| 303 |
BEGIN; INSERT INTO t1 VALUES (1);; |
| 304 |
[connection slave] |
| 305 |
[connection slave] |
| 306 |
|
| 307 |
# Generate the transactions which can be applied in parallel on slave |
| 308 |
|
| 309 |
[connection master] |
| 310 |
# Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug |
| 311 |
BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; REVOKE ALL PRIVILEGES ON *.* FROM u1;; |
| 312 |
[connection server_1] |
| 313 |
BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;; |
| 314 |
# Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug |
| 315 |
|
| 316 |
# Verify the transactions are ordered correctly on slave |
| 317 |
|
| 318 |
[connection server_2] |
| 319 |
include/assert.inc [Verify table t1 is empty] |
| 320 |
include/assert.inc [Verify table t2 is empty] |
| 321 |
[connection slave] |
| 322 |
include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation] |
| 323 |
|
| 324 |
# Rollback the first insert so that slave applier threads can |
| 325 |
# unblock and proceed. Verify the transactions are applied. |
| 326 |
|
| 327 |
[connection slave] |
| 328 |
ROLLBACK;; |
| 329 |
TRUNCATE TABLE t1; TRUNCATE TABLE t2;; |
| 330 |
include/sync_slave_sql_with_master.inc |
| 331 |
|
| 332 |
# Check for RENAME USER u1 to u3; |
| 333 |
|
| 334 |
# Setup |
| 335 |
|
| 336 |
|
| 337 |
# Block slave sql applier threads |
| 338 |
|
| 339 |
[connection slave] |
| 340 |
BEGIN; INSERT INTO t1 VALUES (1);; |
| 341 |
[connection slave] |
| 342 |
[connection slave] |
| 343 |
|
| 344 |
# Generate the transactions which can be applied in parallel on slave |
| 345 |
|
| 346 |
[connection master] |
| 347 |
# Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug |
| 348 |
BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; RENAME USER u1 to u3;; |
| 349 |
[connection server_1] |
| 350 |
BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;; |
| 351 |
# Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug |
| 352 |
|
| 353 |
# Verify the transactions are ordered correctly on slave |
| 354 |
|
| 355 |
[connection server_2] |
| 356 |
include/assert.inc [Verify table t1 is empty] |
| 357 |
include/assert.inc [Verify table t2 is empty] |
| 358 |
[connection slave] |
| 359 |
include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation] |
| 360 |
|
| 361 |
# Rollback the first insert so that slave applier threads can |
| 362 |
# unblock and proceed. Verify the transactions are applied. |
| 363 |
|
| 364 |
[connection slave] |
| 365 |
ROLLBACK;; |
| 366 |
TRUNCATE TABLE t1; TRUNCATE TABLE t2;; |
| 367 |
include/sync_slave_sql_with_master.inc |
| 368 |
|
| 369 |
# Check for ALTER USER IF EXISTS u1 IDENTIFIED BY "pass"; |
| 370 |
|
| 371 |
# Setup |
| 372 |
|
| 373 |
|
| 374 |
# Block slave sql applier threads |
| 375 |
|
| 376 |
[connection slave] |
| 377 |
BEGIN; INSERT INTO t1 VALUES (1);; |
| 378 |
[connection slave] |
| 379 |
[connection slave] |
| 380 |
|
| 381 |
# Generate the transactions which can be applied in parallel on slave |
| 382 |
|
| 383 |
[connection master] |
| 384 |
# Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug |
| 385 |
BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER USER IF EXISTS u1 IDENTIFIED BY "pass";; |
| 386 |
Warnings: |
| 387 |
Note 3162 Authorization ID 'u1'@'%' does not exist. |
| 388 |
[connection server_1] |
| 389 |
BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;; |
| 390 |
# Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug |
| 391 |
|
| 392 |
# Verify the transactions are ordered correctly on slave |
| 393 |
|
| 394 |
[connection server_2] |
| 395 |
include/assert.inc [Verify table t1 is empty] |
| 396 |
include/assert.inc [Verify table t2 is empty] |
| 397 |
[connection slave] |
| 398 |
include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation] |
| 399 |
|
| 400 |
# Rollback the first insert so that slave applier threads can |
| 401 |
# unblock and proceed. Verify the transactions are applied. |
| 402 |
|
| 403 |
[connection slave] |
| 404 |
ROLLBACK;; |
| 405 |
TRUNCATE TABLE t1; TRUNCATE TABLE t2;; |
| 406 |
include/sync_slave_sql_with_master.inc |
| 407 |
|
| 408 |
# Check for ALTER USER IF EXISTS u3 IDENTIFIED BY "pass"; |
| 409 |
|
| 410 |
# Setup |
| 411 |
|
| 412 |
|
| 413 |
# Block slave sql applier threads |
| 414 |
|
| 415 |
[connection slave] |
| 416 |
BEGIN; INSERT INTO t1 VALUES (1);; |
| 417 |
[connection slave] |
| 418 |
[connection slave] |
| 419 |
|
| 420 |
# Generate the transactions which can be applied in parallel on slave |
| 421 |
|
| 422 |
[connection master] |
| 423 |
# Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug |
| 424 |
BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER USER IF EXISTS u3 IDENTIFIED BY "pass";; |
| 425 |
[connection server_1] |
| 426 |
BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;; |
| 427 |
# Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug |
| 428 |
|
| 429 |
# Verify the transactions are ordered correctly on slave |
| 430 |
|
| 431 |
[connection server_2] |
| 432 |
include/assert.inc [Verify table t1 is empty] |
| 433 |
include/assert.inc [Verify table t2 is empty] |
| 434 |
[connection slave] |
| 435 |
include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation] |
| 436 |
|
| 437 |
# Rollback the first insert so that slave applier threads can |
| 438 |
# unblock and proceed. Verify the transactions are applied. |
| 439 |
|
| 440 |
[connection slave] |
| 441 |
ROLLBACK;; |
| 442 |
TRUNCATE TABLE t1; TRUNCATE TABLE t2;; |
| 443 |
include/sync_slave_sql_with_master.inc |
| 444 |
|
| 445 |
# Check for ALTER USER u3 IDENTIFIED BY "pass3"; |
| 446 |
|
| 447 |
# Setup |
| 448 |
|
| 449 |
|
| 450 |
# Block slave sql applier threads |
| 451 |
|
| 452 |
[connection slave] |
| 453 |
BEGIN; INSERT INTO t1 VALUES (1);; |
| 454 |
[connection slave] |
| 455 |
[connection slave] |
| 456 |
|
| 457 |
# Generate the transactions which can be applied in parallel on slave |
| 458 |
|
| 459 |
[connection master] |
| 460 |
# Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug |
| 461 |
BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; ALTER USER u3 IDENTIFIED BY "pass3";; |
| 462 |
[connection server_1] |
| 463 |
BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;; |
| 464 |
# Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug |
| 465 |
|
| 466 |
# Verify the transactions are ordered correctly on slave |
| 467 |
|
| 468 |
[connection server_2] |
| 469 |
include/assert.inc [Verify table t1 is empty] |
| 470 |
include/assert.inc [Verify table t2 is empty] |
| 471 |
[connection slave] |
| 472 |
include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation] |
| 473 |
|
| 474 |
# Rollback the first insert so that slave applier threads can |
| 475 |
# unblock and proceed. Verify the transactions are applied. |
| 476 |
|
| 477 |
[connection slave] |
| 478 |
ROLLBACK;; |
| 479 |
TRUNCATE TABLE t1; TRUNCATE TABLE t2;; |
| 480 |
include/sync_slave_sql_with_master.inc |
| 481 |
|
| 482 |
# Check for DROP USER u3; |
| 483 |
|
| 484 |
# Setup |
| 485 |
|
| 486 |
|
| 487 |
# Block slave sql applier threads |
| 488 |
|
| 489 |
[connection slave] |
| 490 |
BEGIN; INSERT INTO t1 VALUES (1);; |
| 491 |
[connection slave] |
| 492 |
[connection slave] |
| 493 |
|
| 494 |
# Generate the transactions which can be applied in parallel on slave |
| 495 |
|
| 496 |
[connection master] |
| 497 |
# Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug |
| 498 |
BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; DROP USER u3;; |
| 499 |
[connection server_1] |
| 500 |
BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;; |
| 501 |
# Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug |
| 502 |
|
| 503 |
# Verify the transactions are ordered correctly on slave |
| 504 |
|
| 505 |
[connection server_2] |
| 506 |
include/assert.inc [Verify table t1 is empty] |
| 507 |
include/assert.inc [Verify table t2 is empty] |
| 508 |
[connection slave] |
| 509 |
include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation] |
| 510 |
|
| 511 |
# Rollback the first insert so that slave applier threads can |
| 512 |
# unblock and proceed. Verify the transactions are applied. |
| 513 |
|
| 514 |
[connection slave] |
| 515 |
ROLLBACK;; |
| 516 |
TRUNCATE TABLE t1; TRUNCATE TABLE t2;; |
| 517 |
include/sync_slave_sql_with_master.inc |
| 518 |
|
| 519 |
# Check for DROP USER IF EXISTS u1; |
| 520 |
|
| 521 |
# Setup |
| 522 |
|
| 523 |
|
| 524 |
# Block slave sql applier threads |
| 525 |
|
| 526 |
[connection slave] |
| 527 |
BEGIN; INSERT INTO t1 VALUES (1);; |
| 528 |
[connection slave] |
| 529 |
[connection slave] |
| 530 |
|
| 531 |
# Generate the transactions which can be applied in parallel on slave |
| 532 |
|
| 533 |
[connection master] |
| 534 |
# Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug |
| 535 |
BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; DROP USER IF EXISTS u1;; |
| 536 |
Warnings: |
| 537 |
Note 3162 Authorization ID 'u1'@'%' does not exist. |
| 538 |
[connection server_1] |
| 539 |
BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;; |
| 540 |
# Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug |
| 541 |
|
| 542 |
# Verify the transactions are ordered correctly on slave |
| 543 |
|
| 544 |
[connection server_2] |
| 545 |
include/assert.inc [Verify table t1 is empty] |
| 546 |
include/assert.inc [Verify table t2 is empty] |
| 547 |
[connection slave] |
| 548 |
include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation] |
| 549 |
|
| 550 |
# Rollback the first insert so that slave applier threads can |
| 551 |
# unblock and proceed. Verify the transactions are applied. |
| 552 |
|
| 553 |
[connection slave] |
| 554 |
ROLLBACK;; |
| 555 |
TRUNCATE TABLE t1; TRUNCATE TABLE t2;; |
| 556 |
include/sync_slave_sql_with_master.inc |
| 557 |
|
| 558 |
# Check for DROP USER IF EXISTS u2; |
| 559 |
|
| 560 |
# Setup |
| 561 |
|
| 562 |
|
| 563 |
# Block slave sql applier threads |
| 564 |
|
| 565 |
[connection slave] |
| 566 |
BEGIN; INSERT INTO t1 VALUES (1);; |
| 567 |
[connection slave] |
| 568 |
[connection slave] |
| 569 |
|
| 570 |
# Generate the transactions which can be applied in parallel on slave |
| 571 |
|
| 572 |
[connection master] |
| 573 |
# Adding debug point 'set_commit_parent_100' to @@GLOBAL.debug |
| 574 |
BEGIN; INSERT INTO t1 VALUES (1); COMMIT; BEGIN; INSERT INTO t1 VALUES (2); COMMIT; DROP USER IF EXISTS u2;; |
| 575 |
[connection server_1] |
| 576 |
BEGIN; INSERT INTO t1 VALUES (5); COMMIT; BEGIN; INSERT INTO t1 VALUES (6); COMMIT; BEGIN; INSERT INTO t1 VALUES (7); COMMIT;; |
| 577 |
# Removing debug point 'set_commit_parent_100' from @@GLOBAL.debug |
| 578 |
|
| 579 |
# Verify the transactions are ordered correctly on slave |
| 580 |
|
| 581 |
[connection server_2] |
| 582 |
include/assert.inc [Verify table t1 is empty] |
| 583 |
include/assert.inc [Verify table t2 is empty] |
| 584 |
[connection slave] |
| 585 |
include/assert.inc [Exactly 0 GTIDs should have been committed since last invocation] |
| 586 |
|
| 587 |
# Rollback the first insert so that slave applier threads can |
| 588 |
# unblock and proceed. Verify the transactions are applied. |
| 589 |
|
| 590 |
[connection slave] |
| 591 |
ROLLBACK;; |
| 592 |
TRUNCATE TABLE t1; TRUNCATE TABLE t2;; |
| 593 |
include/sync_slave_sql_with_master.inc |
| 594 |
|
| 595 |
# Cleanup |
| 596 |
|
| 597 |
[connection master1] |
| 598 |
SET GLOBAL binlog_transaction_dependency_tracking=@save_binlog_transaction_dependency_tracking; |
| 599 |
Warnings: |
| 600 |
Warning 1287 '@@binlog_transaction_dependency_tracking' is deprecated and will be removed in a future release. |
| 601 |
DROP TABLE t1,t2,commands; |
| 602 |
include/sync_slave_sql_with_master.inc |
| 603 |
include/stop_slave.inc |
| 604 |
SET GLOBAL replica_parallel_type=@save_replica_parallel_type; |
| 605 |
Warnings: |
| 606 |
Warning 1287 '@@replica_parallel_type' is deprecated and will be removed in a future release. |
| 607 |
SET GLOBAL replica_parallel_workers=@save_replica_parallel_workers; |
| 608 |
SET GLOBAL replica_preserve_commit_order=@save_replica_preserve_commit_order; |
| 609 |
include/start_slave.inc |
| 610 |
include/rpl_end.inc |