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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
9b03041b
Commit
9b03041b
authored
Sep 28, 2012
by
Elena Stepanova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests for Multi-source replication (MDEV-253)
parent
222883b0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
180 additions
and
1 deletion
+180
-1
mysql-test/suite/multi_source/relaylog_events.result
mysql-test/suite/multi_source/relaylog_events.result
+27
-0
mysql-test/suite/multi_source/relaylog_events.test
mysql-test/suite/multi_source/relaylog_events.test
+50
-0
mysql-test/suite/multi_source/reset_slave.result
mysql-test/suite/multi_source/reset_slave.result
+31
-0
mysql-test/suite/multi_source/reset_slave.test
mysql-test/suite/multi_source/reset_slave.test
+62
-0
mysql-test/suite/multi_source/simple.result
mysql-test/suite/multi_source/simple.result
+5
-0
mysql-test/suite/multi_source/simple.test
mysql-test/suite/multi_source/simple.test
+5
-1
No files found.
mysql-test/suite/multi_source/relaylog_events.result
0 → 100644
View file @
9b03041b
change master 'master1' to
master_port=MYPORT_1,
master_host='127.0.0.1',
master_user='root';
start slave 'master1';
set default_master_connection = 'master1';
include/wait_for_slave_to_start.inc
drop table if exists t1;
create table t1 (i int) engine=MyISAM;
mysqld-relay-bin-master1.000001
mysqld-relay-bin-master1.000002
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
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
drop table t1;
stop slave;
include/wait_for_slave_to_stop.inc
reset master;
mysql-test/suite/multi_source/relaylog_events.test
0 → 100644
View file @
9b03041b
#
# Check that SHOW RELAYLOG EVENTS can be used
# for a named master connection
#
--
connect
(
slave
,
127.0
.
0.1
,
root
,,,
$SERVER_MYPORT_3
)
--
replace_result
$SERVER_MYPORT_1
MYPORT_1
eval
change
master
'master1'
to
master_port
=
$SERVER_MYPORT_1
,
master_host
=
'127.0.0.1'
,
master_user
=
'root'
;
start
slave
'master1'
;
set
default_master_connection
=
'master1'
;
--
source
include
/
wait_for_slave_to_start
.
inc
--
connect
(
master1
,
127.0
.
0.1
,
root
,,,
$SERVER_MYPORT_1
)
--
disable_warnings
drop
table
if
exists
t1
;
--
enable_warnings
create
table
t1
(
i
int
)
engine
=
MyISAM
;
--
save_master_pos
--
connection
slave
--
sync_with_master
0
,
'master1'
--
let
$datadir
=
`SELECT @@datadir`
--
list_files
$datadir
mysqld
-
relay
-
bin
-
master1
.*
--
replace_regex
/
Server
ver
:.*/
Server
version
/
show
relaylog
events
in
'mysqld-relay-bin-master1.000002'
;
--
replace_regex
/
Server
ver
:.*/
Server
version
/
show
relaylog
events
;
--
connection
master1
drop
table
t1
;
--
save_master_pos
--
connection
slave
--
sync_with_master
0
,
'master1'
stop
slave
;
--
source
include
/
wait_for_slave_to_stop
.
inc
--
disconnect
slave
--
connection
master1
reset
master
;
--
disconnect
master1
mysql-test/suite/multi_source/reset_slave.result
0 → 100644
View file @
9b03041b
change master 'master1' to
master_port=MYPORT_1,
master_host='127.0.0.1',
master_user='root';
start slave 'master1';
set default_master_connection = 'master1';
include/wait_for_slave_to_start.inc
drop table if exists t1;
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
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
mysqld-relay-bin-master1.000001
mysqld-relay-bin-master1.000002
mysqld-relay-bin.index-master1
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
127.0.0.1 root MYPORT_1 60 4 mysqld-relay-bin-master1.000001 4 No No 0 0 0 265 None 0 No NULL No 0 0 1
mysqld-relay-bin-master1.000001
mysqld-relay-bin.index-master1
reset slave 'master1' all;
show slave 'master1' status;
ERROR HY000: There is no master connection 'master1'
mysqld-relay-bin-master1.000001
mysqld-relay-bin.index-master1
drop table t1;
drop table t1;
reset master;
mysql-test/suite/multi_source/reset_slave.test
0 → 100644
View file @
9b03041b
#--enable_connect_log
--
connect
(
slave
,
127.0
.
0.1
,
root
,,,
$SERVER_MYPORT_3
)
--
replace_result
$SERVER_MYPORT_1
MYPORT_1
eval
change
master
'master1'
to
master_port
=
$SERVER_MYPORT_1
,
master_host
=
'127.0.0.1'
,
master_user
=
'root'
;
start
slave
'master1'
;
set
default_master_connection
=
'master1'
;
--
source
include
/
wait_for_slave_to_start
.
inc
--
connect
(
master1
,
127.0
.
0.1
,
root
,,,
$SERVER_MYPORT_1
)
--
disable_warnings
drop
table
if
exists
t1
;
--
enable_warnings
create
table
t1
(
i
int
)
engine
=
MyISAM
;
insert
into
t1
values
(
1
),(
2
);
--
save_master_pos
--
connection
slave
--
sync_with_master
0
,
'master1'
stop
slave
'master1'
;
--
wait_for_slave_to_stop
--
let
$datadir
=
`SELECT @@datadir`
--
replace_result
$SERVER_MYPORT_1
MYPORT_1
show
slave
'master1'
status
;
--
list_files
$datadir
mysqld
*
reset
slave
'master1'
;
--
replace_result
$SERVER_MYPORT_1
MYPORT_1
show
slave
'master1'
status
;
--
list_files
$datadir
mysqld
*
reset
slave
'master1'
all
;
--
error
WARN_NO_MASTER_INFO
show
slave
'master1'
status
;
--
list_files
$datadir
mysqld
*
# Cleanup
drop
table
t1
;
--
disconnect
slave
--
connection
master1
drop
table
t1
;
reset
master
;
--
disconnect
master1
mysql-test/suite/multi_source/simple.result
View file @
9b03041b
change master 'slave1' to master_port=MYPORT_1, master_host='127.0.0.1', master_user='root';
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';
change master 'slave2' to master_port=MYPORT_2, master_host='127.0.0.1', master_user='root';
start slave 'slave1';
start slave 'slave1';
set default_master_connection = 'slave1';
include/wait_for_slave_to_start.inc
set default_master_connection = 'slave2';
start slave 'slave2';
start slave 'slave2';
include/wait_for_slave_to_start.inc
set default_master_connection = '';
show full slave status;
show full slave status;
Connection_name 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
Connection_name 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
slave1 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
slave1 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
...
...
mysql-test/suite/multi_source/simple.test
View file @
9b03041b
...
@@ -9,8 +9,12 @@ eval change master 'slave1' to master_port=$SERVER_MYPORT_1, master_host='127.0.
...
@@ -9,8 +9,12 @@ eval change master 'slave1' to master_port=$SERVER_MYPORT_1, master_host='127.0.
--
replace_result
$SERVER_MYPORT_2
MYPORT_2
--
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'
;
eval
change
master
'slave2'
to
master_port
=
$SERVER_MYPORT_2
,
master_host
=
'127.0.0.1'
,
master_user
=
'root'
;
start
slave
'slave1'
;
start
slave
'slave1'
;
set
default_master_connection
=
'slave1'
;
--
source
include
/
wait_for_slave_to_start
.
inc
set
default_master_connection
=
'slave2'
;
start
slave
'slave2'
;
start
slave
'slave2'
;
--
sleep
5
--
source
include
/
wait_for_slave_to_start
.
inc
set
default_master_connection
=
''
;
--
replace_result
$SERVER_MYPORT_1
MYPORT_1
$SERVER_MYPORT_2
MYPORT_2
--
replace_result
$SERVER_MYPORT_1
MYPORT_1
$SERVER_MYPORT_2
MYPORT_2
show
full
slave
status
;
show
full
slave
status
;
...
...
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