include/master-slave.inc Warnings: Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information. [connection master] connection slave SET @start_max_connections= @@global.max_connections; SET @start_init_replica= @@global.init_replica; SET NAMES utf8; Warnings: Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous. SET @@global.init_replica = 'SET @@global.max_connections = @@global.max_connections + 1 -- комментарий'; DROP TABLE IF EXISTS t1; CREATE TEMPORARY TABLE t1 AS SELECT @@global.init_replica AS my_column; DESCRIBE t1; Field Type Null Key Default Extra my_column text YES NULL NULL select length(my_column) from t1; length(my_column) 85 DROP TABLE t1; SELECT @@global.init_replica = 'SET @@global.max_connections = @@global.max_connections + 1 -- комментарий'; @@global.init_replica = 'SET @@global.max_connections = @@global.max_connections + 1 -- комментарий' 1 Expect 1 include/assert.inc [@@global.max_connections = @start_max_connections] STOP SLAVE; Warnings: Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead RESET MASTER; RESET SLAVE; Warnings: Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead START SLAVE; Warnings: Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead include/wait_for_slave_to_start.inc include/assert.inc [@@global.max_connections = @start_max_connections + 1] SET @@global.init_replica = "SET @a=5"; STOP SLAVE; Warnings: Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead RESET MASTER; RESET SLAVE; Warnings: Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead START SLAVE; Warnings: Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead include/wait_for_slave_to_start.inc SHOW VARIABLES LIKE 'init_replica'; Variable_name Value init_replica SET @a=5 SELECT @a; @a NULL Expect NULL SET @@global.max_connections= @start_max_connections; SET @@global.init_replica= @start_init_replica; include/rpl_end.inc