| 1 |
include/master-slave.inc |
| 2 |
[connection master] |
| 3 |
"Command: STOP SLAVE --> STOP REPLICA" |
| 4 |
connection slave; |
| 5 |
STOP REPLICA; |
| 6 |
include/wait_for_slave_io_to_stop.inc |
| 7 |
include/wait_for_slave_sql_to_stop.inc |
| 8 |
connection master; |
| 9 |
CREATE USER 'repl_user'; |
| 10 |
"Privilege: SLAVE --> REPLICA" |
| 11 |
GRANT REPLICATION REPLICA on *.* TO repl_user; |
| 12 |
FLUSH PRIVILEGES; |
| 13 |
connection slave; |
| 14 |
"SHOW SLAVE STATUS --> SHOW REPLICA STATUS" |
| 15 |
CHANGE MASTER TO MASTER_USER= 'repl_user'; |
| 16 |
"Command: START SLAVE --> START REPLICA" |
| 17 |
START REPLICA; |
| 18 |
include/wait_for_slave_io_to_start.inc |
| 19 |
include/wait_for_slave_sql_to_start.inc |
| 20 |
connection master; |
| 21 |
connection slave; |
| 22 |
connection master; |
| 23 |
"Command: SHOW SLAVE HOSTS --> SHOW REPLICA HOSTS" |
| 24 |
DROP USER 'repl_user'; |
| 25 |
connection slave; |
| 26 |
"Command: SHOW SLAVE IO/SQL THREAD --> SHOW REPLICA IO/SQL THREAD" |
| 27 |
STOP REPLICA IO_THREAD; |
| 28 |
STOP REPLICA SQL_THREAD; |
| 29 |
include/wait_for_slave_io_to_stop.inc |
| 30 |
include/wait_for_slave_sql_to_stop.inc |
| 31 |
"Command: RESET SLAVE ALL --> RESET REPLICA ALL" |
| 32 |
RESET REPLICA ALL; |
| 33 |
set @@global.gtid_slave_pos= ""; |
| 34 |
connection master; |
| 35 |
RESET MASTER; |
| 36 |
CREATE TABLE t(f INT) ENGINE=INNODB; |
| 37 |
INSERT INTO t VALUES (10); |
| 38 |
DROP TABLE t; |
| 39 |
connection slave; |
| 40 |
CHANGE MASTER TO MASTER_HOST='127.0.0.1',MASTER_PORT=MASTER_PORT,MASTER_USER='root'; |
| 41 |
"Command: START SLAVE UNTIL --> START REPLICA UNTIL" |
| 42 |
START REPLICA UNTIL MASTER_LOG_FILE='MASTER_LOG_FILE', MASTER_LOG_POS=MASTER_POS; |
| 43 |
include/wait_for_slave_sql_to_stop.inc |
| 44 |
include/stop_slave_io.inc |
| 45 |
SELECT * FROM t; |
| 46 |
f |
| 47 |
10 |
| 48 |
include/check_slave_param.inc [Exec_Master_Log_Pos] |
| 49 |
"MASTER_USE_GTID=SLAVE_POS --> MASTER_USE_GTID=REPLICA_POS" |
| 50 |
CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT, MASTER_USE_GTID=REPLICA_POS; |
| 51 |
include/start_slave.inc |
| 52 |
connection master; |
| 53 |
CREATE TABLE t2 (f INT PRIMARY KEY) ENGINE=INNODB; |
| 54 |
INSERT INTO t2 VALUES (10); |
| 55 |
DROP TABLE t2; |
| 56 |
include/rpl_end.inc |