1include/master-slave.inc
2[connection master]
3include/sync_slave_sql_with_master.inc
4SET @start_max_connections= @@global.max_connections;
5SET @start_init_slave= @@global.init_slave;
6SET NAMES utf8;
7SET @@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1 -- комментарий';
8DROP TABLE IF EXISTS t1;
9CREATE TEMPORARY TABLE t1 AS SELECT @@global.init_slave AS my_column;
10DESCRIBE t1;
11Field	Type	Null	Key	Default	Extra
12my_column	varchar(74)	YES		NULL
13select length(my_column) from t1;
14length(my_column)
1585
16DROP TABLE t1;
17SELECT @@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1 -- комментарий';
18@@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1 -- комментарий'
191
20Expect 1
21include/assert.inc [@@global.max_connections = @start_max_connections]
22include/restart_slave.inc
23connection master;
24include/sync_slave_sql_with_master.inc
25include/assert.inc [@@global.max_connections = @start_max_connections + 1]
26SET @@global.init_slave = "SET @a=5";
27include/restart_slave.inc
28SHOW VARIABLES LIKE 'init_slave';
29Variable_name	Value
30init_slave	SET @a=5
31SELECT @a;
32@a
33NULL
34Expect NULL
35SET @@global.max_connections= @start_max_connections;
36SET @@global.init_slave= @start_init_slave;
37include/rpl_end.inc
38