1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

BUG#15965353- RPL.RPL_ROW_UNTIL FAILS ON PB2,

PLATFORM= MACOSX10.6 X86_64 MAX

Problem: The test was failing on pb2's mac machine because
         it was not cleaned up properly. The test checks if
         the command 'start slave until' throws a proper
         error when issued with a wrong number/type of
         parameters. After this,the replication stream was
         stopped using the include file 'rpl_end.inc'.
         The errors thrown earlier left the slave in an
         inconsistent state to be closed by the include
         file which was caught by the mac machine.

Fix: Started slave by invoking start_slave.inc to have a
     working slave before calling rpl_reset.inc

Problem: The test file was not in a good shape. It tested
         start slave until relay log file/pos combination 
         wrongly. A couple of commands were executed at 
         master and replicated at slave. Next, the 
         coordinates in terms of relay log file and pos 
         were noted down followed by reset slave and start
         slave until saved relay log file/pos. Reset slave
         deletes  all relay log files and makes the slave 
         forget its replication position. So, using the 
         saved coordiantes after reset slave is wrong.

Fix: Split the test in two parts:
     a) Test for start slave until master log file/pos and
        checking for correct errors in the failure 
        scenarios.
     b) Test for start slave until relay log file/pos.

Problem: The variables auto_increment_increment and 
         auto_increment_offset were set in the the include
         file rpl_init.inc. This was only configured for 
         some connections that are rarely used by test 
         cases, so likely that it will cause confusion. 
         If replication tests want to setup these variables
         they should do so explicitly.

Fix:
     a) Removed code to set the variables
        auto_increment_increment and auto_increment_offset
        in the include file.
     b) Updated tests files using the same.
This commit is contained in:
Shivji Kumar Jha
2013-02-17 01:42:28 +05:30
parent 7e8c887786
commit 5fcf40a2aa
6 changed files with 90 additions and 35 deletions

View File

@ -1,6 +1,18 @@
*** Set up circular replication on four servers ***
include/rpl_init.inc [topology=1->2->3->4->1]
[connection server_4]
SET auto_increment_increment= 4;
SET auto_increment_offset= 4;
[connection server_3]
SET auto_increment_increment= 4;
SET auto_increment_offset= 3;
[connection server_2]
SET auto_increment_increment= 4;
SET auto_increment_offset= 2;
[connection server_1]
SET auto_increment_increment= 4;
SET auto_increment_offset= 1;
*** Preparing data ***
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=MyISAM;
CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=InnoDB;

View File

@ -27,12 +27,6 @@ n
3
4
include/check_slave_param.inc [Exec_Master_Log_Pos]
include/wait_for_slave_sql_to_stop.inc
SELECT * FROM t2;
n
1
2
include/check_slave_param.inc [Exec_Master_Log_Pos]
START SLAVE;
include/wait_for_slave_to_start.inc
include/stop_slave.inc
@ -54,6 +48,18 @@ START SLAVE;
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS;
Warnings:
Note 1254 Slave is already running
include/stop_slave.inc
RESET SLAVE;
include/start_slave.inc
Warnings:
Note 1254 Slave is already running
include/rpl_reset.inc
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1);
include/stop_slave_sql.inc
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
include/sync_slave_io_with_master.inc
include/wait_for_slave_sql_to_stop.inc
include/assert.inc [table t1 should have two rows.]
include/start_slave.inc
DROP TABLE t1;
include/rpl_end.inc