Commit c38ddd97 authored by Astha Pareek's avatar Astha Pareek

BUG#16295518 - SYS_VARS.RPL_INIT_SLAVE_FUNC IS FAILING ON MYSQL-5.1

BUG#12535301- SYS_VARS.RPL_INIT_SLAVE_FUNC MISMATCHES IN DAILY-5.5 

Problem:
sys_vars.rpl_init_slave_func test was not recorded after
the last edit. It was disabled on 5.1 after seeing failures
due to the above reason.
No old failures as this suite never ran with pb2 on 5.1

Fix:
Added assert condition after wait for checks.
Recorded test and enabled it.
parent 30a37ca9
stop slave; include/master-slave.inc
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; [connection master]
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
connection slave connection slave
SET @start_max_connections= @@global.max_connections; SET @start_max_connections= @@global.max_connections;
SET @start_init_slave= @@global.init_slave; SET @start_init_slave= @@global.init_slave;
...@@ -18,23 +14,19 @@ SELECT @@global.init_slave = 'SET @@global.max_connections = @@global.max_connec ...@@ -18,23 +14,19 @@ SELECT @@global.init_slave = 'SET @@global.max_connections = @@global.max_connec
@@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1' @@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1'
1 1
Expect 1 Expect 1
SELECT @@global.max_connections= @start_max_connections; include/assert.inc [@@global.max_connections = @start_max_connections]
@@global.max_connections= @start_max_connections
1
Expect 1
STOP SLAVE; STOP SLAVE;
RESET MASTER; RESET MASTER;
RESET SLAVE; RESET SLAVE;
START SLAVE; START SLAVE;
SELECT @@global.max_connections = @start_max_connections + 1; include/wait_for_slave_to_start.inc
@@global.max_connections = @start_max_connections + 1 include/assert.inc [@@global.max_connections = @start_max_connections + 1]
1
Expect 1
SET @@global.init_slave = "SET @a=5"; SET @@global.init_slave = "SET @a=5";
STOP SLAVE; STOP SLAVE;
RESET MASTER; RESET MASTER;
RESET SLAVE; RESET SLAVE;
START SLAVE; START SLAVE;
include/wait_for_slave_to_start.inc
SHOW VARIABLES LIKE 'init_slave'; SHOW VARIABLES LIKE 'init_slave';
Variable_name Value Variable_name Value
init_slave SET @a=5 init_slave SET @a=5
...@@ -44,3 +36,4 @@ NULL ...@@ -44,3 +36,4 @@ NULL
Expect NULL Expect NULL
SET @@global.max_connections= @start_max_connections; SET @@global.max_connections= @start_max_connections;
SET @@global.init_slave= @start_init_slave; SET @@global.init_slave= @start_init_slave;
include/rpl_end.inc
...@@ -20,4 +20,3 @@ sys_vars.identity_basic : bug#16295418 2013-02-09 veduggir ...@@ -20,4 +20,3 @@ sys_vars.identity_basic : bug#16295418 2013-02-09 veduggir
sys_vars.key_buffer_size_basic_64 : bug#16295418 2013-02-09 veduggir sys_vars.key_buffer_size_basic_64 : bug#16295418 2013-02-09 veduggir
sys_vars.key_buffer_size_func : bug#16295418 2013-02-09 veduggir sys_vars.key_buffer_size_func : bug#16295418 2013-02-09 veduggir
sys_vars.timestamp_basic_64 : bug#16295457 2013-02-09 veduggir sys_vars.timestamp_basic_64 : bug#16295457 2013-02-09 veduggir
sys_vars.rpl_init_slave_func : bug#16295518 2013-02-09 veduggir
...@@ -59,8 +59,9 @@ let $wait_timeout= 240; ...@@ -59,8 +59,9 @@ let $wait_timeout= 240;
let $wait_condition= SELECT @@global.max_connections = @start_max_connections; let $wait_condition= SELECT @@global.max_connections = @start_max_connections;
--source include/wait_condition_sp.inc --source include/wait_condition_sp.inc
# check that the action in init_slave does not happen immediately # check that the action in init_slave does not happen immediately
SELECT @@global.max_connections= @start_max_connections; --let $assert_text= @@global.max_connections = @start_max_connections
--echo Expect 1 --let $assert_cond= @@global.max_connections = @start_max_connections
--source include/assert.inc
# #
# reset of the server # reset of the server
STOP SLAVE; STOP SLAVE;
...@@ -75,8 +76,9 @@ let $wait_timeout= 90; ...@@ -75,8 +76,9 @@ let $wait_timeout= 90;
let $wait_condition= SELECT @@global.max_connections = @start_max_connections + 1; let $wait_condition= SELECT @@global.max_connections = @start_max_connections + 1;
--source include/wait_condition_sp.inc --source include/wait_condition_sp.inc
# check that the action in init_slave was executed and had the intended effect # check that the action in init_slave was executed and had the intended effect
SELECT @@global.max_connections = @start_max_connections + 1; --let $assert_text= @@global.max_connections = @start_max_connections + 1
--echo Expect 1 --let $assert_cond= @@global.max_connections = @start_max_connections + 1
--source include/assert.inc
# #
# Setting a variable(which is local to a session) and must not be visible # Setting a variable(which is local to a session) and must not be visible
SET @@global.init_slave = "SET @a=5"; SET @@global.init_slave = "SET @a=5";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment