Commit 1ab7dfe5 authored by Elena Stepanova's avatar Elena Stepanova

Fix multi-source replication tests for ps-protocol (different xid values), and disable for embedded

parent 0ae6ee55
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
# Check log files with multi-source # Check log files with multi-source
# #
--source include/not_embedded.inc
--connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3) --connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3)
--let $datadir = `SELECT @@datadir` --let $datadir = `SELECT @@datadir`
......
...@@ -108,13 +108,13 @@ i f1 ...@@ -108,13 +108,13 @@ i f1
4 four 4 four
show relaylog events; show relaylog events;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
mysqld-relay-bin.000001 4 Format_desc 3 246 Server ver: 10.0.0-MariaDB-debug-log, Binlog ver: 4 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 246 Rotate 3 296 mysqld-relay-bin.000002;pos=4
show relaylog events in 'mysqld-relay-bin.000002'; show relaylog events in 'mysqld-relay-bin.000002';
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
mysqld-relay-bin.000002 4 Format_desc 3 246 Server ver: 10.0.0-MariaDB-debug-log, Binlog ver: 4 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 246 Rotate 2 0 master-bin.000001;pos=4
mysqld-relay-bin.000002 290 Format_desc 2 246 Server ver: 10.0.0-MariaDB-debug-log, Binlog ver: 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 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 572 Query 2 375 drop database if exists db2
mysqld-relay-bin.000002 661 Query 2 456 create database db2 mysqld-relay-bin.000002 661 Query 2 456 create database db2
...@@ -122,7 +122,7 @@ mysqld-relay-bin.000002 742 Query 2 591 use `db2`; create table t1 (pk int auto_ ...@@ -122,7 +122,7 @@ mysqld-relay-bin.000002 742 Query 2 591 use `db2`; create table t1 (pk int auto_
mysqld-relay-bin.000002 877 Query 2 658 BEGIN mysqld-relay-bin.000002 877 Query 2 658 BEGIN
mysqld-relay-bin.000002 944 Intvar 2 686 INSERT_ID=1 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 972 Query 2 782 use `db2`; insert into t1 (f1) values (1),(2)
mysqld-relay-bin.000002 1068 Xid 2 809 COMMIT /* xid=25 */ mysqld-relay-bin.000002 1068 Xid 2 809 COMMIT /* xid=<num> */
stop slave io_thread; stop slave io_thread;
show status like 'Slave_running'; show status like 'Slave_running';
Variable_name Value Variable_name Value
......
#
# Test basic replication functionality
# in multi-source setup
#
--source include/not_embedded.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3) --connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3)
...@@ -57,9 +63,9 @@ select * from db1.t1; ...@@ -57,9 +63,9 @@ select * from db1.t1;
# Check that relay logs are recognizable # Check that relay logs are recognizable
--replace_regex /Server ver:.*/Server version/ --replace_regex /Server ver:.*/Server version/ /xid=[0-9]+/xid=<num>/
show relaylog events; show relaylog events;
--replace_regex /Server ver:.*/Server version/ --replace_regex /Server ver:.*/Server version/ /xid=[0-9]+/xid=<num>/
show relaylog events in 'mysqld-relay-bin-master1.000002'; show relaylog events in 'mysqld-relay-bin-master1.000002';
...@@ -179,7 +185,9 @@ select * from db1.t1; ...@@ -179,7 +185,9 @@ select * from db1.t1;
# This should show relay log events for the default master # This should show relay log events for the default master
# (the one with the empty name) # (the one with the empty name)
--replace_regex /Server ver:.*/Server version/ /xid=[0-9]+/xid=<num>/
show relaylog events; show relaylog events;
--replace_regex /Server ver:.*/Server version/ /xid=[0-9]+/xid=<num>/
show relaylog events in 'mysqld-relay-bin.000002'; show relaylog events in 'mysqld-relay-bin.000002';
# Make sure we don't lose control over replication connections # Make sure we don't lose control over replication connections
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
# for a named master connection # for a named master connection
# #
--source include/not_embedded.inc
--connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3) --connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3)
--replace_result $SERVER_MYPORT_1 MYPORT_1 --replace_result $SERVER_MYPORT_1 MYPORT_1
......
#--enable_connect_log #
# Check RESET SLAVE [name] [ALL] for multi-source replication
#
--source include/not_embedded.inc
--connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3) --connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3)
--replace_result $SERVER_MYPORT_1 MYPORT_1 --replace_result $SERVER_MYPORT_1 MYPORT_1
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
# Simple multi-master test # Simple multi-master test
# #
--source include/not_embedded.inc
--connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3) --connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3)
--connect (master1,127.0.0.1,root,,,$SERVER_MYPORT_1) --connect (master1,127.0.0.1,root,,,$SERVER_MYPORT_1)
--connect (master2,127.0.0.1,root,,,$SERVER_MYPORT_2) --connect (master2,127.0.0.1,root,,,$SERVER_MYPORT_2)
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
# Create a schema and a table i # Create a schema and a table i
# on the 1st master # on the 1st master
--source include/not_embedded.inc
--connect (master1,127.0.0.1,root,,,$SERVER_MYPORT_1) --connect (master1,127.0.0.1,root,,,$SERVER_MYPORT_1)
--disable_warnings --disable_warnings
......
#
# Status variables related to a replication connection
#
--source include/not_embedded.inc
--connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3) --connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3)
call mtr.add_suppression("Connection 'master1' already exists"); call mtr.add_suppression("Connection 'master1' already exists");
......
# Test multi master syntax # Test multi master syntax
source include/master-slave.inc;
--source include/not_embedded.inc
--source include/master-slave.inc
# Check syntax of multi source replication # Check syntax of multi source replication
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment