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
|
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]
[connection master]
CREATE TABLE mem_t1 (c1 INT) ENGINE= MEMORY;
CREATE TABLE mem_t2 (c1 INT) ENGINE= MEMORY;
CREATE TABLE mem_t3 (c1 INT) ENGINE= MEMORY;
CREATE TABLE mem_t4 (c1 INT) ENGINE= MEMORY;
CREATE TABLE mem_t5 (c1 INT) ENGINE= MEMORY;
CREATE TABLE mem_t6 (c1 INT) ENGINE= MEMORY;
CREATE TABLE mem_t7 (c1 INT) ENGINE= MEMORY;
CREATE TABLE mem_t8 (c1 INT) ENGINE= MEMORY;
INSERT INTO mem_t1 VALUES (1), (2), (3), (4);
INSERT INTO mem_t2 VALUES (1), (2), (3), (4);
INSERT INTO mem_t3 VALUES (1), (2), (3), (4);
INSERT INTO mem_t4 VALUES (1), (2), (3), (4);
INSERT INTO mem_t5 VALUES (1), (2), (3), (4);
INSERT INTO mem_t6 VALUES (1), (2), (3), (4);
INSERT INTO mem_t7 VALUES (1), (2), (3), (4);
INSERT INTO mem_t8 VALUES (1), (2), (3), (4);
include/sync_slave_sql_with_master.inc
include/stop_slave.inc
include/rpl_restart_server.inc [server_number=1]
include/start_slave.inc
[connection master]
include/save_binlog_position.inc
INSERT INTO mem_t1 VALUES (1), (2), (3), (4);
include/sync_slave_sql_with_master.inc
[connection master]
include/assert_binlog_events.inc [#Gtid # !Q(TRUNCATE.*) #Gtid # !Begin # !Insert # !Commit]
include/save_binlog_position.inc
ALTER TABLE mem_t2 ADD COLUMN (c2 INT);
include/sync_slave_sql_with_master.inc
[connection master]
include/assert_binlog_events.inc [#Gtid # !Q(TRUNCATE.*) #Gtid # !Q(ALTER.*)]
include/save_binlog_position.inc
CREATE TABLE mem_t9 LIKE mem_t3;
include/sync_slave_sql_with_master.inc
[connection master]
include/assert_binlog_events.inc [#Gtid # !Q(TRUNCATE.*) #Gtid # !Q(CREATE.*)]
include/save_binlog_position.inc
BEGIN;
INSERT INTO mem_t4 VALUES (1), (2), (3), (4);
INSERT INTO mem_t5 VALUES (1), (2), (3), (4);
COMMIT;
include/sync_slave_sql_with_master.inc
[connection master]
include/assert_binlog_events.inc [#Gtid # !Q(TRUNCATE.*) #Gtid # !Begin # !Insert # !Commit #Gtid # !Q(TRUNCATE.*) #Gtid # !Begin # !Insert # !Commit]
include/save_binlog_position.inc
UPDATE mem_t6, mem_t7 SET mem_t6.c1 = mem_t6.c1 + 1, mem_t7.c1 = mem_t7.c1 + 1;
include/sync_slave_sql_with_master.inc
[connection master]
include/assert_binlog_events.inc [#Gtid # !Q(TRUNCATE.*) #Gtid # !Q(TRUNCATE.*)]
include/save_binlog_position.inc
SET @@session.gtid_next = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1';
INSERT INTO mem_t8 VALUES (1), (2), (3), (4);
SET @@session.gtid_next = 'AUTOMATIC';
include/sync_slave_sql_with_master.inc
[connection master]
include/assert_binlog_events.inc [#Gtid # !Q(TRUNCATE.*) #Gtid/(.*'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1')# !Begin # !Insert # !Commit]
DROP TABLE mem_t1, mem_t2, mem_t3, mem_t4, mem_t5, mem_t6, mem_t7, mem_t8, mem_t9;
include/rpl_reset.inc
[connection master]
CREATE TABLE mem_t1 (c1 INT) ENGINE= MEMORY;
CREATE TABLE mem_t2 (c1 INT) ENGINE= MEMORY;
CREATE TABLE mem_t3 (c1 INT) ENGINE= MEMORY;
CREATE TABLE mem_t4 (c1 INT) ENGINE= MEMORY;
CREATE TABLE mem_t5 (c1 INT) ENGINE= MEMORY;
CREATE TABLE mem_t6 (c1 INT) ENGINE= MEMORY;
CREATE TABLE mem_t7 (c1 INT) ENGINE= MEMORY;
CREATE TABLE mem_t8 (c1 INT) ENGINE= MEMORY;
INSERT INTO mem_t1 VALUES (1), (2), (3), (4);
INSERT INTO mem_t2 VALUES (1), (2), (3), (4);
INSERT INTO mem_t3 VALUES (1), (2), (3), (4);
INSERT INTO mem_t4 VALUES (1), (2), (3), (4);
INSERT INTO mem_t5 VALUES (1), (2), (3), (4);
INSERT INTO mem_t6 VALUES (1), (2), (3), (4);
INSERT INTO mem_t7 VALUES (1), (2), (3), (4);
INSERT INTO mem_t8 VALUES (1), (2), (3), (4);
include/sync_slave_sql_with_master.inc
include/rpl_restart_server.inc [server_number=2]
include/start_slave.inc
include/save_binlog_position.inc
[connection master]
[connection slave]
[connection master]
INSERT INTO mem_t1 VALUES (1), (2), (3), (4);
include/sync_slave_sql_with_master.inc
[connection slave]
include/assert_binlog_events.inc
include/save_binlog_position.inc
[connection master]
ALTER TABLE mem_t2 ADD COLUMN (c2 INT);
include/sync_slave_sql_with_master.inc
[connection slave]
include/assert_binlog_events.inc
include/save_binlog_position.inc
[connection master]
CREATE TABLE mem_t9 LIKE mem_t3;
include/sync_slave_sql_with_master.inc
[connection slave]
include/assert_binlog_events.inc
include/save_binlog_position.inc
[connection master]
BEGIN;
INSERT INTO mem_t4 VALUES (1), (2), (3), (4);
INSERT INTO mem_t5 VALUES (1), (2), (3), (4);
COMMIT;
include/sync_slave_sql_with_master.inc
[connection slave]
include/assert_binlog_events.inc
include/save_binlog_position.inc
[connection master]
CREATE FUNCTION f () RETURNS INT BEGIN
INSERT INTO mem_t6 VALUES (1);
RETURN 2;
END|
INSERT INTO mem_t7 VALUES (f());
include/sync_slave_sql_with_master.inc
[connection slave]
include/assert_binlog_events.inc
include/save_binlog_position.inc
[connection master]
SET @@session.gtid_next = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1';
INSERT INTO mem_t8 VALUES (1), (2), (3), (4);
SET @@session.gtid_next = 'AUTOMATIC';
include/sync_slave_sql_with_master.inc
[connection slave]
include/assert_binlog_events.inc
[connection master]
DROP FUNCTION f;
DROP TABLE mem_t1, mem_t2, mem_t3, mem_t4, mem_t5, mem_t6, mem_t7, mem_t8, mem_t9;
include/rpl_end.inc
|