blob: f6191629f91833211b3a70d01a5939d0cb959ae2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# set session
SET @start_global_value = @@global.log_disabled_statements;
#
# exists as global only
#
select @@global.log_disabled_statements;
select @@session.log_disabled_statements;
show global variables like 'log_disabled_statements';
show session variables like 'log_disabled_statements';
select * from information_schema.global_variables where variable_name='log_disabled_statements';
select * from information_schema.session_variables where variable_name='log_disabled_statements';
#
# show that it's writable
#
set global log_disabled_statements=1;
select @@global.log_disabled_statements;
set session log_disabled_statements=1;
select @@session.log_disabled_statements;
#
# all valid values
#
set session log_disabled_statements=1;
select @@session.log_disabled_statements;
set session log_disabled_statements=2;
select @@session.log_disabled_statements;
set session log_disabled_statements='slave';
select @@session.log_disabled_statements;
set session log_disabled_statements='sp';
select @@session.log_disabled_statements;
set session log_disabled_statements='slave,sp';
select @@session.log_disabled_statements;
set session log_disabled_statements='';
select @@session.log_disabled_statements;
#
# incorrect types/values
#
--error ER_WRONG_TYPE_FOR_VAR
set session log_disabled_statements=1.1;
--error ER_WRONG_TYPE_FOR_VAR
set session log_disabled_statements=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set session log_disabled_statements="foo";
--error ER_WRONG_VALUE_FOR_VAR
set session log_disabled_statements=1024;
SET @@global.log_disabled_statements = @start_global_value;
|