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