mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 14:32:34 +01:00
87a5e68634
This is backport for next-mr. The patch adds new test cases that cover replication heartbeat testing.
55 lines
1.5 KiB
Text
55 lines
1.5 KiB
Text
stop slave;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
reset master;
|
|
reset slave;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
start slave;
|
|
|
|
*** Preparing ***
|
|
[on slave]
|
|
include/stop_slave.inc
|
|
RESET SLAVE;
|
|
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1, MASTER_LOG_FILE='MASTER_BINLOG';
|
|
include/start_slave.inc
|
|
[on slave1]
|
|
STOP SLAVE;
|
|
RESET SLAVE;
|
|
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='MASTER_BINLOG';
|
|
include/start_slave.inc
|
|
|
|
*** 2 slaves ***
|
|
Slave has received heartbeat event
|
|
Slave1 has received heartbeat event
|
|
Slave has received more heartbeats than Slave1 (1 means 'yes'): 1
|
|
|
|
*** Master->data->Slave1->heartbeat->Slave: ***
|
|
[on slave1]
|
|
RESET MASTER;
|
|
[on slave]
|
|
include/stop_slave.inc
|
|
RESET SLAVE;
|
|
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=SLAVE1_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.2, MASTER_LOG_FILE='SLAVE1_BINLOG';
|
|
include/start_slave.inc
|
|
Slave has received heartbeat event
|
|
[on master]
|
|
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10), c LONGTEXT);
|
|
INSERT INTO t1 VALUES (1, 'on master', '');
|
|
SHOW TABLES;
|
|
Tables_in_test
|
|
t1
|
|
[on slave1]
|
|
SHOW TABLES;
|
|
Tables_in_test
|
|
t1
|
|
[on slave]
|
|
SHOW TABLES;
|
|
Tables_in_test
|
|
[on master]
|
|
creating updates on master and send to slave1 during 5 second
|
|
[on slave]
|
|
Slave has received heartbeats (1 means 'yes'): 1
|
|
|
|
*** Clean up ***
|
|
DROP TABLE t1;
|
|
|
|
End of 6.0 test
|