1include/master-slave.inc
2Warnings:
3Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
4Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
5[connection master]
6CREATE TABLE t1(a INT);
7DROP TABLE t1;
8connection slave
9include/sync_slave_sql_with_master.inc
10SET @start_max_connections= @@global.max_connections;
11SET @start_init_slave= @@global.init_slave;
12SET NAMES utf8;
13SET @@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1 -- комментарий';
14DROP TABLE IF EXISTS t1;
15CREATE TEMPORARY TABLE t1 AS SELECT @@global.init_slave AS my_column;
16DESCRIBE t1;
17Field	Type	Null	Key	Default	Extra
18my_column	varchar(74)	YES		NULL
19select length(my_column) from t1;
20length(my_column)
2185
22DROP TABLE t1;
23SELECT @@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1 -- комментарий';
24@@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1 -- комментарий'
251
26Expect 1
27include/assert.inc [@@global.max_connections = @start_max_connections]
28include/restart_slave.inc
29include/assert.inc [@@global.max_connections = @start_max_connections + 1]
30SET @@global.init_slave = "SET @a=5";
31include/restart_slave.inc
32SHOW VARIABLES LIKE 'init_slave';
33Variable_name	Value
34init_slave	SET @a=5
35SELECT @a;
36@a
37NULL
38Expect NULL
39SET @@global.max_connections= @start_max_connections;
40SET @@global.init_slave= @start_init_slave;
41include/rpl_end.inc
42