diff options
author | unknown <knielsen@knielsen-hq.org> | 2013-04-17 15:17:01 +0200 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2013-04-17 15:17:01 +0200 |
commit | 0e7410a154560486ce4e0c975f122a0b15853bb1 (patch) | |
tree | e65ba67f602f6c99a52a1953b2172043476a5930 /mysql-test/suite/multi_source | |
parent | f398ced7f05e64b0f2bdb8e0a70de907aff9e1eb (diff) | |
parent | 30b2c64c4e87f8924fe817f5c607ae90a990e9e5 (diff) | |
download | mariadb-git-0e7410a154560486ce4e0c975f122a0b15853bb1.tar.gz |
Merge 10.0-base -> 10.0 (GTID).
Diffstat (limited to 'mysql-test/suite/multi_source')
18 files changed, 460 insertions, 81 deletions
diff --git a/mysql-test/suite/multi_source/gtid.cnf b/mysql-test/suite/multi_source/gtid.cnf new file mode 100644 index 00000000000..b47ebb2cf30 --- /dev/null +++ b/mysql-test/suite/multi_source/gtid.cnf @@ -0,0 +1,24 @@ +!include my.cnf + +[mysqld.1] +log-slave-updates +loose-innodb + +[mysqld.2] +log-slave-updates +loose-innodb + +[mysqld.3] +log-bin=server3-bin +log-slave-updates +loose-innodb + +[mysqld.4] +server-id=4 +log-bin=server4-bin +log-slave-updates +loose-innodb + +[ENV] +SERVER_MYPORT_4= @mysqld.4.port +SERVER_MYSOCK_4= @mysqld.4.socket diff --git a/mysql-test/suite/multi_source/gtid.result b/mysql-test/suite/multi_source/gtid.result new file mode 100644 index 00000000000..eea8215b1d1 --- /dev/null +++ b/mysql-test/suite/multi_source/gtid.result @@ -0,0 +1,149 @@ +CHANGE MASTER 'slave1' TO master_port=MYPORT_1, master_host='127.0.0.1', master_user='root'; +CHANGE MASTER 'slave2' TO master_port=MYPORT_2, master_host='127.0.0.1', master_user='root'; +set default_master_connection = 'slave1'; +START SLAVE; +include/wait_for_slave_to_start.inc +set default_master_connection = 'slave2'; +START SLAVE; +include/wait_for_slave_to_start.inc +set default_master_connection = ''; +CHANGE MASTER TO master_port=MYPORT_3, master_host='127.0.0.1', master_user='root'; +start all slaves; +Warnings: +Note 1937 SLAVE '' started +include/wait_for_slave_to_start.inc +SET GLOBAL gtid_domain_id= 1; +SET SESSION gtid_domain_id= 1; +CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10)); +INSERT INTO t1 VALUES (1, "initial"); +CREATE TABLE t3 (a INT PRIMARY KEY, b VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t3 VALUES (101, "initial 1"); +SET GLOBAL gtid_domain_id= 2; +SET SESSION gtid_domain_id= 2; +CREATE TABLE t2 (a INT PRIMARY KEY, b VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1, "initial"); +SET SQL_LOG_BIN=0; +CREATE TABLE t3 (a INT PRIMARY KEY, b VARCHAR(10)); +SET SQL_LOG_BIN=1; +INSERT INTO t3 VALUES (201, "initial 2"); +SHOW ALL SLAVES STATUS; +Connection_name +Slave_SQL_State Slave has read all relay log; waiting for the slave I/O thread to update it +Slave_IO_State Waiting for master to send event +Master_Host 127.0.0.1 +Master_User root +Master_Port MYPORT_3 +Connect_Retry 60 +Master_Log_File server3-bin.000001 +Read_Master_Log_Pos 1499 +Relay_Log_File mysqld-relay-bin.000002 +Relay_Log_Pos 1788 +Relay_Master_Log_File server3-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 1499 +Relay_Log_Space 2086 +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master 0 +Master_SSL_Verify_Server_Cert No +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 0 +Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 3 +Master_SSL_Crl +Master_SSL_Crlpath +Using_Gtid 0 +Retried_transactions 0 +Max_relay_log_size 1073741824 +Executed_log_entries 25 +Slave_received_heartbeats 0 +Slave_heartbeat_period 60.000 +Gtid_Pos 1-1-4,2-2-3 +*** Now move slave2 to replicate from both master1 and master2 instead of just slave1 *** +STOP ALL SLAVES; +Warnings: +Note 1938 SLAVE '' stopped +INSERT INTO t1 VALUES (2, "switch1"); +INSERT INTO t3 VALUES (102, "switch1 a"); +INSERT INTO t2 VALUES (2, "switch1"); +INSERT INTO t3 VALUES (202, "switch1 b"); +CHANGE MASTER 'slave1' TO master_port=MYPORT_1, master_host='127.0.0.1', master_user='root', master_use_gtid=1; +CHANGE MASTER 'slave2' TO master_port=MYPORT_2, master_host='127.0.0.1', master_user='root', master_use_gtid=1; +SET default_master_connection = 'slave1'; +START SLAVE; +include/wait_for_slave_to_start.inc +SET default_master_connection = 'slave2'; +START SLAVE; +include/wait_for_slave_to_start.inc +set default_master_connection = ''; +*** Move slave1 to replicate from slave2 instead of from master1 and master2 *** +STOP SLAVE 'slave1'; +INSERT INTO t1 VALUES (3, "switch 2"); +INSERT INTO t3 VALUES (103, "switch 2 a"); +INSERT INTO t2 VALUES (3, "switch 2"); +INSERT INTO t3 VALUES (203, "switch 2 b"); +STOP SLAVE 'slave2'; +INSERT INTO t2 VALUES (4, "switch 3"); +INSERT INTO t3 VALUES (204, "switch 3 b"); +CHANGE MASTER TO master_port=MYPORT_4, master_host='127.0.0.1', master_user='root', master_use_gtid=1; +START SLAVE; +SELECT * FROM t1 ORDER BY a; +a b +1 initial +2 switch1 +3 switch 2 +SELECT * FROM t2 ORDER BY a; +a b +1 initial +2 switch1 +3 switch 2 +4 switch 3 +SELECT * FROM t3 ORDER BY a; +a b +101 initial 1 +102 switch1 a +103 switch 2 a +201 initial 2 +202 switch1 b +203 switch 2 b +204 switch 3 b +DROP TABLE t1; +SET SQL_LOG_BIN=0; +DROP TABLE t3; +SET SQL_LOG_BIN=1; +DROP TABLE t2; +DROP TABLE t3; +SET GLOBAL gtid_domain_id=0; +STOP ALL SLAVES; +Warnings: +Note 1938 SLAVE '' stopped +include/reset_master_slave.inc +SET GLOBAL gtid_domain_id=0; +STOP ALL SLAVES; +Warnings: +Note 1938 SLAVE 'slave2' stopped +Note 1938 SLAVE 'slave1' stopped +include/reset_master_slave.inc +SET GLOBAL gtid_domain_id=0; +include/reset_master_slave.inc +SET GLOBAL gtid_domain_id=0; +include/reset_master_slave.inc diff --git a/mysql-test/suite/multi_source/gtid.test b/mysql-test/suite/multi_source/gtid.test new file mode 100644 index 00000000000..06a0edf2ccc --- /dev/null +++ b/mysql-test/suite/multi_source/gtid.test @@ -0,0 +1,156 @@ +--source include/not_embedded.inc +--source include/have_innodb.inc + +# +# Test GTID with multi-source +# + +--connect (slave1,127.0.0.1,root,,,$SERVER_MYPORT_3) +--connect (slave2,127.0.0.1,root,,,$SERVER_MYPORT_4) +--connect (master1,127.0.0.1,root,,,$SERVER_MYPORT_1) +--connect (master2,127.0.0.1,root,,,$SERVER_MYPORT_2) + +--connection slave1 +--replace_result $SERVER_MYPORT_1 MYPORT_1 +eval CHANGE MASTER 'slave1' TO master_port=$SERVER_MYPORT_1, master_host='127.0.0.1', master_user='root'; +--replace_result $SERVER_MYPORT_2 MYPORT_2 +eval CHANGE MASTER 'slave2' TO master_port=$SERVER_MYPORT_2, master_host='127.0.0.1', master_user='root'; +set default_master_connection = 'slave1'; +START SLAVE; +--source include/wait_for_slave_to_start.inc +set default_master_connection = 'slave2'; +START SLAVE; +--source include/wait_for_slave_to_start.inc +set default_master_connection = ''; + +--connection slave2 +--replace_result $SERVER_MYPORT_3 MYPORT_3 +eval CHANGE MASTER TO master_port=$SERVER_MYPORT_3, master_host='127.0.0.1', master_user='root'; +start all slaves; +--source include/wait_for_slave_to_start.inc + +--connection master1 +SET GLOBAL gtid_domain_id= 1; +SET SESSION gtid_domain_id= 1; +CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10)); +INSERT INTO t1 VALUES (1, "initial"); +CREATE TABLE t3 (a INT PRIMARY KEY, b VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t3 VALUES (101, "initial 1"); + +--connection master2 +SET GLOBAL gtid_domain_id= 2; +SET SESSION gtid_domain_id= 2; +CREATE TABLE t2 (a INT PRIMARY KEY, b VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1, "initial"); +SET SQL_LOG_BIN=0; +CREATE TABLE t3 (a INT PRIMARY KEY, b VARCHAR(10)); +SET SQL_LOG_BIN=1; +INSERT INTO t3 VALUES (201, "initial 2"); + +--connection slave2 +--let $wait_condition= SELECT COUNT(*)=3 FROM information_schema.tables WHERE table_name IN ("t1", "t2", "t3") AND table_schema = "test" +--source include/wait_condition.inc +--let $wait_condition= SELECT (SELECT COUNT(*) FROM t1)=1 AND (SELECT COUNT(*) FROM t2)=1 AND (SELECT COUNT(*) FROM t3)=2 +--source include/wait_condition.inc +--replace_result $SERVER_MYPORT_3 MYPORT_3 +query_vertical SHOW ALL SLAVES STATUS; + +--echo *** Now move slave2 to replicate from both master1 and master2 instead of just slave1 *** +STOP ALL SLAVES; + +# Let us have a couple extra transactions on the masters to check that +# we resume replication at the right place even in the middle of the logs. +--connection master1 +INSERT INTO t1 VALUES (2, "switch1"); +INSERT INTO t3 VALUES (102, "switch1 a"); +--connection master2 +INSERT INTO t2 VALUES (2, "switch1"); +INSERT INTO t3 VALUES (202, "switch1 b"); + +--connection slave2 +--replace_result $SERVER_MYPORT_1 MYPORT_1 +eval CHANGE MASTER 'slave1' TO master_port=$SERVER_MYPORT_1, master_host='127.0.0.1', master_user='root', master_use_gtid=1; +--replace_result $SERVER_MYPORT_2 MYPORT_2 +eval CHANGE MASTER 'slave2' TO master_port=$SERVER_MYPORT_2, master_host='127.0.0.1', master_user='root', master_use_gtid=1; +SET default_master_connection = 'slave1'; +START SLAVE; +--source include/wait_for_slave_to_start.inc +SET default_master_connection = 'slave2'; +START SLAVE; +--source include/wait_for_slave_to_start.inc +set default_master_connection = ''; +--let $wait_condition= SELECT (SELECT COUNT(*) FROM t1)=2 AND (SELECT COUNT(*) FROM t2)=2 AND (SELECT COUNT(*) FROM t3)=4 +--source include/wait_condition.inc + + +--echo *** Move slave1 to replicate from slave2 instead of from master1 and master2 *** +--connection slave1 +# Set up so that slave1 will have to start from two different positions +# in the slave2 binlog (one for each domain_id). +STOP SLAVE 'slave1'; + +--connection master1 +INSERT INTO t1 VALUES (3, "switch 2"); +INSERT INTO t3 VALUES (103, "switch 2 a"); + +--connection slave2 +--let $wait_condition= SELECT (SELECT COUNT(*) FROM t1)=3 AND (SELECT COUNT(*) FROM t2)=2 AND (SELECT COUNT(*) FROM t3)=5 +--source include/wait_condition.inc + +--connection master2 +INSERT INTO t2 VALUES (3, "switch 2"); +INSERT INTO t3 VALUES (203, "switch 2 b"); + +--connection slave1 +--let $wait_condition= SELECT (SELECT COUNT(*) FROM t1)=2 AND (SELECT COUNT(*) FROM t2)=3 AND (SELECT COUNT(*) FROM t3)=5 +--source include/wait_condition.inc +STOP SLAVE 'slave2'; + +--connection master2 +INSERT INTO t2 VALUES (4, "switch 3"); +INSERT INTO t3 VALUES (204, "switch 3 b"); + +--connection slave1 +--replace_result $SERVER_MYPORT_4 MYPORT_4 +eval CHANGE MASTER TO master_port=$SERVER_MYPORT_4, master_host='127.0.0.1', master_user='root', master_use_gtid=1; +START SLAVE; +--let $wait_condition= SELECT (SELECT COUNT(*) FROM t1)=3 AND (SELECT COUNT(*) FROM t2)=4 AND (SELECT COUNT(*) FROM t3)=7 +--source include/wait_condition.inc +SELECT * FROM t1 ORDER BY a; +SELECT * FROM t2 ORDER BY a; +SELECT * FROM t3 ORDER BY a; + +# Cleanup. +--connection master1 +DROP TABLE t1; +SET SQL_LOG_BIN=0; +DROP TABLE t3; +SET SQL_LOG_BIN=1; + +--connection master2 +DROP TABLE t2; +DROP TABLE t3; + +--connection slave1 +SET GLOBAL gtid_domain_id=0; +--let $wait_condition= SELECT COUNT(*)=0 FROM information_schema.tables WHERE table_name IN ("t1", "t2", "t3") AND table_schema = "test" +--source include/wait_condition.inc +STOP ALL SLAVES; +--source reset_master_slave.inc +--disconnect slave1 + +--connection slave2 +SET GLOBAL gtid_domain_id=0; +STOP ALL SLAVES; +--source reset_master_slave.inc +--disconnect slave2 + +--connection master1 +SET GLOBAL gtid_domain_id=0; +--source reset_master_slave.inc +--disconnect master1 + +--connection master2 +SET GLOBAL gtid_domain_id=0; +--source reset_master_slave.inc +--disconnect master2 diff --git a/mysql-test/suite/multi_source/info_logs.result b/mysql-test/suite/multi_source/info_logs.result index 3c99c755af9..d80bf0e8e5c 100644 --- a/mysql-test/suite/multi_source/info_logs.result +++ b/mysql-test/suite/multi_source/info_logs.result @@ -84,17 +84,17 @@ MASTER 2.2 # EOF # 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 Master_SSL_Crl Master_SSL_Crlpath Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period - 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 286 relay.000002 572 master-bin.000001 Yes Yes 0 0 286 857 None 0 No 0 No 0 0 1 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 286 relay-master@00202@002e2.000002 572 master-bin.000001 Yes Yes 0 0 286 876 None 0 No 0 No 0 0 2 0 1073741824 6 0 60.000 +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 Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_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 0 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 0 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 Master_SSL_Crl Master_SSL_Crlpath Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period - 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 286 relay.000004 532 master-bin.000001 Yes Yes 0 0 286 817 None 0 No 0 No 0 0 1 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 286 relay-master@00202@002e2.000004 532 master-bin.000001 Yes Yes 0 0 286 836 None 0 No 0 No 0 0 2 0 1073741824 6 0 60.000 +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 Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_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 0 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 0 0 1073741824 6 0 60.000 # # List of files matching '*info*' pattern # after slave server restart diff --git a/mysql-test/suite/multi_source/info_logs.test b/mysql-test/suite/multi_source/info_logs.test index 73e6ee73722..569af8bd4a3 100644 --- a/mysql-test/suite/multi_source/info_logs.test +++ b/mysql-test/suite/multi_source/info_logs.test @@ -3,6 +3,7 @@ # --source include/not_embedded.inc +--let $rpl_server_count= 0 --connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3) @@ -129,6 +130,13 @@ start slave; --echo # EOF --echo # +let $wait_for_all= 1; +let $show_statement= SHOW ALL SLAVES STATUS; +let $field= Slave_IO_State; +let $condition= = 'Waiting for master to send event'; +--source include/wait_show_condition.inc + + --replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2 show all slaves status; @@ -145,6 +153,13 @@ set default_master_connection = 'MASTER 2.2'; --source include/wait_for_slave_to_start.inc set default_master_connection = ''; +let $wait_for_all= 1; +let $show_statement= SHOW ALL SLAVES STATUS; +let $field= Slave_IO_State; +let $condition= = 'Waiting for master to send event'; +--source include/wait_show_condition.inc + + --replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2 show all slaves status; diff --git a/mysql-test/suite/multi_source/multisource.result b/mysql-test/suite/multi_source/multisource.result index 37993dcf75f..60523bc0a0e 100644 --- a/mysql-test/suite/multi_source/multisource.result +++ b/mysql-test/suite/multi_source/multisource.result @@ -10,14 +10,14 @@ start slave 'master1'; 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 Master_SSL_Crl Master_SSL_Crlpath -Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 286 mysqld-relay-bin-master1.000002 572 master-bin.000001 Yes Yes 0 0 286 876 None 0 No 0 No 0 0 1 +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 Master_SSL_Crl Master_SSL_Crlpath 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 0 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 Master_SSL_Crl Master_SSL_Crlpath -Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 286 mysqld-relay-bin-master1.000002 572 master-bin.000001 Yes Yes 0 0 286 876 None 0 No 0 No 0 0 1 +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 Master_SSL_Crl Master_SSL_Crlpath 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 0 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 Master_SSL_Crl Master_SSL_Crlpath Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period -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 286 mysqld-relay-bin-master1.000002 572 master-bin.000001 Yes Yes 0 0 286 876 None 0 No 0 No 0 0 1 0 1073741824 6 0 60.000 +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 Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_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 0 0 1073741824 7 0 60.000 drop database if exists db1; create database db1; use db1; @@ -33,21 +33,25 @@ mysqld-relay-bin-master1.000002 mysqld-relay-bin-master1.index show relaylog events; Log_name Pos Event_type Server_id End_log_pos Info -mysqld-relay-bin-master1.000001 4 Format_desc 3 246 Server version -mysqld-relay-bin-master1.000001 246 Rotate 3 304 mysqld-relay-bin-master1.000002;pos=4 +mysqld-relay-bin-master1.000001 4 Format_desc 3 248 Server version +mysqld-relay-bin-master1.000001 248 Rotate 3 306 mysqld-relay-bin-master1.000002;pos=4 show relaylog events in 'mysqld-relay-bin-master1.000002'; Log_name Pos Event_type Server_id End_log_pos Info -mysqld-relay-bin-master1.000002 4 Format_desc 3 246 Server version -mysqld-relay-bin-master1.000002 246 Rotate 1 0 master-bin.000001;pos=4 -mysqld-relay-bin-master1.000002 290 Format_desc 1 246 Server version -mysqld-relay-bin-master1.000002 532 Binlog_checkpoint 1 286 master-bin.000001 -mysqld-relay-bin-master1.000002 572 Query 1 375 drop database if exists db1 -mysqld-relay-bin-master1.000002 661 Query 1 456 create database db1 -mysqld-relay-bin-master1.000002 742 Query 1 609 use `db1`; create table t1 (i int auto_increment, f1 varchar(16), primary key pk (i,f1)) engine=MyISAM -mysqld-relay-bin-master1.000002 895 Query 1 676 BEGIN -mysqld-relay-bin-master1.000002 962 Intvar 1 704 INSERT_ID=1 -mysqld-relay-bin-master1.000002 990 Query 1 808 use `db1`; insert into t1 (f1) values ('one'),('two') -mysqld-relay-bin-master1.000002 1094 Query 1 876 COMMIT +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 change master 'master1' to master_port=MYPORT_2, master_host='127.0.0.1', @@ -71,9 +75,9 @@ master_user='root'; 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 Master_SSL_Crl Master_SSL_Crlpath Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period - 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 286 mysqld-relay-bin.000002 572 master-bin.000001 Yes Yes 0 0 286 868 None 0 No 0 No 0 0 2 0 1073741824 6 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 876 mysqld-relay-bin-master1.000002 1162 master-bin.000001 Yes Yes 0 0 876 1466 None 0 No 0 No 0 0 1 0 1073741824 13 0 60.000 +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 Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_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 0 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 0 0 1073741824 17 0 60.000 0-1-4 insert into t1 (f1) values ('three'); drop database if exists db2; create database db2; @@ -97,13 +101,13 @@ flush logs; purge binary logs to 'master-bin.000002'; show binary logs; Log_name File_size -master-bin.000002 326 +master-bin.000002 367 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 Master_SSL_Crl Master_SSL_Crlpath Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period - 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 809 mysqld-relay-bin.000002 1095 master-bin.000001 Yes Yes 0 0 809 1391 None 0 No 0 No 0 0 2 0 1073741824 13 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.000002 690 mysqld-relay-bin-master1.000004 976 master-bin.000002 Yes Yes 0 0 690 1324 None 0 No 0 No 0 0 1 0 1073741824 31 0 60.000 +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 Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_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 0 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 0 0 1073741824 37 0 60.000 0-1-7 select * from db1.t1; i f1 1 one @@ -112,21 +116,25 @@ i f1 4 four show relaylog events; Log_name Pos Event_type Server_id End_log_pos Info -mysqld-relay-bin.000001 4 Format_desc 3 246 Server version -mysqld-relay-bin.000001 246 Rotate 3 296 mysqld-relay-bin.000002;pos=4 +mysqld-relay-bin.000001 4 Format_desc 3 248 Server version +mysqld-relay-bin.000001 248 Rotate 3 298 mysqld-relay-bin.000002;pos=4 show relaylog events in 'mysqld-relay-bin.000002'; Log_name Pos Event_type Server_id End_log_pos Info -mysqld-relay-bin.000002 4 Format_desc 3 246 Server version -mysqld-relay-bin.000002 246 Rotate 2 0 master-bin.000001;pos=4 -mysqld-relay-bin.000002 290 Format_desc 2 246 Server version -mysqld-relay-bin.000002 532 Binlog_checkpoint 2 286 master-bin.000001 -mysqld-relay-bin.000002 572 Query 2 375 drop database if exists db2 -mysqld-relay-bin.000002 661 Query 2 456 create database db2 -mysqld-relay-bin.000002 742 Query 2 591 use `db2`; create table t1 (pk int auto_increment primary key, f1 int) engine=InnoDB -mysqld-relay-bin.000002 877 Query 2 658 BEGIN -mysqld-relay-bin.000002 944 Intvar 2 686 INSERT_ID=1 -mysqld-relay-bin.000002 972 Query 2 782 use `db2`; insert into t1 (f1) values (1),(2) -mysqld-relay-bin.000002 1068 Xid 2 809 COMMIT /* xid=<num> */ +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> */ stop slave io_thread; show status like 'Slave_running'; Variable_name Value diff --git a/mysql-test/suite/multi_source/multisource.test b/mysql-test/suite/multi_source/multisource.test index 4938a0142d1..754dc9fa650 100644 --- a/mysql-test/suite/multi_source/multisource.test +++ b/mysql-test/suite/multi_source/multisource.test @@ -5,6 +5,7 @@ --source include/not_embedded.inc --source include/have_innodb.inc +--let $rpl_server_count= 0 --connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3) @@ -42,6 +43,12 @@ set default_master_connection = 'master1'; # each of the 3 commands should produce # 'master1' status +let $wait_for_all= 1; +let $show_statement= SHOW ALL SLAVES STATUS; +let $field= Slave_IO_State; +let $condition= = 'Waiting for master to send event'; +--source include/wait_show_condition.inc + --replace_result $SERVER_MYPORT_1 MYPORT_1 show slave 'master1' status; --replace_result $SERVER_MYPORT_1 MYPORT_1 @@ -131,6 +138,12 @@ start slave; # See both connections in the same status output +let $wait_for_all= 1; +let $show_statement= SHOW ALL SLAVES STATUS; +let $field= Slave_IO_State; +let $condition= = 'Waiting for master to send event'; +--source include/wait_show_condition.inc + --replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2 show all slaves status; @@ -195,6 +208,12 @@ create table db1.t3 (f1 int) engine=InnoDB; --source wait_for_sql_thread_read_all.inc +let $wait_for_all= 1; +let $show_statement= SHOW ALL SLAVES STATUS; +let $field= Slave_IO_State; +let $condition= = 'Waiting for master to send event'; +--source include/wait_show_condition.inc + --replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2 show all slaves status; diff --git a/mysql-test/suite/multi_source/relaylog_events.result b/mysql-test/suite/multi_source/relaylog_events.result index 1f3b57b045d..6b452e65176 100644 --- a/mysql-test/suite/multi_source/relaylog_events.result +++ b/mysql-test/suite/multi_source/relaylog_events.result @@ -12,16 +12,19 @@ mysqld-relay-bin-master1.000002 mysqld-relay-bin-master1.index show relaylog events in 'mysqld-relay-bin-master1.000002'; Log_name Pos Event_type Server_id End_log_pos Info -mysqld-relay-bin-master1.000002 4 Format_desc 3 246 Server version -mysqld-relay-bin-master1.000002 246 Rotate 1 0 master-bin.000001;pos=4 -mysqld-relay-bin-master1.000002 290 Format_desc 1 246 Server version -mysqld-relay-bin-master1.000002 532 Binlog_checkpoint 1 286 master-bin.000001 -mysqld-relay-bin-master1.000002 572 Query 1 400 use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ -mysqld-relay-bin-master1.000002 686 Query 1 500 use `test`; create table t1 (i int) engine=MyISAM +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 show relaylog events; Log_name Pos Event_type Server_id End_log_pos Info -mysqld-relay-bin-master1.000001 4 Format_desc 3 246 Server version -mysqld-relay-bin-master1.000001 246 Rotate 3 304 mysqld-relay-bin-master1.000002;pos=4 +mysqld-relay-bin-master1.000001 4 Format_desc 3 248 Server version +mysqld-relay-bin-master1.000001 248 Rotate 3 306 mysqld-relay-bin-master1.000002;pos=4 drop table t1; include/reset_master_slave.inc include/reset_master_slave.inc diff --git a/mysql-test/suite/multi_source/relaylog_events.test b/mysql-test/suite/multi_source/relaylog_events.test index ba13a4dd7e9..a59dd706b94 100644 --- a/mysql-test/suite/multi_source/relaylog_events.test +++ b/mysql-test/suite/multi_source/relaylog_events.test @@ -4,6 +4,7 @@ # --source include/not_embedded.inc +--let $rpl_server_count= 0 --connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3) diff --git a/mysql-test/suite/multi_source/reset_master_slave.inc b/mysql-test/suite/multi_source/reset_master_slave.inc index 63ba3ee00af..84634de8ff3 100644 --- a/mysql-test/suite/multi_source/reset_master_slave.inc +++ b/mysql-test/suite/multi_source/reset_master_slave.inc @@ -23,7 +23,7 @@ while ($con_name != 'No such row') --error 0,ER_FLUSH_MASTER_BINLOG_CLOSED reset master; +set global gtid_pos=''; eval set default_master_connection = '$default_master'; - --source include/end_include_file.inc diff --git a/mysql-test/suite/multi_source/reset_slave.result b/mysql-test/suite/multi_source/reset_slave.result index 498188db6cd..ebf38789e2b 100644 --- a/mysql-test/suite/multi_source/reset_slave.result +++ b/mysql-test/suite/multi_source/reset_slave.result @@ -10,15 +10,15 @@ create table t1 (i int) engine=MyISAM; 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 Master_SSL_Crl Master_SSL_Crlpath - 127.0.0.1 root MYPORT_1 60 master-bin.000001 729 mysqld-relay-bin-master1.000002 1015 master-bin.000001 No No 0 0 729 1319 None 0 No NULL No 0 0 1 +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 Master_SSL_Crl Master_SSL_Crlpath 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 0 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 Master_SSL_Crl Master_SSL_Crlpath - 127.0.0.1 root MYPORT_1 60 4 1015 No No 0 0 0 1319 None 0 No NULL No 0 0 1 +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 Master_SSL_Crl Master_SSL_Crlpath 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 0 reset slave 'master1' all; show slave 'master1' status; ERROR HY000: There is no master connection 'master1' diff --git a/mysql-test/suite/multi_source/reset_slave.test b/mysql-test/suite/multi_source/reset_slave.test index bcc0560fe5b..108941c0d1a 100644 --- a/mysql-test/suite/multi_source/reset_slave.test +++ b/mysql-test/suite/multi_source/reset_slave.test @@ -3,6 +3,7 @@ # --source include/not_embedded.inc +--let $rpl_server_count= 0 --connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3) diff --git a/mysql-test/suite/multi_source/simple.result b/mysql-test/suite/multi_source/simple.result index d38b3087263..e2caa911ec0 100644 --- a/mysql-test/suite/multi_source/simple.result +++ b/mysql-test/suite/multi_source/simple.result @@ -10,9 +10,9 @@ Note 1937 SLAVE 'slave2' started 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 Master_SSL_Crl Master_SSL_Crlpath Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period -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 286 mysqld-relay-bin-slave1.000002 572 master-bin.000001 Yes Yes 0 0 286 875 None 0 No 0 No 0 0 1 0 1073741824 6 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 286 mysqld-relay-bin-slave2.000002 572 master-bin.000001 Yes Yes 0 0 286 875 None 0 No 0 No 0 0 2 0 1073741824 6 0 60.000 +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 Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_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 0 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 0 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 286 +Read_Master_Log_Pos 311 Relay_Log_File mysqld-relay-bin-slave1.000002 -Relay_Log_Pos 572 +Relay_Log_Pos 599 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 286 -Relay_Log_Space 875 +Exec_Master_Log_Pos 311 +Relay_Log_Space 904 Until_Condition None Until_Log_File Until_Log_Pos 0 @@ -58,21 +58,22 @@ Replicate_Ignore_Server_Ids Master_Server_Id 1 Master_SSL_Crl Master_SSL_Crlpath +Using_Gtid 0 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 Master_SSL_Crl Master_SSL_Crlpath Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period -slave1 127.0.0.1 root MYPORT_1 60 4 572 No No 0 0 0 875 None 0 No NULL No 0 0 1 0 1073741824 6 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 286 mysqld-relay-bin-slave2.000002 572 master-bin.000001 Yes Yes 0 0 286 875 None 0 No 0 No 0 0 2 0 1073741824 6 0 60.000 +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 Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_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 0 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 0 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 Master_SSL_Crl Master_SSL_Crlpath Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period -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 286 mysqld-relay-bin-slave2.000002 572 master-bin.000001 Yes Yes 0 0 286 875 None 0 No 0 No 0 0 2 0 1073741824 6 0 60.000 +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 Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_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 0 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 Master_SSL_Crl Master_SSL_Crlpath Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period -slave2 127.0.0.1 root MYPORT_2 60 master-bin.000001 286 mysqld-relay-bin-slave2.000002 572 master-bin.000001 No No 0 0 286 875 None 0 No NULL No 0 0 2 0 1073741824 6 0 60.000 +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 Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_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 0 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/multi_source/simple.test b/mysql-test/suite/multi_source/simple.test index 915cbd73941..c3b7a60448a 100644 --- a/mysql-test/suite/multi_source/simple.test +++ b/mysql-test/suite/multi_source/simple.test @@ -3,6 +3,7 @@ # --source include/not_embedded.inc +--let $rpl_server_count= 0 --connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3) --connect (master1,127.0.0.1,root,,,$SERVER_MYPORT_1) diff --git a/mysql-test/suite/multi_source/skip_counter.result b/mysql-test/suite/multi_source/skip_counter.result index 42ad961d6dd..bdf9a03d9a1 100644 --- a/mysql-test/suite/multi_source/skip_counter.result +++ b/mysql-test/suite/multi_source/skip_counter.result @@ -37,7 +37,7 @@ select @@global.sql_slave_skip_counter; select @@session.sql_slave_skip_counter; @@session.sql_slave_skip_counter 0 -set global sql_slave_skip_counter= 3; +set global sql_slave_skip_counter= 5; set default_master_connection = 'master1'; select @@session.sql_slave_skip_counter; @@session.sql_slave_skip_counter @@ -51,7 +51,7 @@ Warning 1617 There is no master connection 'qqq' set default_master_connection = 'master2'; select @@session.sql_slave_skip_counter; @@session.sql_slave_skip_counter -3 +5 select @@global.max_relay_log_size; @@global.max_relay_log_size 1073741824 diff --git a/mysql-test/suite/multi_source/skip_counter.test b/mysql-test/suite/multi_source/skip_counter.test index d158f382a97..73c48dfd6d7 100644 --- a/mysql-test/suite/multi_source/skip_counter.test +++ b/mysql-test/suite/multi_source/skip_counter.test @@ -6,6 +6,7 @@ # on the 1st master --source include/not_embedded.inc +--let $rpl_server_count= 0 --connect (master1,127.0.0.1,root,,,$SERVER_MYPORT_1) @@ -55,9 +56,8 @@ master_user='root'; # the schema creation will be replicated from the 1st master, # so we want to skip it in the second replication connection. -# Normally it should have been 2 events, but -# currently Binlog_checkpoint also counts. Maybe we'll need -# to modify the test later +# Normally it should have been 2 events, but currently Binlog_checkpoint + +# 2 Gtid also count. Maybe we'll need to modify the test later --let $skip_counter_saved = `select @@global.sql_slave_skip_counter` --let $max_relay_log_size_saved= `select @@global.max_relay_log_size` @@ -71,7 +71,7 @@ select @@session.sql_slave_skip_counter; set global sql_slave_skip_counter= default; select @@global.sql_slave_skip_counter; select @@session.sql_slave_skip_counter; -set global sql_slave_skip_counter= 3; +set global sql_slave_skip_counter= 5; set default_master_connection = 'master1'; select @@session.sql_slave_skip_counter; set default_master_connection = 'qqq'; diff --git a/mysql-test/suite/multi_source/status_vars.test b/mysql-test/suite/multi_source/status_vars.test index eec89ee4e81..d1cfda75d01 100644 --- a/mysql-test/suite/multi_source/status_vars.test +++ b/mysql-test/suite/multi_source/status_vars.test @@ -3,6 +3,7 @@ # --source include/not_embedded.inc +--let $rpl_server_count= 0 --connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3) diff --git a/mysql-test/suite/multi_source/syntax.result b/mysql-test/suite/multi_source/syntax.result index 3d91bfea753..3b041b7165c 100644 --- a/mysql-test/suite/multi_source/syntax.result +++ b/mysql-test/suite/multi_source/syntax.result @@ -1,11 +1,11 @@ include/master-slave.inc [connection master] 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 Master_SSL_Crl Master_SSL_Crlpath +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 Master_SSL_Crl Master_SSL_Crlpath Using_Gtid 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 Master_SSL_Crl Master_SSL_Crlpath +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 Master_SSL_Crl Master_SSL_Crlpath Using_Gtid 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 Master_SSL_Crl Master_SSL_Crlpath Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period +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 Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Pos # # Check error handling # |