Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
50323f12
Commit
50323f12
authored
Feb 11, 2014
by
Michael Widenius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed test case as gtid events are not counted anymore
parent
e068197c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
11 deletions
+22
-11
mysql-test/suite/multi_source/skip_counter.result
mysql-test/suite/multi_source/skip_counter.result
+8
-3
mysql-test/suite/multi_source/skip_counter.test
mysql-test/suite/multi_source/skip_counter.test
+14
-8
No files found.
mysql-test/suite/multi_source/skip_counter.result
View file @
50323f12
drop database if exists db;
drop database if exists db;
create database 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.t1 (i int) engine=MyISAM;
create table db.t2 (i int) engine=MyISAM;
drop database if exists db;
drop database if exists db;
create database db;
create database db;
create table db.t
2
(i int) engine=MyISAM;
create table db.t
3
(i int) engine=MyISAM;
change master 'master1' to
change master 'master1' to
master_port=MYPORT_1,
master_port=MYPORT_1,
master_host='127.0.0.1',
master_host='127.0.0.1',
...
@@ -37,7 +39,7 @@ select @@global.sql_slave_skip_counter;
...
@@ -37,7 +39,7 @@ select @@global.sql_slave_skip_counter;
select @@session.sql_slave_skip_counter;
select @@session.sql_slave_skip_counter;
@@session.sql_slave_skip_counter
@@session.sql_slave_skip_counter
0
0
set global sql_slave_skip_counter=
5
;
set global sql_slave_skip_counter=
4
;
set default_master_connection = 'master1';
set default_master_connection = 'master1';
select @@session.sql_slave_skip_counter;
select @@session.sql_slave_skip_counter;
@@session.sql_slave_skip_counter
@@session.sql_slave_skip_counter
...
@@ -51,7 +53,7 @@ Warning 1617 There is no master connection 'qqq'
...
@@ -51,7 +53,7 @@ Warning 1617 There is no master connection 'qqq'
set default_master_connection = 'master2';
set default_master_connection = 'master2';
select @@session.sql_slave_skip_counter;
select @@session.sql_slave_skip_counter;
@@session.sql_slave_skip_counter
@@session.sql_slave_skip_counter
5
4
select @@global.max_relay_log_size;
select @@global.max_relay_log_size;
@@global.max_relay_log_size
@@global.max_relay_log_size
1073741824
1073741824
...
@@ -101,6 +103,9 @@ set default_master_connection = '';
...
@@ -101,6 +103,9 @@ set default_master_connection = '';
show tables in db;
show tables in db;
Tables_in_db
Tables_in_db
t1
t1
t2
t3
this_will_not_be_replicated
drop database db;
drop database db;
set global sql_slave_skip_counter = 0;
set global sql_slave_skip_counter = 0;
set global max_relay_log_size = 1073741824;
set global max_relay_log_size = 1073741824;
...
...
mysql-test/suite/multi_source/skip_counter.test
View file @
50323f12
...
@@ -14,7 +14,9 @@
...
@@ -14,7 +14,9 @@
drop
database
if
exists
db
;
drop
database
if
exists
db
;
--
enable_warnings
--
enable_warnings
create
database
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
.
t1
(
i
int
)
engine
=
MyISAM
;
create
table
db
.
t2
(
i
int
)
engine
=
MyISAM
;
--
save_master_pos
--
save_master_pos
# Create the same schema and another table
# Create the same schema and another table
...
@@ -26,7 +28,7 @@ create table db.t1 (i int) engine=MyISAM;
...
@@ -26,7 +28,7 @@ create table db.t1 (i int) engine=MyISAM;
drop
database
if
exists
db
;
drop
database
if
exists
db
;
--
enable_warnings
--
enable_warnings
create
database
db
;
create
database
db
;
create
table
db
.
t
2
(
i
int
)
engine
=
MyISAM
;
create
table
db
.
t
3
(
i
int
)
engine
=
MyISAM
;
--
connect
(
slave
,
127.0
.
0.1
,
root
,,,
$SERVER_MYPORT_3
)
--
connect
(
slave
,
127.0
.
0.1
,
root
,,,
$SERVER_MYPORT_3
)
...
@@ -54,10 +56,14 @@ master_host='127.0.0.1',
...
@@ -54,10 +56,14 @@ master_host='127.0.0.1',
master_user
=
'root'
;
master_user
=
'root'
;
# the schema creation will be replicated from the 1st master,
# the schema creation will be replicated from the 1st master,
# so we want to skip it in the second replication connection.
# so we want to skip it in the second replication connection
# The events we want to skip are:
# Normally it should have been 2 events, but currently Binlog_checkpoint +
#
# 2 Gtid also count. Maybe we'll need to modify the test later
# 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
$skip_counter_saved
=
`select @@global.sql_slave_skip_counter`
--
let
$max_relay_log_size_saved
=
`select @@global.max_relay_log_size`
--
let
$max_relay_log_size_saved
=
`select @@global.max_relay_log_size`
...
@@ -71,7 +77,8 @@ select @@session.sql_slave_skip_counter;
...
@@ -71,7 +77,8 @@ select @@session.sql_slave_skip_counter;
set
global
sql_slave_skip_counter
=
default
;
set
global
sql_slave_skip_counter
=
default
;
select
@@
global
.
sql_slave_skip_counter
;
select
@@
global
.
sql_slave_skip_counter
;
select
@@
session
.
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'
;
set
default_master_connection
=
'master1'
;
select
@@
session
.
sql_slave_skip_counter
;
select
@@
session
.
sql_slave_skip_counter
;
set
default_master_connection
=
'qqq'
;
set
default_master_connection
=
'qqq'
;
...
@@ -100,7 +107,6 @@ select @@session.max_relay_log_size;
...
@@ -100,7 +107,6 @@ select @@session.max_relay_log_size;
set
global
max_binlog_size
=
4
*
1024
*
1024
;
set
global
max_binlog_size
=
4
*
1024
*
1024
;
select
@@
global
.
max_relay_log_size
;
select
@@
global
.
max_relay_log_size
;
start
slave
'master2'
;
start
slave
'master2'
;
--
source
include
/
wait_for_slave_to_start
.
inc
--
source
include
/
wait_for_slave_to_start
.
inc
set
default_master_connection
=
''
;
set
default_master_connection
=
''
;
...
@@ -115,7 +121,7 @@ set default_master_connection = '';
...
@@ -115,7 +121,7 @@ set default_master_connection = '';
# If the skip_counter worked as expected, we should
# If the skip_counter worked as expected, we should
# get here (replication shouldn't have broken)
# get here (replication shouldn't have broken)
# and should see both tables here
# and should see both tables here
# (drop database which came from master2 shoudn't have been executed
# (drop database which came from master2 shou
l
dn't have been executed
# so t1 should still exist)
# so t1 should still exist)
show
tables
in
db
;
show
tables
in
db
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment