mariadb/mysql-test/t/rpl_incident.test
unknown d57f3bbbe1 Added extra parenthesis to remove compiler warning
Fixed test case rpl_incident.test (synchronize drop table, masked IO thread behaviour)


mysql-test/r/rpl_incident.result:
  Masking master_log_file since IO thread is not synchronized in rpl_incident.test
mysql-test/t/rpl_incident.test:
  Masking master_log_file since IO thread is not synchronized in rpl_incident.test
  Correcting drop of table so it is synchronized
sql/log_event.cc:
  Added extra parenthesis to remove compiler warning
2007-05-30 11:55:56 +02:00

42 lines
1.1 KiB
Text

--source include/master-slave.inc
--source include/have_debug.inc
--echo **** On Master ****
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3);
SELECT * FROM t1;
# This will generate an incident log event and store it in the binary
# log before the replace statement.
REPLACE INTO t1 VALUES (4);
--save_master_pos
SELECT * FROM t1;
connection slave;
--wait_for_slave_to_stop
# The 4 should not be inserted into the table, since the incident log
# event should have stop the slave.
--echo **** On Slave ****
SELECT * FROM t1;
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 6 # 7 # 8 # 9 # 22 # 23 # 33 #
--query_vertical SHOW SLAVE STATUS
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
--sync_with_master
# Now, we should have inserted the row into the table and the slave
# should be running. We should also have rotated to a new binary log.
SELECT * FROM t1;
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 6 # 7 # 8 # 9 # 22 # 23 # 33 #
--query_vertical SHOW SLAVE STATUS
connection master;
DROP TABLE t1;
--sync_slave_with_master