summaryrefslogtreecommitdiff
path: root/mysql-test/suite/multi_source
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2014-02-11 19:45:38 +0200
committerMichael Widenius <monty@askmonty.org>2014-02-11 19:45:38 +0200
commit3f4337103a89d16f30ebab516f206397efdd0392 (patch)
tree9a83d4b3f33def159f8599e0c40acec036725c66 /mysql-test/suite/multi_source
parentadd6eb69a8bcf074ab7d1564cc0a53a55b0c1687 (diff)
parent50323f12630fbc5b19b40f1a9affdc550cc7cfd9 (diff)
downloadmariadb-git-3f4337103a89d16f30ebab516f206397efdd0392.tar.gz
Automatic merge
Diffstat (limited to 'mysql-test/suite/multi_source')
-rw-r--r--mysql-test/suite/multi_source/skip_counter.result10
-rw-r--r--mysql-test/suite/multi_source/skip_counter.test22
2 files changed, 21 insertions, 11 deletions
diff --git a/mysql-test/suite/multi_source/skip_counter.result b/mysql-test/suite/multi_source/skip_counter.result
index bdf9a03d9a1..10226e2ba4e 100644
--- a/mysql-test/suite/multi_source/skip_counter.result
+++ b/mysql-test/suite/multi_source/skip_counter.result
@@ -1,9 +1,11 @@
drop database if exists db;
create database db;
+create table db.this_will_not_be_replicated (i int) engine=MyISAM;
create table db.t1 (i int) engine=MyISAM;
+create table db.t2 (i int) engine=MyISAM;
drop database if exists db;
create database db;
-create table db.t2 (i int) engine=MyISAM;
+create table db.t3 (i int) engine=MyISAM;
change master 'master1' to
master_port=MYPORT_1,
master_host='127.0.0.1',
@@ -37,7 +39,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= 5;
+set global sql_slave_skip_counter= 4;
set default_master_connection = 'master1';
select @@session.sql_slave_skip_counter;
@@session.sql_slave_skip_counter
@@ -51,7 +53,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
-5
+4
select @@global.max_relay_log_size;
@@global.max_relay_log_size
1073741824
@@ -102,6 +104,8 @@ show tables in db;
Tables_in_db
t1
t2
+t3
+this_will_not_be_replicated
drop database db;
set global sql_slave_skip_counter = 0;
set 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 73c48dfd6d7..937261350a8 100644
--- a/mysql-test/suite/multi_source/skip_counter.test
+++ b/mysql-test/suite/multi_source/skip_counter.test
@@ -14,7 +14,9 @@
drop database if exists db;
--enable_warnings
create database db;
+create table db.this_will_not_be_replicated (i int) engine=MyISAM;
create table db.t1 (i int) engine=MyISAM;
+create table db.t2 (i int) engine=MyISAM;
--save_master_pos
# Create the same schema and another table
@@ -26,7 +28,7 @@ create table db.t1 (i int) engine=MyISAM;
drop database if exists db;
--enable_warnings
create database db;
-create table db.t2 (i int) engine=MyISAM;
+create table db.t3 (i int) engine=MyISAM;
--connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3)
@@ -54,10 +56,14 @@ master_host='127.0.0.1',
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 +
-# 2 Gtid also count. Maybe we'll need to modify the test later
+# so we want to skip it in the second replication connection
+# The events we want to skip are:
+#
+# The start format statement event
+# drop database if exists db
+# create database db
+# Create table db.t1
+# - > 4 events in total
--let $skip_counter_saved = `select @@global.sql_slave_skip_counter`
--let $max_relay_log_size_saved= `select @@global.max_relay_log_size`
@@ -71,7 +77,8 @@ 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= 5;
+set global sql_slave_skip_counter= 4;
+
set default_master_connection = 'master1';
select @@session.sql_slave_skip_counter;
set default_master_connection = 'qqq';
@@ -100,7 +107,6 @@ select @@session.max_relay_log_size;
set global max_binlog_size= 4*1024*1024;
select @@global.max_relay_log_size;
-
start slave 'master2';
--source include/wait_for_slave_to_start.inc
set default_master_connection = '';
@@ -115,7 +121,7 @@ set default_master_connection = '';
# If the skip_counter worked as expected, we should
# get here (replication shouldn't have broken)
# and should see both tables here
-# (drop database which came from master2 shoudn't have been executed
+# (drop database which came from master2 shouldn't have been executed
# so t1 should still exist)
show tables in db;