diff options
author | unknown <knielsen@knielsen-hq.org> | 2013-05-24 22:21:08 +0200 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2013-05-24 22:21:08 +0200 |
commit | 416aed25ed2c27acbc47ec695fda023981be53c8 (patch) | |
tree | 9d7f0cbe5c9192cd70e6c98fb593f42bf0dbb5d5 /mysql-test/suite | |
parent | 1cd6eb5f942ca3e94e86a48512d992fbb3aeecd9 (diff) | |
download | mariadb-git-416aed25ed2c27acbc47ec695fda023981be53c8.tar.gz |
MDEV-4475: Replication from MariaDB 10.0 to 5.5 does not work
The problem was the Gtid_list event which is logged to the binlog in
10.0 and is not understood by the 5.5 server.
This event is supposed to be replaced with a dummy event for 5.5
servers. But the very first event logged in the very first binlog
has an empty list of GTID, which makes the event too short to be
replacable with an empty event.
The fix is to pad the empty Gtid_list event to be big enough to
be replacable by a dummy event.
Diffstat (limited to 'mysql-test/suite')
13 files changed, 168 insertions, 160 deletions
diff --git a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result index 0ae7715ff65..b4e0747a07b 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result @@ -959,10 +959,10 @@ show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Intvar # # INSERT_ID=10 -master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci +master-bin.000001 # User var # # @`b`=_latin1 0x<binlog_start>5 COLLATE latin1_swedish_ci master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# master-bin.000001 # Intvar # # INSERT_ID=10 -master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci +master-bin.000001 # User var # # @`b`=_latin1 0x<binlog_start>5 COLLATE latin1_swedish_ci master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, @`b`) SET `b`= @b + bug27417(2) ;file_id=# master-bin.000001 # Query # # ROLLBACK drop trigger trg_del_t2; diff --git a/mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test b/mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test index 0289ef6161b..367314d9643 100644 --- a/mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test +++ b/mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test @@ -54,18 +54,18 @@ select "--- offset --" as ""; --disable_query_log select "--- start-position --" as ""; --enable_query_log -let $start_pos= `select @binlog_start_pos + 694`; +let $start_pos= `select @binlog_start_pos + 696`; --exec $MYSQL_BINLOG --short-form --start-position=$start_pos $MYSQLD_DATADIR/master-bin.000001 --disable_query_log select "--- stop-position --" as ""; --enable_query_log -let $stop_pos= `select @binlog_start_pos + 694`; +let $stop_pos= `select @binlog_start_pos + 696`; --exec $MYSQL_BINLOG --short-form --stop-position=$stop_pos $MYSQLD_DATADIR/master-bin.000001 --disable_query_log select "--- start and stop positions ---" as ""; --enable_query_log -let $start_pos= `select @binlog_start_pos + 694`; -let $stop_pos= `select @binlog_start_pos + 855`; +let $start_pos= `select @binlog_start_pos + 696`; +let $stop_pos= `select @binlog_start_pos + 857`; --exec $MYSQL_BINLOG --short-form --start-position=$start_pos --stop-position=$stop_pos $MYSQLD_DATADIR/master-bin.000001 --disable_query_log select "--- start-datetime --" as ""; @@ -92,12 +92,12 @@ select "--- offset --" as ""; --disable_query_log select "--- start-position --" as ""; --enable_query_log -let $start_pos= `select @binlog_start_pos + 694`; +let $start_pos= `select @binlog_start_pos + 696`; --exec $MYSQL_BINLOG --short-form --start-position=$start_pos $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 --disable_query_log select "--- stop-position --" as ""; --enable_query_log -let $stop_pos= `select @binlog_start_pos + 132`; +let $stop_pos= `select @binlog_start_pos + 134`; --exec $MYSQL_BINLOG --short-form --stop-position=$stop_pos $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 --disable_query_log select "--- start-datetime --" as ""; @@ -121,18 +121,18 @@ select "--- offset --" as ""; --disable_query_log select "--- start-position --" as ""; --enable_query_log -let $start_pos= `select @binlog_start_pos + 694`; +let $start_pos= `select @binlog_start_pos + 696`; --exec $MYSQL_BINLOG --short-form --start-position=$start_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 --disable_query_log select "--- stop-position --" as ""; --enable_query_log -let $stop_pos= `select @binlog_start_pos + 694`; +let $stop_pos= `select @binlog_start_pos + 696`; --exec $MYSQL_BINLOG --short-form --stop-position=$stop_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 --disable_query_log select "--- start and stop positions ---" as ""; --enable_query_log -let $start_pos= `select @binlog_start_pos + 694`; -let $stop_pos= `select @binlog_start_pos + 810`; +let $start_pos= `select @binlog_start_pos + 696`; +let $stop_pos= `select @binlog_start_pos + 812`; --exec $MYSQL_BINLOG --short-form --start-position=$start_pos --stop-position $stop_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 --disable_query_log select "--- start-datetime --" as ""; @@ -156,12 +156,12 @@ select "--- offset --" as ""; --disable_query_log select "--- start-position --" as ""; --enable_query_log -let $start_pos= `select @binlog_start_pos + 694`; +let $start_pos= `select @binlog_start_pos + 696`; --exec $MYSQL_BINLOG --short-form --start-position=$start_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 --disable_query_log select "--- stop-position --" as ""; --enable_query_log -let $stop_pos= `select @binlog_start_pos + 107`; +let $stop_pos= `select @binlog_start_pos + 109`; --exec $MYSQL_BINLOG --short-form --stop-position=$stop_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 --disable_query_log select "--- start-datetime --" as ""; diff --git a/mysql-test/suite/innodb/r/binlog_consistent.result b/mysql-test/suite/innodb/r/binlog_consistent.result index aabdefa5ee3..edfa5947eb8 100644 --- a/mysql-test/suite/innodb/r/binlog_consistent.result +++ b/mysql-test/suite/innodb/r/binlog_consistent.result @@ -3,11 +3,11 @@ RESET MASTER; CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb; SHOW MASTER STATUS; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 484 +master-bin.000001 486 SHOW STATUS LIKE 'binlog_snapshot_%'; Variable_name Value Binlog_snapshot_file master-bin.000001 -Binlog_snapshot_position 484 +Binlog_snapshot_position 486 BEGIN; INSERT INTO t1 VALUES (0, ""); # Connection con1 @@ -38,10 +38,10 @@ a b SHOW STATUS LIKE 'binlog_snapshot_%'; Variable_name Value Binlog_snapshot_file master-bin.000001 -Binlog_snapshot_position 986 +Binlog_snapshot_position 988 SHOW MASTER STATUS; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 1338 +master-bin.000001 1340 SELECT * FROM t2 ORDER BY a; a 2 @@ -60,7 +60,7 @@ a b SHOW STATUS LIKE 'binlog_snapshot_%'; Variable_name Value Binlog_snapshot_file master-bin.000001 -Binlog_snapshot_position 986 +Binlog_snapshot_position 988 SHOW MASTER STATUS; File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000002 367 @@ -75,33 +75,33 @@ master-bin.000002 367 SHOW BINLOG EVENTS; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 248 Server ver: #, Binlog ver: # -master-bin.000001 248 Gtid_list 1 271 [] -master-bin.000001 271 Binlog_checkpoint 1 311 master-bin.000001 -master-bin.000001 311 Gtid 1 349 GTID 0-1-1 -master-bin.000001 349 Query 1 484 use `test`; CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb -master-bin.000001 484 Gtid 1 522 GTID 0-1-2 -master-bin.000001 522 Query 1 634 use `test`; CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=myisam -master-bin.000001 634 Gtid 1 672 BEGIN GTID 0-1-3 -master-bin.000001 672 Query 1 760 use `test`; INSERT INTO t2 VALUES (2) -master-bin.000001 760 Query 1 829 COMMIT -master-bin.000001 829 Gtid 1 867 BEGIN GTID 0-1-4 -master-bin.000001 867 Query 1 959 use `test`; INSERT INTO t1 VALUES (0, "") -master-bin.000001 959 Xid 1 986 COMMIT /* XID */ -master-bin.000001 986 Gtid 1 1024 BEGIN GTID 0-1-5 -master-bin.000001 1024 Query 1 1112 use `test`; INSERT INTO t2 VALUES (3) -master-bin.000001 1112 Query 1 1181 COMMIT -master-bin.000001 1181 Gtid 1 1219 BEGIN GTID 0-1-6 -master-bin.000001 1219 Query 1 1311 use `test`; INSERT INTO t1 VALUES (4, "") -master-bin.000001 1311 Xid 1 1338 COMMIT /* XID */ -master-bin.000001 1338 Gtid 1 1376 BEGIN GTID 0-1-7 -master-bin.000001 1376 Query 1 1468 use `test`; INSERT INTO t1 VALUES (1, "") -master-bin.000001 1468 Xid 1 1495 COMMIT /* XID */ -master-bin.000001 1495 Gtid 1 1533 BEGIN GTID 0-1-8 -master-bin.000001 1533 Query 1 1630 use `test`; INSERT INTO t1 VALUES (2, "first") -master-bin.000001 1630 Query 1 1728 use `test`; INSERT INTO t1 VALUES (2, "second") -master-bin.000001 1728 Xid 1 1755 COMMIT /* XID */ -master-bin.000001 1755 Gtid 1 1793 BEGIN GTID 0-1-9 -master-bin.000001 1793 Query 1 1885 use `test`; INSERT INTO t1 VALUES (3, "") -master-bin.000001 1885 Xid 1 1912 COMMIT /* XID */ -master-bin.000001 1912 Rotate 1 1956 master-bin.000002;pos=4 +master-bin.000001 248 Gtid_list 1 273 [] +master-bin.000001 273 Binlog_checkpoint 1 313 master-bin.000001 +master-bin.000001 313 Gtid 1 351 GTID 0-1-1 +master-bin.000001 351 Query 1 486 use `test`; CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb +master-bin.000001 486 Gtid 1 524 GTID 0-1-2 +master-bin.000001 524 Query 1 636 use `test`; CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=myisam +master-bin.000001 636 Gtid 1 674 BEGIN GTID 0-1-3 +master-bin.000001 674 Query 1 762 use `test`; INSERT INTO t2 VALUES (2) +master-bin.000001 762 Query 1 831 COMMIT +master-bin.000001 831 Gtid 1 869 BEGIN GTID 0-1-4 +master-bin.000001 869 Query 1 961 use `test`; INSERT INTO t1 VALUES (0, "") +master-bin.000001 961 Xid 1 988 COMMIT /* XID */ +master-bin.000001 988 Gtid 1 1026 BEGIN GTID 0-1-5 +master-bin.000001 1026 Query 1 1114 use `test`; INSERT INTO t2 VALUES (3) +master-bin.000001 1114 Query 1 1183 COMMIT +master-bin.000001 1183 Gtid 1 1221 BEGIN GTID 0-1-6 +master-bin.000001 1221 Query 1 1313 use `test`; INSERT INTO t1 VALUES (4, "") +master-bin.000001 1313 Xid 1 1340 COMMIT /* XID */ +master-bin.000001 1340 Gtid 1 1378 BEGIN GTID 0-1-7 +master-bin.000001 1378 Query 1 1470 use `test`; INSERT INTO t1 VALUES (1, "") +master-bin.000001 1470 Xid 1 1497 COMMIT /* XID */ +master-bin.000001 1497 Gtid 1 1535 BEGIN GTID 0-1-8 +master-bin.000001 1535 Query 1 1632 use `test`; INSERT INTO t1 VALUES (2, "first") +master-bin.000001 1632 Query 1 1730 use `test`; INSERT INTO t1 VALUES (2, "second") +master-bin.000001 1730 Xid 1 1757 COMMIT /* XID */ +master-bin.000001 1757 Gtid 1 1795 BEGIN GTID 0-1-9 +master-bin.000001 1795 Query 1 1887 use `test`; INSERT INTO t1 VALUES (3, "") +master-bin.000001 1887 Xid 1 1914 COMMIT /* XID */ +master-bin.000001 1914 Rotate 1 1958 master-bin.000002;pos=4 DROP TABLE t1,t2; diff --git a/mysql-test/suite/innodb/r/group_commit_binlog_pos.result b/mysql-test/suite/innodb/r/group_commit_binlog_pos.result index 26a636c02ef..c8b80a037a7 100644 --- a/mysql-test/suite/innodb/r/group_commit_binlog_pos.result +++ b/mysql-test/suite/innodb/r/group_commit_binlog_pos.result @@ -31,6 +31,6 @@ a 1 2 3 -InnoDB: Last MySQL binlog file position 0 920, file name ./master-bin.000001 +InnoDB: Last MySQL binlog file position 0 922, file name ./master-bin.000001 SET DEBUG_SYNC= 'RESET'; DROP TABLE t1; diff --git a/mysql-test/suite/innodb/r/group_commit_binlog_pos_no_optimize_thread.result b/mysql-test/suite/innodb/r/group_commit_binlog_pos_no_optimize_thread.result index d88da625e79..090b574a962 100644 --- a/mysql-test/suite/innodb/r/group_commit_binlog_pos_no_optimize_thread.result +++ b/mysql-test/suite/innodb/r/group_commit_binlog_pos_no_optimize_thread.result @@ -32,6 +32,6 @@ a 1 2 3 -InnoDB: Last MySQL binlog file position 0 920, file name ./master-bin.000001 +InnoDB: Last MySQL binlog file position 0 922, file name ./master-bin.000001 SET DEBUG_SYNC= 'RESET'; DROP TABLE t1; diff --git a/mysql-test/suite/multi_source/gtid.result b/mysql-test/suite/multi_source/gtid.result index 651b9873369..5f4e3807fad 100644 --- a/mysql-test/suite/multi_source/gtid.result +++ b/mysql-test/suite/multi_source/gtid.result @@ -35,9 +35,9 @@ Master_User root Master_Port MYPORT_3 Connect_Retry 60 Master_Log_File server3-bin.000001 -Read_Master_Log_Pos 1499 +Read_Master_Log_Pos 1501 Relay_Log_File mysqld-relay-bin.000002 -Relay_Log_Pos 1788 +Relay_Log_Pos 1790 Relay_Master_Log_File server3-bin.000001 Slave_IO_Running Yes Slave_SQL_Running Yes @@ -50,8 +50,8 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 1499 -Relay_Log_Space 2086 +Exec_Master_Log_Pos 1501 +Relay_Log_Space 2088 Until_Condition None Until_Log_File Until_Log_Pos 0 diff --git a/mysql-test/suite/multi_source/info_logs.result b/mysql-test/suite/multi_source/info_logs.result index d2144cb8a1b..4ea4d363dfb 100644 --- a/mysql-test/suite/multi_source/info_logs.result +++ b/mysql-test/suite/multi_source/info_logs.result @@ -85,16 +85,16 @@ MASTER 2.2 # show all slaves status; Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos - Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 311 relay.000002 599 master-bin.000001 Yes Yes 0 0 311 886 None 0 No 0 No 0 0 1 No 0 1073741824 7 0 60.000 -MASTER 2.2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 311 relay-master@00202@002e2.000002 599 master-bin.000001 Yes Yes 0 0 311 905 None 0 No 0 No 0 0 2 No 0 1073741824 7 0 60.000 + Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 relay.000002 601 master-bin.000001 Yes Yes 0 0 313 888 None 0 No 0 No 0 0 1 No 0 1073741824 7 0 60.000 +MASTER 2.2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 relay-master@00202@002e2.000002 601 master-bin.000001 Yes Yes 0 0 313 907 None 0 No 0 No 0 0 2 No 0 1073741824 7 0 60.000 include/wait_for_slave_to_start.inc set default_master_connection = 'MASTER 2.2'; include/wait_for_slave_to_start.inc set default_master_connection = ''; show all slaves status; Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos - Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 311 relay.000004 536 master-bin.000001 Yes Yes 0 0 311 823 None 0 No 0 No 0 0 1 No 0 1073741824 6 0 60.000 -MASTER 2.2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 311 relay-master@00202@002e2.000004 536 master-bin.000001 Yes Yes 0 0 311 842 None 0 No 0 No 0 0 2 No 0 1073741824 6 0 60.000 + Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 relay.000004 536 master-bin.000001 Yes Yes 0 0 313 823 None 0 No 0 No 0 0 1 No 0 1073741824 6 0 60.000 +MASTER 2.2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 relay-master@00202@002e2.000004 536 master-bin.000001 Yes Yes 0 0 313 842 None 0 No 0 No 0 0 2 No 0 1073741824 6 0 60.000 # # List of files matching '*info*' pattern # after slave server restart diff --git a/mysql-test/suite/multi_source/multisource.result b/mysql-test/suite/multi_source/multisource.result index dfa3b1e1bed..d6acc5b3ea8 100644 --- a/mysql-test/suite/multi_source/multisource.result +++ b/mysql-test/suite/multi_source/multisource.result @@ -11,13 +11,13 @@ set default_master_connection = 'master1'; include/wait_for_slave_to_start.inc show slave 'master1' status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Using_Gtid -Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 311 mysqld-relay-bin-master1.000002 599 master-bin.000001 Yes Yes 0 0 311 905 None 0 No 0 No 0 0 1 No +Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 mysqld-relay-bin-master1.000002 601 master-bin.000001 Yes Yes 0 0 313 907 None 0 No 0 No 0 0 1 No show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Using_Gtid -Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 311 mysqld-relay-bin-master1.000002 599 master-bin.000001 Yes Yes 0 0 311 905 None 0 No 0 No 0 0 1 No +Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 mysqld-relay-bin-master1.000002 601 master-bin.000001 Yes Yes 0 0 313 907 None 0 No 0 No 0 0 1 No show all slaves status; Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos -master1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 311 mysqld-relay-bin-master1.000002 599 master-bin.000001 Yes Yes 0 0 311 905 None 0 No 0 No 0 0 1 No 0 1073741824 7 0 60.000 +master1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 mysqld-relay-bin-master1.000002 601 master-bin.000001 Yes Yes 0 0 313 907 None 0 No 0 No 0 0 1 No 0 1073741824 7 0 60.000 drop database if exists db1; create database db1; use db1; @@ -40,18 +40,18 @@ Log_name Pos Event_type Server_id End_log_pos Info mysqld-relay-bin-master1.000002 4 Format_desc 3 248 Server version mysqld-relay-bin-master1.000002 248 Rotate 1 0 master-bin.000001;pos=4 mysqld-relay-bin-master1.000002 292 Format_desc 1 248 Server version -mysqld-relay-bin-master1.000002 536 Gtid_list 1 271 [] -mysqld-relay-bin-master1.000002 559 Binlog_checkpoint 1 311 master-bin.000001 -mysqld-relay-bin-master1.000002 599 Gtid 1 349 GTID 0-1-1 -mysqld-relay-bin-master1.000002 637 Query 1 438 drop database if exists db1 -mysqld-relay-bin-master1.000002 726 Gtid 1 476 GTID 0-1-2 -mysqld-relay-bin-master1.000002 764 Query 1 557 create database db1 -mysqld-relay-bin-master1.000002 845 Gtid 1 595 GTID 0-1-3 -mysqld-relay-bin-master1.000002 883 Query 1 748 use `db1`; create table t1 (i int auto_increment, f1 varchar(16), primary key pk (i,f1)) engine=MyISAM -mysqld-relay-bin-master1.000002 1036 Gtid 1 786 BEGIN GTID 0-1-4 -mysqld-relay-bin-master1.000002 1074 Intvar 1 814 INSERT_ID=1 -mysqld-relay-bin-master1.000002 1102 Query 1 918 use `db1`; insert into t1 (f1) values ('one'),('two') -mysqld-relay-bin-master1.000002 1206 Query 1 986 COMMIT +mysqld-relay-bin-master1.000002 536 Gtid_list 1 273 [] +mysqld-relay-bin-master1.000002 561 Binlog_checkpoint 1 313 master-bin.000001 +mysqld-relay-bin-master1.000002 601 Gtid 1 351 GTID 0-1-1 +mysqld-relay-bin-master1.000002 639 Query 1 440 drop database if exists db1 +mysqld-relay-bin-master1.000002 728 Gtid 1 478 GTID 0-1-2 +mysqld-relay-bin-master1.000002 766 Query 1 559 create database db1 +mysqld-relay-bin-master1.000002 847 Gtid 1 597 GTID 0-1-3 +mysqld-relay-bin-master1.000002 885 Query 1 750 use `db1`; create table t1 (i int auto_increment, f1 varchar(16), primary key pk (i,f1)) engine=MyISAM +mysqld-relay-bin-master1.000002 1038 Gtid 1 788 BEGIN GTID 0-1-4 +mysqld-relay-bin-master1.000002 1076 Intvar 1 816 INSERT_ID=1 +mysqld-relay-bin-master1.000002 1104 Query 1 920 use `db1`; insert into t1 (f1) values ('one'),('two') +mysqld-relay-bin-master1.000002 1208 Query 1 988 COMMIT change master 'master1' to master_port=MYPORT_2, master_host='127.0.0.1', @@ -76,8 +76,8 @@ start slave; include/wait_for_slave_to_start.inc show all slaves status; Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos - Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 311 mysqld-relay-bin.000002 599 master-bin.000001 Yes Yes 0 0 311 897 None 0 No 0 No 0 0 2 No 0 1073741824 7 0 60.000 0-1-4 -master1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 986 mysqld-relay-bin-master1.000002 1274 master-bin.000001 Yes Yes 0 0 986 1580 None 0 No 0 No 0 0 1 No 0 1073741824 17 0 60.000 0-1-4 + Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 mysqld-relay-bin.000002 601 master-bin.000001 Yes Yes 0 0 313 899 None 0 No 0 No 0 0 2 No 0 1073741824 7 0 60.000 0-1-4 +master1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 988 mysqld-relay-bin-master1.000002 1276 master-bin.000001 Yes Yes 0 0 988 1582 None 0 No 0 No 0 0 1 No 0 1073741824 17 0 60.000 0-1-4 insert into t1 (f1) values ('three'); drop database if exists db2; create database db2; @@ -106,7 +106,7 @@ insert into t1 (f1) values ('four'); create table db1.t3 (f1 int) engine=InnoDB; show all slaves status; Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos - Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 919 mysqld-relay-bin.000002 1207 master-bin.000001 Yes Yes 0 0 919 1505 None 0 No 0 No 0 0 2 No 0 1073741824 17 0 60.000 0-1-7 + Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 921 mysqld-relay-bin.000002 1209 master-bin.000001 Yes Yes 0 0 921 1507 None 0 No 0 No 0 0 2 No 0 1073741824 17 0 60.000 0-1-7 master1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000002 740 mysqld-relay-bin-master1.000004 1028 master-bin.000002 Yes Yes 0 0 740 1378 None 0 No 0 No 0 0 1 No 0 1073741824 37 0 60.000 0-1-7 select * from db1.t1; i f1 @@ -123,18 +123,18 @@ Log_name Pos Event_type Server_id End_log_pos Info mysqld-relay-bin.000002 4 Format_desc 3 248 Server version mysqld-relay-bin.000002 248 Rotate 2 0 master-bin.000001;pos=4 mysqld-relay-bin.000002 292 Format_desc 2 248 Server version -mysqld-relay-bin.000002 536 Gtid_list 2 271 [] -mysqld-relay-bin.000002 559 Binlog_checkpoint 2 311 master-bin.000001 -mysqld-relay-bin.000002 599 Gtid 2 349 GTID 0-2-1 -mysqld-relay-bin.000002 637 Query 2 438 drop database if exists db2 -mysqld-relay-bin.000002 726 Gtid 2 476 GTID 0-2-2 -mysqld-relay-bin.000002 764 Query 2 557 create database db2 -mysqld-relay-bin.000002 845 Gtid 2 595 GTID 0-2-3 -mysqld-relay-bin.000002 883 Query 2 730 use `db2`; create table t1 (pk int auto_increment primary key, f1 int) engine=InnoDB -mysqld-relay-bin.000002 1018 Gtid 2 768 BEGIN GTID 0-2-4 -mysqld-relay-bin.000002 1056 Intvar 2 796 INSERT_ID=1 -mysqld-relay-bin.000002 1084 Query 2 892 use `db2`; insert into t1 (f1) values (1),(2) -mysqld-relay-bin.000002 1180 Xid 2 919 COMMIT /* xid=<num> */ +mysqld-relay-bin.000002 536 Gtid_list 2 273 [] +mysqld-relay-bin.000002 561 Binlog_checkpoint 2 313 master-bin.000001 +mysqld-relay-bin.000002 601 Gtid 2 351 GTID 0-2-1 +mysqld-relay-bin.000002 639 Query 2 440 drop database if exists db2 +mysqld-relay-bin.000002 728 Gtid 2 478 GTID 0-2-2 +mysqld-relay-bin.000002 766 Query 2 559 create database db2 +mysqld-relay-bin.000002 847 Gtid 2 597 GTID 0-2-3 +mysqld-relay-bin.000002 885 Query 2 732 use `db2`; create table t1 (pk int auto_increment primary key, f1 int) engine=InnoDB +mysqld-relay-bin.000002 1020 Gtid 2 770 BEGIN GTID 0-2-4 +mysqld-relay-bin.000002 1058 Intvar 2 798 INSERT_ID=1 +mysqld-relay-bin.000002 1086 Query 2 894 use `db2`; insert into t1 (f1) values (1),(2) +mysqld-relay-bin.000002 1182 Xid 2 921 COMMIT /* xid=<num> */ stop slave io_thread; show status like 'Slave_running'; Variable_name Value diff --git a/mysql-test/suite/multi_source/relaylog_events.result b/mysql-test/suite/multi_source/relaylog_events.result index 6b452e65176..970d7d20438 100644 --- a/mysql-test/suite/multi_source/relaylog_events.result +++ b/mysql-test/suite/multi_source/relaylog_events.result @@ -15,12 +15,12 @@ Log_name Pos Event_type Server_id End_log_pos Info mysqld-relay-bin-master1.000002 4 Format_desc 3 248 Server version mysqld-relay-bin-master1.000002 248 Rotate 1 0 master-bin.000001;pos=4 mysqld-relay-bin-master1.000002 292 Format_desc 1 248 Server version -mysqld-relay-bin-master1.000002 536 Gtid_list 1 271 [] -mysqld-relay-bin-master1.000002 559 Binlog_checkpoint 1 311 master-bin.000001 -mysqld-relay-bin-master1.000002 599 Gtid 1 349 GTID 0-1-1 -mysqld-relay-bin-master1.000002 637 Query 1 463 use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ -mysqld-relay-bin-master1.000002 751 Gtid 1 501 GTID 0-1-2 -mysqld-relay-bin-master1.000002 789 Query 1 601 use `test`; create table t1 (i int) engine=MyISAM +mysqld-relay-bin-master1.000002 536 Gtid_list 1 273 [] +mysqld-relay-bin-master1.000002 561 Binlog_checkpoint 1 313 master-bin.000001 +mysqld-relay-bin-master1.000002 601 Gtid 1 351 GTID 0-1-1 +mysqld-relay-bin-master1.000002 639 Query 1 465 use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ +mysqld-relay-bin-master1.000002 753 Gtid 1 503 GTID 0-1-2 +mysqld-relay-bin-master1.000002 791 Query 1 603 use `test`; create table t1 (i int) engine=MyISAM show relaylog events; Log_name Pos Event_type Server_id End_log_pos Info mysqld-relay-bin-master1.000001 4 Format_desc 3 248 Server version diff --git a/mysql-test/suite/multi_source/reset_slave.result b/mysql-test/suite/multi_source/reset_slave.result index 88bc934afaf..ae3b899cf5f 100644 --- a/mysql-test/suite/multi_source/reset_slave.result +++ b/mysql-test/suite/multi_source/reset_slave.result @@ -11,14 +11,14 @@ insert into t1 values (1),(2); stop slave 'master1'; show slave 'master1' status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Using_Gtid - 127.0.0.1 root MYPORT_1 60 master-bin.000001 800 mysqld-relay-bin-master1.000002 1088 master-bin.000001 No No 0 0 800 1394 None 0 No NULL No 0 0 1 No + 127.0.0.1 root MYPORT_1 60 master-bin.000001 802 mysqld-relay-bin-master1.000002 1090 master-bin.000001 No No 0 0 802 1396 None 0 No NULL No 0 0 1 No mysqld-relay-bin-master1.000001 mysqld-relay-bin-master1.000002 mysqld-relay-bin-master1.index reset slave 'master1'; show slave 'master1' status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Using_Gtid - 127.0.0.1 root MYPORT_1 60 4 1088 No No 0 0 0 1394 None 0 No NULL No 0 0 1 No + 127.0.0.1 root MYPORT_1 60 4 1090 No No 0 0 0 1396 None 0 No NULL No 0 0 1 No reset slave 'master1' all; show slave 'master1' status; ERROR HY000: There is no master connection 'master1' diff --git a/mysql-test/suite/multi_source/simple.result b/mysql-test/suite/multi_source/simple.result index 525aaa4b0cc..307709ffa3f 100644 --- a/mysql-test/suite/multi_source/simple.result +++ b/mysql-test/suite/multi_source/simple.result @@ -11,8 +11,8 @@ include/wait_for_slave_to_start.inc set default_master_connection = ''; show all slaves status; Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos -slave1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 311 mysqld-relay-bin-slave1.000002 599 master-bin.000001 Yes Yes 0 0 311 904 None 0 No 0 No 0 0 1 No 0 1073741824 7 0 60.000 -slave2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 311 mysqld-relay-bin-slave2.000002 599 master-bin.000001 Yes Yes 0 0 311 904 None 0 No 0 No 0 0 2 No 0 1073741824 7 0 60.000 +slave1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 mysqld-relay-bin-slave1.000002 601 master-bin.000001 Yes Yes 0 0 313 906 None 0 No 0 No 0 0 1 No 0 1073741824 7 0 60.000 +slave2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 mysqld-relay-bin-slave2.000002 601 master-bin.000001 Yes Yes 0 0 313 906 None 0 No 0 No 0 0 2 No 0 1073741824 7 0 60.000 start all slaves; stop slave 'slave1'; show slave 'slave1' status; @@ -22,9 +22,9 @@ Master_User root Master_Port MYPORT_1 Connect_Retry 60 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 311 +Read_Master_Log_Pos 313 Relay_Log_File mysqld-relay-bin-slave1.000002 -Relay_Log_Pos 599 +Relay_Log_Pos 601 Relay_Master_Log_File master-bin.000001 Slave_IO_Running No Slave_SQL_Running No @@ -37,8 +37,8 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 311 -Relay_Log_Space 904 +Exec_Master_Log_Pos 313 +Relay_Log_Space 906 Until_Condition None Until_Log_File Until_Log_Pos 0 @@ -60,18 +60,18 @@ Using_Gtid No reset slave 'slave1'; show all slaves status; Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos -slave1 127.0.0.1 root MYPORT_1 60 4 599 No No 0 0 0 904 None 0 No NULL No 0 0 1 No 0 1073741824 7 0 60.000 -slave2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 311 mysqld-relay-bin-slave2.000002 599 master-bin.000001 Yes Yes 0 0 311 904 None 0 No 0 No 0 0 2 No 0 1073741824 7 0 60.000 +slave1 127.0.0.1 root MYPORT_1 60 4 601 No No 0 0 0 906 None 0 No NULL No 0 0 1 No 0 1073741824 7 0 60.000 +slave2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 mysqld-relay-bin-slave2.000002 601 master-bin.000001 Yes Yes 0 0 313 906 None 0 No 0 No 0 0 2 No 0 1073741824 7 0 60.000 reset slave 'slave1' all; show all slaves status; Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos -slave2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 311 mysqld-relay-bin-slave2.000002 599 master-bin.000001 Yes Yes 0 0 311 904 None 0 No 0 No 0 0 2 No 0 1073741824 7 0 60.000 +slave2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 mysqld-relay-bin-slave2.000002 601 master-bin.000001 Yes Yes 0 0 313 906 None 0 No 0 No 0 0 2 No 0 1073741824 7 0 60.000 stop all slaves; Warnings: Note 1938 SLAVE 'slave2' stopped show all slaves status; Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos -slave2 127.0.0.1 root MYPORT_2 60 master-bin.000001 311 mysqld-relay-bin-slave2.000002 599 master-bin.000001 No No 0 0 311 904 None 0 No NULL No 0 0 2 No 0 1073741824 7 0 60.000 +slave2 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 mysqld-relay-bin-slave2.000002 601 master-bin.000001 No No 0 0 313 906 None 0 No NULL No 0 0 2 No 0 1073741824 7 0 60.000 stop all slaves; include/reset_master_slave.inc include/reset_master_slave.inc diff --git a/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result b/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result index f48fa1850a2..2a7ed37cf9b 100644 --- a/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result +++ b/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result @@ -2,65 +2,66 @@ include/master-slave.inc [connection master] set @old_master_binlog_checksum= @@global.binlog_checksum; set @old_slave_dbug= @@global.debug_dbug; -CREATE TABLE t1 (a INT PRIMARY KEY); -INSERT INTO t1 VALUES (0); -# Test slave with no capability gets dummy event, which is ignored. include/stop_slave.inc +# Test slave with no capability gets dummy event, which is ignored. SET @@global.debug_dbug='+d,simulate_slave_capability_none'; include/start_slave.inc +FLUSH LOGS; +CREATE TABLE t1 (a INT PRIMARY KEY); +INSERT INTO t1 VALUES (0); ALTER TABLE t1 ORDER BY a; SET SESSION binlog_annotate_row_events = ON; DELETE FROM t1; INSERT INTO t1 /* A comment just to make the annotate event sufficiently long that the dummy event will need to get padded with spaces so that we can test that this works */ VALUES(1); -show binlog events in 'master-bin.000001' from <binlog_start> limit 0, 10; +show binlog events in 'master-bin.000002' from <binlog_start> limit 0, 10; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Gtid # # BEGIN GTID #-#-# -master-bin.000001 # Annotate_rows # # DELETE FROM t1 -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Gtid # # BEGIN GTID #-#-# -master-bin.000001 # Annotate_rows # # INSERT INTO t1 /* A comment just to make the annotate event sufficiently long that the dummy event will need to get padded with spaces so that we can test that this works */ VALUES(1) -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT +master-bin.000002 # Gtid # # BEGIN GTID #-#-# +master-bin.000002 # Annotate_rows # # DELETE FROM t1 +master-bin.000002 # Table_map # # table_id: # (test.t1) +master-bin.000002 # Delete_rows # # table_id: # flags: STMT_END_F +master-bin.000002 # Query # # COMMIT +master-bin.000002 # Gtid # # BEGIN GTID #-#-# +master-bin.000002 # Annotate_rows # # INSERT INTO t1 /* A comment just to make the annotate event sufficiently long that the dummy event will need to get padded with spaces so that we can test that this works */ VALUES(1) +master-bin.000002 # Table_map # # table_id: # (test.t1) +master-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000002 # Query # # COMMIT SELECT * FROM t1; a 1 -show relaylog events in 'slave-relay-bin.000003' from <binlog_start> limit 0,10; +show relaylog events in 'slave-relay-bin.000005' from <binlog_start> limit 0,10; Log_name Pos Event_type Server_id End_log_pos Info -slave-relay-bin.000003 # Query # # BEGIN -slave-relay-bin.000003 # User var # # @`!dummyvar`=NULL -slave-relay-bin.000003 # Table_map # # table_id: # (test.t1) -slave-relay-bin.000003 # Delete_rows # # table_id: # flags: STMT_END_F -slave-relay-bin.000003 # Query # # COMMIT -slave-relay-bin.000003 # Query # # BEGIN -slave-relay-bin.000003 # Query # # # Dummy event replacing event type 160 that slave cannot handle. -slave-relay-bin.000003 # Table_map # # table_id: # (test.t1) -slave-relay-bin.000003 # Write_rows # # table_id: # flags: STMT_END_F -slave-relay-bin.000003 # Query # # COMMIT +slave-relay-bin.000005 # Query # # BEGIN +slave-relay-bin.000005 # User var # # @`!dummyvar`=NULL +slave-relay-bin.000005 # Table_map # # table_id: # (test.t1) +slave-relay-bin.000005 # Delete_rows # # table_id: # flags: STMT_END_F +slave-relay-bin.000005 # Query # # COMMIT +slave-relay-bin.000005 # Query # # BEGIN +slave-relay-bin.000005 # Query # # # Dummy event replacing event type 160 that slave cannot handle. +slave-relay-bin.000005 # Table_map # # table_id: # (test.t1) +slave-relay-bin.000005 # Write_rows # # table_id: # flags: STMT_END_F +slave-relay-bin.000005 # Query # # COMMIT set @@global.debug_dbug= @old_slave_dbug; # Test dummy event is checksummed correctly. set @@global.binlog_checksum = CRC32; TRUNCATE t1; INSERT INTO t1 VALUES(2); -show binlog events in 'master-bin.000002' from <binlog_start> limit 0, 5; +show binlog events in 'master-bin.000003' from <binlog_start> limit 0, 5; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000002 # Gtid # # BEGIN GTID #-#-# -master-bin.000002 # Annotate_rows # # INSERT INTO t1 VALUES(2) -master-bin.000002 # Table_map # # table_id: # (test.t1) -master-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000002 # Query # # COMMIT +master-bin.000003 # Gtid # # BEGIN GTID #-#-# +master-bin.000003 # Annotate_rows # # INSERT INTO t1 VALUES(2) +master-bin.000003 # Table_map # # table_id: # (test.t1) +master-bin.000003 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000003 # Query # # COMMIT SELECT * FROM t1; a 2 -show relaylog events in 'slave-relay-bin.000005' from <binlog_start> limit 7,5; +show relaylog events in 'slave-relay-bin.000007' from <binlog_start> limit 7,5; Log_name Pos Event_type Server_id End_log_pos Info -slave-relay-bin.000005 # Query # # BEGIN -slave-relay-bin.000005 # Query # # # Dummy ev -slave-relay-bin.000005 # Table_map # # table_id: # (test.t1) -slave-relay-bin.000005 # Write_rows # # table_id: # flags: STMT_END_F -slave-relay-bin.000005 # Query # # COMMIT +slave-relay-bin.000007 # Query # # BEGIN +slave-relay-bin.000007 # Query # # # Dummy ev +slave-relay-bin.000007 # Table_map # # table_id: # (test.t1) +slave-relay-bin.000007 # Write_rows # # table_id: # flags: STMT_END_F +slave-relay-bin.000007 # Query # # COMMIT # Test that slave which cannot tolerate holes in binlog stream but # knows the event does not get dummy event include/stop_slave.inc @@ -68,23 +69,23 @@ SET @@global.debug_dbug='+d,simulate_slave_capability_old_53'; include/start_slave.inc ALTER TABLE t1 ORDER BY a; UPDATE t1 SET a = 3; -show binlog events in 'master-bin.000002' from <binlog_start> limit 0, 5; +show binlog events in 'master-bin.000003' from <binlog_start> limit 0, 5; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000002 # Gtid # # BEGIN GTID #-#-# -master-bin.000002 # Annotate_rows # # UPDATE t1 SET a = 3 -master-bin.000002 # Table_map # # table_id: # (test.t1) -master-bin.000002 # Update_rows # # table_id: # flags: STMT_END_F -master-bin.000002 # Query # # COMMIT +master-bin.000003 # Gtid # # BEGIN GTID #-#-# +master-bin.000003 # Annotate_rows # # UPDATE t1 SET a = 3 +master-bin.000003 # Table_map # # table_id: # (test.t1) +master-bin.000003 # Update_rows # # table_id: # flags: STMT_END_F +master-bin.000003 # Query # # COMMIT SELECT * FROM t1; a 3 -show relaylog events in 'slave-relay-bin.000006' from <binlog_start> limit 0,5; +show relaylog events in 'slave-relay-bin.000008' from <binlog_start> limit 0,5; Log_name Pos Event_type Server_id End_log_pos Info -slave-relay-bin.000006 # Query # # BEGIN -slave-relay-bin.000006 # Annotate_rows # # UPDATE t1 SET a = 3 -slave-relay-bin.000006 # Table_map # # table_id: # (test.t1) -slave-relay-bin.000006 # Update_rows # # table_id: # flags: STMT_END_F -slave-relay-bin.000006 # Query # # COMMIT +slave-relay-bin.000008 # Query # # BEGIN +slave-relay-bin.000008 # Annotate_rows # # UPDATE t1 SET a = 3 +slave-relay-bin.000008 # Table_map # # table_id: # (test.t1) +slave-relay-bin.000008 # Update_rows # # table_id: # flags: STMT_END_F +slave-relay-bin.000008 # Query # # COMMIT select @@global.log_slave_updates; @@global.log_slave_updates 1 diff --git a/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test b/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test index b8ca409e25b..99a371eac44 100644 --- a/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test +++ b/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test @@ -6,16 +6,23 @@ connection master; set @old_master_binlog_checksum= @@global.binlog_checksum; set @old_slave_dbug= @@global.debug_dbug; -CREATE TABLE t1 (a INT PRIMARY KEY); -INSERT INTO t1 VALUES (0); -sync_slave_with_master; +# MDEV-4475: Cannot replicate to old server when binlog contains +# empty Gtid_list event +# +# Test this by binlog rotation before we log any GTIDs. connection slave; - ---echo # Test slave with no capability gets dummy event, which is ignored. --source include/stop_slave.inc +--echo # Test slave with no capability gets dummy event, which is ignored. SET @@global.debug_dbug='+d,simulate_slave_capability_none'; --source include/start_slave.inc + +connection master; +FLUSH LOGS; +CREATE TABLE t1 (a INT PRIMARY KEY); +INSERT INTO t1 VALUES (0); +sync_slave_with_master; + connection master; # Add a dummy event just to have something to sync_slave_with_master on. # Otherwise we occasionally get different $relaylog_start, depending on |