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
fe782f92
Commit
fe782f92
authored
Sep 21, 2006
by
lars/lthalmann@mysql.com/dl145h.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Vertical printout in test to make easier to read
parent
0c03f934
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
263 additions
and
21 deletions
+263
-21
mysql-test/r/rpl_max_relay_size.result
mysql-test/r/rpl_max_relay_size.result
+225
-18
mysql-test/t/rpl_max_relay_size.test
mysql-test/t/rpl_max_relay_size.test
+38
-3
No files found.
mysql-test/r/rpl_max_relay_size.result
View file @
fe782f92
...
@@ -5,9 +5,15 @@ reset slave;
...
@@ -5,9 +5,15 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
start slave;
stop slave;
stop slave;
#
# Generate a big enough master's binlog to cause relay log rotations
#
create table t1 (a int);
create table t1 (a int);
drop table t1;
drop table t1;
reset slave;
reset slave;
#
# Test 1
#
set global max_binlog_size=8192;
set global max_binlog_size=8192;
set global max_relay_log_size=8192-1;
set global max_relay_log_size=8192-1;
select @@global.max_relay_log_size;
select @@global.max_relay_log_size;
...
@@ -15,47 +21,248 @@ select @@global.max_relay_log_size;
...
@@ -15,47 +21,248 @@ select @@global.max_relay_log_size;
4096
4096
start slave;
start slave;
show slave status;
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
Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 50477 slave-relay-bin.000014 1221 master-bin.000001 Yes Yes 0 0 50477 1221 None 0 No #
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 50477
Relay_Log_File slave-relay-bin.000014
Relay_Log_Pos 1221
Relay_Master_Log_File master-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 50477
Relay_Log_Space 1221
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 #
#
# Test 2
#
stop slave;
stop slave;
reset slave;
reset slave;
set global max_relay_log_size=(5*4096);
set global max_relay_log_size=(5*4096);
select @@global.max_relay_log_size;
select @@global.max_relay_log_size;
@@global.max_relay_log_size
@@global.max_relay_log_size 20480
20480
start slave;
start slave;
show slave status;
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
Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 50477 slave-relay-bin.000004 9457 master-bin.000001 Yes Yes 0 0 50477 9457 None 0 No #
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 50477
Relay_Log_File slave-relay-bin.000004
Relay_Log_Pos 9457
Relay_Master_Log_File master-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 50477
Relay_Log_Space 9457
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 #
#
# Test 3: max_relay_log_size = 0
#
stop slave;
stop slave;
reset slave;
reset slave;
set global max_relay_log_size=0;
set global max_relay_log_size=0;
select @@global.max_relay_log_size;
select @@global.max_relay_log_size;
@@global.max_relay_log_size
@@global.max_relay_log_size 0
0
start slave;
start slave;
show slave status;
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
Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 50477 slave-relay-bin.000008 1283 master-bin.000001 Yes Yes 0 0 50477 1283 None 0 No #
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 50477
Relay_Log_File slave-relay-bin.000008
Relay_Log_Pos 1283
Relay_Master_Log_File master-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 50477
Relay_Log_Space 1283
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 #
#
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
#
stop slave;
stop slave;
reset slave;
reset slave;
flush logs;
flush logs;
show slave status;
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
Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 1 4 slave-relay-bin.000001 4 No No 0 0 0 4 None 0 No #
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File
Read_Master_Log_Pos 4
Relay_Log_File slave-relay-bin.000001
Relay_Log_Pos 4
Relay_Master_Log_File
Slave_IO_Running No
Slave_SQL_Running No
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 0
Relay_Log_Space 4
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 #
#
# Test 5
#
reset slave;
reset slave;
start slave;
start slave;
flush logs;
flush logs;
create table t1 (a int);
create table t1 (a int);
show slave status;
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
Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 50535 slave-relay-bin.000009 62 master-bin.000001 Yes Yes 0 0 50535 62 None 0 No #
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 50535
Relay_Log_File slave-relay-bin.000009
Relay_Log_Pos 62
Relay_Master_Log_File master-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 50535
Relay_Log_Space 62
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 #
#
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
#
flush logs;
flush logs;
drop table t1;
drop table t1;
show slave status;
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
Slave_IO_State #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 50583 slave-relay-bin.000010 52 master-bin.000001 Yes Yes 0 0 50583 52 None 0 No #
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 50583
Relay_Log_File slave-relay-bin.000010
Relay_Log_Pos 52
Relay_Master_Log_File master-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 50583
Relay_Log_Space 52
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 #
flush logs;
flush logs;
show master status;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
File master-bin.000002
master-bin.000002 4
Position 4
Binlog_Do_DB
Binlog_Ignore_DB
mysql-test/t/rpl_max_relay_size.test
View file @
fe782f92
...
@@ -7,7 +7,11 @@ source include/master-slave.inc;
...
@@ -7,7 +7,11 @@ source include/master-slave.inc;
connection
slave
;
connection
slave
;
stop
slave
;
stop
slave
;
connection
master
;
connection
master
;
# Generate a big enough master's binlog to cause relay log rotations
--
echo
#
--
echo
# Generate a big enough master's binlog to cause relay log rotations
--
echo
#
create
table
t1
(
a
int
);
create
table
t1
(
a
int
);
let
$
1
=
800
;
let
$
1
=
800
;
disable_query_log
;
disable_query_log
;
...
@@ -23,6 +27,11 @@ drop table t1;
...
@@ -23,6 +27,11 @@ drop table t1;
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
reset
slave
;
reset
slave
;
--
echo
#
--
echo
# Test 1
--
echo
#
set
global
max_binlog_size
=
8192
;
set
global
max_binlog_size
=
8192
;
set
global
max_relay_log_size
=
8192
-
1
;
# mapped to 4096
set
global
max_relay_log_size
=
8192
-
1
;
# mapped to 4096
select
@@
global
.
max_relay_log_size
;
select
@@
global
.
max_relay_log_size
;
...
@@ -30,7 +39,13 @@ start slave;
...
@@ -30,7 +39,13 @@ start slave;
sync_with_master
;
sync_with_master
;
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 33 #
--
replace_column
1
# 33 #
--
vertical_results
show
slave
status
;
show
slave
status
;
--
echo
#
--
echo
# Test 2
--
echo
#
stop
slave
;
stop
slave
;
reset
slave
;
reset
slave
;
set
global
max_relay_log_size
=
(
5
*
4096
);
set
global
max_relay_log_size
=
(
5
*
4096
);
...
@@ -39,7 +54,13 @@ start slave;
...
@@ -39,7 +54,13 @@ start slave;
sync_with_master
;
sync_with_master
;
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 33 #
--
replace_column
1
# 33 #
--
vertical_results
show
slave
status
;
show
slave
status
;
--
echo
#
--
echo
# Test 3: max_relay_log_size = 0
--
echo
#
stop
slave
;
stop
slave
;
reset
slave
;
reset
slave
;
set
global
max_relay_log_size
=
0
;
set
global
max_relay_log_size
=
0
;
...
@@ -48,9 +69,12 @@ start slave;
...
@@ -48,9 +69,12 @@ start slave;
sync_with_master
;
sync_with_master
;
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 33 #
--
replace_column
1
# 33 #
--
vertical_results
show
slave
status
;
show
slave
status
;
# Tests below are mainly to ensure that we have not coded with wrong assumptions
--
echo
#
--
echo
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
--
echo
#
stop
slave
;
stop
slave
;
reset
slave
;
reset
slave
;
...
@@ -59,8 +83,13 @@ reset slave;
...
@@ -59,8 +83,13 @@ reset slave;
flush
logs
;
flush
logs
;
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 33 #
--
replace_column
1
# 33 #
--
vertical_results
show
slave
status
;
show
slave
status
;
--
echo
#
--
echo
# Test 5
--
echo
#
reset
slave
;
reset
slave
;
start
slave
;
start
slave
;
sync_with_master
;
sync_with_master
;
...
@@ -75,8 +104,13 @@ connection slave;
...
@@ -75,8 +104,13 @@ connection slave;
sync_with_master
;
sync_with_master
;
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 33 #
--
replace_column
1
# 33 #
--
vertical_results
show
slave
status
;
show
slave
status
;
# one more rotation, to be sure Relay_Log_Space is correctly updated
--
echo
#
--
echo
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
--
echo
#
flush
logs
;
flush
logs
;
connection
master
;
connection
master
;
drop
table
t1
;
drop
table
t1
;
...
@@ -85,6 +119,7 @@ connection slave;
...
@@ -85,6 +119,7 @@ connection slave;
sync_with_master
;
sync_with_master
;
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 33 #
--
replace_column
1
# 33 #
--
vertical_results
show
slave
status
;
show
slave
status
;
connection
master
;
connection
master
;
...
...
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