1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337
|
include/master-slave.inc
Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
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.
[connection master]
CREATE DATABASE db1;
CREATE DATABASE db2;
CREATE DATABASE db3;
CREATE TABLE db1.t1(c1 INT PRIMARY KEY, c2 CHAR(20));
CREATE TABLE db2.t1(c1 INT PRIMARY KEY, c2 CHAR(20));
CREATE TABLE db3.t1(c1 INT PRIMARY KEY, c2 CHAR(20));
CREATE VIEW db1.v1 AS SELECT * FROM db1.t1 WHERE c1 <= 4;
include/sync_slave_sql_with_master.inc
include/stop_slave_sql.inc
SET @saved_replica_parallel_type = @@GLOBAL.replica_parallel_type;
Warnings:
Warning 1287 '@@replica_parallel_type' is deprecated and will be removed in a future release.
SET @saved_replica_parallel_workers = @@GLOBAL.replica_parallel_workers;
SET @saved_replica_preserve_commit_order = @@GLOBAL.replica_preserve_commit_order;
SET @saved_innodb_lock_wait_timeout = @@GLOBAL.innodb_lock_wait_timeout;
SET @saved_relay_log_purge = @@GLOBAL.relay_log_purge;
SET GLOBAL innodb_lock_wait_timeout = 1000;
SET GLOBAL relay_log_purge = FALSE;
SET GLOBAL replica_parallel_type = "LOGICAL_CLOCK";
Warnings:
Warning 1287 '@@replica_parallel_type' is deprecated and will be removed in a future release.
SET GLOBAL replica_parallel_workers = 4;
SET GLOBAL replica_preserve_commit_order=0;
[connection slave]
include/stop_slave_sql.inc
Warnings:
Note 3084 Replication thread(s) for channel '' are already stopped.
[connection master]
SET debug="d,set_commit_parent_100";
INSERT INTO db1.t1 VALUES(1, 'SOURCE_POS');
INSERT INTO db1.t1 VALUES(2, 'SOURCE_POS');
INSERT INTO db2.t1 VALUES(1, 'SOURCE_POS');
INSERT INTO db2.t1 VALUES(2, 'SOURCE_POS');
INSERT INTO db3.t1 VALUES(1, 'SOURCE_POS');
INSERT INTO db3.t1 VALUES(2, 'SOURCE_POS');
FLUSH BINARY LOGS;
INSERT INTO db1.t1 VALUES(3, 'SOURCE_POS');
INSERT INTO db1.t1 VALUES(4, 'SOURCE_POS');
INSERT INTO db2.t1 VALUES(3, 'SOURCE_POS');
INSERT INTO db2.t1 VALUES(4, 'SOURCE_POS');
INSERT INTO db3.t1 VALUES(3, 'SOURCE_POS');
INSERT INTO db3.t1 VALUES(4, 'SOURCE_POS');
INSERT INTO db1.t1 VALUES(5, 'SOURCE_POS');
INSERT INTO db1.t1 VALUES(6, 'SOURCE_POS');
INSERT INTO db2.t1 VALUES(5, 'SOURCE_POS');
INSERT INTO db2.t1 VALUES(6, 'SOURCE_POS');
INSERT INTO db3.t1 VALUES(5, 'SOURCE_POS');
INSERT INTO db3.t1 VALUES(6, 'SOURCE_POS');
include/save_master_pos.inc
[connection server_2]
BEGIN;
INSERT INTO db1.t1 VALUES(4, "block a worker");
[connection slave]
START SLAVE SQL_THREAD UNTIL SOURCE_LOG_FILE="SOURCE_LOG_FILE", SOURCE_LOG_POS=SOURCE_LOG_POS;
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
[connection server_2]
ROLLBACK;
include/wait_for_slave_sql_to_stop.inc
include/diff_tables.inc [master:db1.v1, slave:db1.t1, slave:db2.t1, slave:db3.t1]
START SLAVE SQL_THREAD UNTIL SAME_UNTIO_OPTION;
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_stop.inc
include/diff_tables.inc [master:db1.v1, slave:db1.t1, slave:db2.t1, slave:db3.t1]
include/start_slave_sql.inc
[connection master]
TRUNCATE db1.t1;
TRUNCATE db2.t1;
TRUNCATE db3.t1;
include/sync_slave_sql_with_master.inc
[connection slave]
include/stop_slave_sql.inc
[connection master]
SET debug="d,set_commit_parent_100";
INSERT INTO db1.t1 VALUES(1, 'RELAY_POS');
INSERT INTO db1.t1 VALUES(2, 'RELAY_POS');
INSERT INTO db2.t1 VALUES(1, 'RELAY_POS');
INSERT INTO db2.t1 VALUES(2, 'RELAY_POS');
INSERT INTO db3.t1 VALUES(1, 'RELAY_POS');
INSERT INTO db3.t1 VALUES(2, 'RELAY_POS');
FLUSH BINARY LOGS;
INSERT INTO db1.t1 VALUES(3, 'RELAY_POS');
INSERT INTO db1.t1 VALUES(4, 'RELAY_POS');
INSERT INTO db2.t1 VALUES(3, 'RELAY_POS');
INSERT INTO db2.t1 VALUES(4, 'RELAY_POS');
INSERT INTO db3.t1 VALUES(3, 'RELAY_POS');
INSERT INTO db3.t1 VALUES(4, 'RELAY_POS');
include/sync_slave_io_with_master.inc
include/include/rpl_get_end_of_relay_log.inc
[connection master]
INSERT INTO db1.t1 VALUES(5, 'RELAY_POS');
INSERT INTO db1.t1 VALUES(6, 'RELAY_POS');
INSERT INTO db2.t1 VALUES(5, 'RELAY_POS');
INSERT INTO db2.t1 VALUES(6, 'RELAY_POS');
INSERT INTO db3.t1 VALUES(5, 'RELAY_POS');
INSERT INTO db3.t1 VALUES(6, 'RELAY_POS');
include/save_master_pos.inc
[connection server_2]
BEGIN;
INSERT INTO db1.t1 VALUES(4, "block a worker");
[connection slave]
START SLAVE SQL_THREAD UNTIL RELAY_LOG_FILE="RELAY_LOG_FILE", RELAY_LOG_POS=RELAY_LOG_POS;
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
[connection server_2]
ROLLBACK;
include/wait_for_slave_sql_to_stop.inc
include/diff_tables.inc [master:db1.v1, slave:db1.t1, slave:db2.t1, slave:db3.t1]
START SLAVE SQL_THREAD UNTIL SAME_UNTIO_OPTION;
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_stop.inc
include/diff_tables.inc [master:db1.v1, slave:db1.t1, slave:db2.t1, slave:db3.t1]
include/start_slave_sql.inc
[connection master]
TRUNCATE db1.t1;
TRUNCATE db2.t1;
TRUNCATE db3.t1;
include/sync_slave_sql_with_master.inc
[connection slave]
include/stop_slave_sql.inc
[connection master]
SET debug="d,set_commit_parent_100";
INSERT INTO db1.t1 VALUES(1, 'BEFORE_GTIDS');
INSERT INTO db1.t1 VALUES(2, 'BEFORE_GTIDS');
INSERT INTO db2.t1 VALUES(1, 'BEFORE_GTIDS');
INSERT INTO db2.t1 VALUES(2, 'BEFORE_GTIDS');
INSERT INTO db3.t1 VALUES(1, 'BEFORE_GTIDS');
INSERT INTO db3.t1 VALUES(2, 'BEFORE_GTIDS');
FLUSH BINARY LOGS;
INSERT INTO db1.t1 VALUES(3, 'BEFORE_GTIDS');
INSERT INTO db1.t1 VALUES(4, 'BEFORE_GTIDS');
INSERT INTO db2.t1 VALUES(3, 'BEFORE_GTIDS');
INSERT INTO db2.t1 VALUES(4, 'BEFORE_GTIDS');
INSERT INTO db3.t1 VALUES(3, 'BEFORE_GTIDS');
INSERT INTO db3.t1 VALUES(4, 'BEFORE_GTIDS');
SET @gtids_should_applied = @@GLOBAL.gtid_executed;
INSERT INTO db1.t1 VALUES(5, 'BEFORE_GTIDS');
INSERT INTO db1.t1 VALUES(6, 'BEFORE_GTIDS');
INSERT INTO db2.t1 VALUES(5, 'BEFORE_GTIDS');
INSERT INTO db2.t1 VALUES(6, 'BEFORE_GTIDS');
INSERT INTO db3.t1 VALUES(5, 'BEFORE_GTIDS');
INSERT INTO db3.t1 VALUES(6, 'BEFORE_GTIDS');
include/save_master_pos.inc
[connection server_2]
BEGIN;
INSERT INTO db1.t1 VALUES(4, "block a worker");
[connection slave]
START SLAVE SQL_THREAD UNTIL SQL_BEFORE_GTIDS="GTIDS";
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
[connection server_2]
ROLLBACK;
include/wait_for_slave_sql_to_stop.inc
include/diff_tables.inc [master:db1.v1, slave:db1.t1, slave:db2.t1, slave:db3.t1]
START SLAVE SQL_THREAD UNTIL SAME_UNTIO_OPTION;
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_stop.inc
include/diff_tables.inc [master:db1.v1, slave:db1.t1, slave:db2.t1, slave:db3.t1]
include/start_slave_sql.inc
[connection master]
TRUNCATE db1.t1;
TRUNCATE db2.t1;
TRUNCATE db3.t1;
include/sync_slave_sql_with_master.inc
include/stop_slave_sql.inc
SET GLOBAL replica_parallel_type = "DATABASE";
Warnings:
Warning 1287 '@@replica_parallel_type' is deprecated and will be removed in a future release.
SET GLOBAL replica_parallel_workers = 4;
SET GLOBAL innodb_lock_wait_timeout = 1000;
SET GLOBAL relay_log_purge = FALSE;
[connection slave]
include/stop_slave_sql.inc
Warnings:
Note 3084 Replication thread(s) for channel '' are already stopped.
[connection master]
SET debug="d,set_commit_parent_100";
INSERT INTO db1.t1 VALUES(1, 'SOURCE_POS');
INSERT INTO db1.t1 VALUES(2, 'SOURCE_POS');
INSERT INTO db2.t1 VALUES(1, 'SOURCE_POS');
INSERT INTO db2.t1 VALUES(2, 'SOURCE_POS');
INSERT INTO db3.t1 VALUES(1, 'SOURCE_POS');
INSERT INTO db3.t1 VALUES(2, 'SOURCE_POS');
FLUSH BINARY LOGS;
INSERT INTO db1.t1 VALUES(3, 'SOURCE_POS');
INSERT INTO db1.t1 VALUES(4, 'SOURCE_POS');
INSERT INTO db2.t1 VALUES(3, 'SOURCE_POS');
INSERT INTO db2.t1 VALUES(4, 'SOURCE_POS');
INSERT INTO db3.t1 VALUES(3, 'SOURCE_POS');
INSERT INTO db3.t1 VALUES(4, 'SOURCE_POS');
INSERT INTO db1.t1 VALUES(5, 'SOURCE_POS');
INSERT INTO db1.t1 VALUES(6, 'SOURCE_POS');
INSERT INTO db2.t1 VALUES(5, 'SOURCE_POS');
INSERT INTO db2.t1 VALUES(6, 'SOURCE_POS');
INSERT INTO db3.t1 VALUES(5, 'SOURCE_POS');
INSERT INTO db3.t1 VALUES(6, 'SOURCE_POS');
include/save_master_pos.inc
[connection server_2]
BEGIN;
INSERT INTO db1.t1 VALUES(4, "block a worker");
[connection slave]
START SLAVE SQL_THREAD UNTIL SOURCE_LOG_FILE="SOURCE_LOG_FILE", SOURCE_LOG_POS=SOURCE_LOG_POS;
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
[connection server_2]
ROLLBACK;
include/wait_for_slave_sql_to_stop.inc
include/diff_tables.inc [master:db1.v1, slave:db1.t1, slave:db2.t1, slave:db3.t1]
START SLAVE SQL_THREAD UNTIL SAME_UNTIO_OPTION;
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_stop.inc
include/diff_tables.inc [master:db1.v1, slave:db1.t1, slave:db2.t1, slave:db3.t1]
include/start_slave_sql.inc
[connection master]
TRUNCATE db1.t1;
TRUNCATE db2.t1;
TRUNCATE db3.t1;
include/sync_slave_sql_with_master.inc
[connection slave]
include/stop_slave_sql.inc
[connection master]
SET debug="d,set_commit_parent_100";
INSERT INTO db1.t1 VALUES(1, 'RELAY_POS');
INSERT INTO db1.t1 VALUES(2, 'RELAY_POS');
INSERT INTO db2.t1 VALUES(1, 'RELAY_POS');
INSERT INTO db2.t1 VALUES(2, 'RELAY_POS');
INSERT INTO db3.t1 VALUES(1, 'RELAY_POS');
INSERT INTO db3.t1 VALUES(2, 'RELAY_POS');
FLUSH BINARY LOGS;
INSERT INTO db1.t1 VALUES(3, 'RELAY_POS');
INSERT INTO db1.t1 VALUES(4, 'RELAY_POS');
INSERT INTO db2.t1 VALUES(3, 'RELAY_POS');
INSERT INTO db2.t1 VALUES(4, 'RELAY_POS');
INSERT INTO db3.t1 VALUES(3, 'RELAY_POS');
INSERT INTO db3.t1 VALUES(4, 'RELAY_POS');
include/sync_slave_io_with_master.inc
include/include/rpl_get_end_of_relay_log.inc
[connection master]
INSERT INTO db1.t1 VALUES(5, 'RELAY_POS');
INSERT INTO db1.t1 VALUES(6, 'RELAY_POS');
INSERT INTO db2.t1 VALUES(5, 'RELAY_POS');
INSERT INTO db2.t1 VALUES(6, 'RELAY_POS');
INSERT INTO db3.t1 VALUES(5, 'RELAY_POS');
INSERT INTO db3.t1 VALUES(6, 'RELAY_POS');
include/save_master_pos.inc
[connection server_2]
BEGIN;
INSERT INTO db1.t1 VALUES(4, "block a worker");
[connection slave]
START SLAVE SQL_THREAD UNTIL RELAY_LOG_FILE="RELAY_LOG_FILE", RELAY_LOG_POS=RELAY_LOG_POS;
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
[connection server_2]
ROLLBACK;
include/wait_for_slave_sql_to_stop.inc
include/diff_tables.inc [master:db1.v1, slave:db1.t1, slave:db2.t1, slave:db3.t1]
START SLAVE SQL_THREAD UNTIL SAME_UNTIO_OPTION;
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_stop.inc
include/diff_tables.inc [master:db1.v1, slave:db1.t1, slave:db2.t1, slave:db3.t1]
include/start_slave_sql.inc
[connection master]
TRUNCATE db1.t1;
TRUNCATE db2.t1;
TRUNCATE db3.t1;
include/sync_slave_sql_with_master.inc
[connection slave]
include/stop_slave_sql.inc
[connection master]
SET debug="d,set_commit_parent_100";
INSERT INTO db1.t1 VALUES(1, 'BEFORE_GTIDS');
INSERT INTO db1.t1 VALUES(2, 'BEFORE_GTIDS');
INSERT INTO db2.t1 VALUES(1, 'BEFORE_GTIDS');
INSERT INTO db2.t1 VALUES(2, 'BEFORE_GTIDS');
INSERT INTO db3.t1 VALUES(1, 'BEFORE_GTIDS');
INSERT INTO db3.t1 VALUES(2, 'BEFORE_GTIDS');
FLUSH BINARY LOGS;
INSERT INTO db1.t1 VALUES(3, 'BEFORE_GTIDS');
INSERT INTO db1.t1 VALUES(4, 'BEFORE_GTIDS');
INSERT INTO db2.t1 VALUES(3, 'BEFORE_GTIDS');
INSERT INTO db2.t1 VALUES(4, 'BEFORE_GTIDS');
INSERT INTO db3.t1 VALUES(3, 'BEFORE_GTIDS');
INSERT INTO db3.t1 VALUES(4, 'BEFORE_GTIDS');
SET @gtids_should_applied = @@GLOBAL.gtid_executed;
INSERT INTO db1.t1 VALUES(5, 'BEFORE_GTIDS');
INSERT INTO db1.t1 VALUES(6, 'BEFORE_GTIDS');
INSERT INTO db2.t1 VALUES(5, 'BEFORE_GTIDS');
INSERT INTO db2.t1 VALUES(6, 'BEFORE_GTIDS');
INSERT INTO db3.t1 VALUES(5, 'BEFORE_GTIDS');
INSERT INTO db3.t1 VALUES(6, 'BEFORE_GTIDS');
include/save_master_pos.inc
[connection server_2]
BEGIN;
INSERT INTO db1.t1 VALUES(4, "block a worker");
[connection slave]
START SLAVE SQL_THREAD UNTIL SQL_BEFORE_GTIDS="GTIDS";
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
[connection server_2]
ROLLBACK;
include/wait_for_slave_sql_to_stop.inc
include/diff_tables.inc [master:db1.v1, slave:db1.t1, slave:db2.t1, slave:db3.t1]
START SLAVE SQL_THREAD UNTIL SAME_UNTIO_OPTION;
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_stop.inc
include/diff_tables.inc [master:db1.v1, slave:db1.t1, slave:db2.t1, slave:db3.t1]
include/start_slave_sql.inc
[connection master]
TRUNCATE db1.t1;
TRUNCATE db2.t1;
TRUNCATE db3.t1;
include/sync_slave_sql_with_master.inc
[connection master]
DROP DATABASE db1;
DROP DATABASE db2;
DROP DATABASE db3;
include/sync_slave_sql_with_master.inc
include/stop_slave_sql.inc
SET GLOBAL replica_parallel_type = @saved_replica_parallel_type;
Warnings:
Warning 1287 '@@replica_parallel_type' is deprecated and will be removed in a future release.
SET GLOBAL replica_parallel_workers = @saved_replica_parallel_workers;
SET GLOBAL replica_preserve_commit_order= @saved_replica_preserve_commit_order;
SET GLOBAL innodb_lock_wait_timeout = @saved_innodb_lock_wait_timeout;
SET GLOBAL relay_log_purge = @saved_relay_log_purge;
include/rpl_end.inc
|