Debian Codegraph @

mysql-test/suite/sys_vars/t/sync_relay_log_basic.test

raw
1 --source include/not_embedded.inc
2
3 SET @start_global_value = @@global.sync_relay_log;
4 SELECT @start_global_value;
5
6 #
7 # exists as global only
8 #
9 select @@global.sync_relay_log;
10 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
11 select @@session.sync_relay_log;
12 show global variables like 'sync_relay_log';
13 show session variables like 'sync_relay_log';
14 select * from information_schema.global_variables where variable_name='sync_relay_log';
15 select * from information_schema.session_variables where variable_name='sync_relay_log';
16
17 #
18 # show that it's writable
19 #
20 set global sync_relay_log=1;
21 select @@global.sync_relay_log;
22 --error ER_GLOBAL_VARIABLE
23 set session sync_relay_log=1;
24
25 #
26 # incorrect types
27 #
28 --error ER_WRONG_TYPE_FOR_VAR
29 set global sync_relay_log=1.1;
30 --error ER_WRONG_TYPE_FOR_VAR
31 set global sync_relay_log=1e1;
32 --error ER_WRONG_TYPE_FOR_VAR
33 set global sync_relay_log="foo";
34
35 #
36 # min/max values
37 #
38 set global sync_relay_log=0;
39 select @@global.sync_relay_log;
40 set global sync_relay_log=cast(-1 as unsigned int);
41 select @@global.sync_relay_log;
42
43 SET @@global.sync_relay_log = @start_global_value;
44 SELECT @@global.sync_relay_log;