1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Fixed test for 'init_slave' variable

This commit is contained in:
gluh@gluh.mysql.r18.ru
2003-12-08 12:10:30 +04:00
parent a09d6409ae
commit 38a4780fd1
3 changed files with 18 additions and 17 deletions

View File

@ -4,20 +4,21 @@ reset master;
reset slave; reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave; start slave;
show variables like 'init_slave';
Variable_name Value
init_slave set global max_connections=500
show variables like 'max_connections';
Variable_name Value
max_connections 500
reset master; reset master;
create table t1(n int); show variables like 'init_slave';
insert into t1 values (@a), (@b); Variable_name Value
select * from t1; init_slave
n show variables like 'max_connections';
NULL Variable_name Value
NULL max_connections 100
select * from t1;
n
1
2
set global init_connect="set @c=1"; set global init_connect="set @c=1";
show variables like 'init_connect'; show variables like 'init_connect';
Variable_name Value Variable_name Value
init_connect set @c=1 init_connect set @c=1
drop table t1;
stop slave; stop slave;

View File

@ -1 +1 @@
--init-slave="set @a=1;set @b=2" --init-slave="set global max_connections=500"

View File

@ -6,20 +6,20 @@ source include/master-slave.inc;
save_master_pos; save_master_pos;
connection slave; connection slave;
sleep 1;
show variables like 'init_slave';
show variables like 'max_connections';
sync_with_master; sync_with_master;
reset master; reset master;
connection master; connection master;
create table t1(n int); show variables like 'init_slave';
insert into t1 values (@a), (@b); show variables like 'max_connections';
select * from t1;
save_master_pos; save_master_pos;
connection slave; connection slave;
sync_with_master; sync_with_master;
select * from t1;
set global init_connect="set @c=1"; set global init_connect="set @c=1";
show variables like 'init_connect'; show variables like 'init_connect';
connection master; connection master;
drop table t1;
save_master_pos; save_master_pos;
connection slave; connection slave;
sync_with_master; sync_with_master;