mariadb/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test
Luis Soares ea6cb65089 BUG#44661: rpl_ndb.rpl_ndb_circular_simplex fails because of
failure to cleanup of table

The test case was not dropping a table before exiting (ie, it was
not cleaning itself after execution). In this case, the warning
message stating that the test did not do a proper cleanup was
deterministic (which can be annoying).

I have found other tests cases on which mtr sporadically reports
that they have not cleaned up after execution:

 - rpl_ndb_circular
 - rpl_failed_optimize

In this case, the master was dropping a table but there was no
synchronization between the slave and the master.

This patch addresses the rpl_ndb_circular_simplex case by adding
the missing DROP table. The other cases are fixed by deploying
the missing sync_slave_with_master instruction.
2009-09-27 23:03:05 +01:00

61 lines
1.6 KiB
Text

--source include/have_ndb.inc
--source include/ndb_master-slave.inc
# set up circular replication
--connection slave
RESET MASTER;
--connection master
--replace_result $SLAVE_MYPORT SLAVE_PORT
--eval CHANGE MASTER TO master_host="127.0.0.1",master_port=$SLAVE_MYPORT,master_user="root"
START SLAVE;
# create the table on the "slave"
--connection slave
CREATE TABLE t1 (a int key, b int) ENGINE=ndb;
#CREATE TABLE t2 (a int key, b int) ENGINE=ndb;
--save_master_pos
--connection master
--sync_with_master
# now we should have a table on the master as well
SHOW TABLES;
# insert some values on the slave and master
--connection master
INSERT INTO t1 VALUES (1,2);
--connection slave
INSERT INTO t1 VALUES (2,3);
# ensure data has propagated both ways
--connection slave
--save_master_pos
--connection master
--sync_with_master
--sync_slave_with_master
# connect to slave and ensure data it there.
--connection slave
SELECT * FROM t1 ORDER BY a;
#SELECT * FROM t2 ORDER BY a;
# BUG#34654 Last_IO_Errno is not reset - Mask columns 35 and 36
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
--query_vertical show slave status;
# connect to master and ensure data it there.
--connection master
SELECT * FROM t1 ORDER BY a;
#SELECT * FROM t2 ORDER BY a;
# BUG#34654 Last_IO_Errno is not reset - Mask columns 35 and 36
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
--query_vertical show slave status;
# stop replication on "master" as not to replicate
# shutdown circularly, eg drop table
--connection master
STOP SLAVE;
# cleanup
--connection master
DROP TABLE t1;
-- sync_slave_with_master