blob: 9f1cf6351a0d01741abd25f893c1a31bf1d87fbd (
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# set session
SET @start_global_value = @@global.log_slow_verbosity;
select @@global.log_slow_verbosity = @@session.log_slow_verbosity;
SET @@global.log_slow_verbosity="",@@session.log_slow_verbosity="";
#
# exists as global only
#
show global variables like 'log_slow_verbosity';
show session variables like 'log_slow_verbosity';
select * from information_schema.global_variables where variable_name='log_slow_verbosity';
select * from information_schema.session_variables where variable_name='log_slow_verbosity';
#
# show that it's writable
#
set global log_slow_verbosity=1;
select @@global.log_slow_verbosity;
set session log_slow_verbosity=1;
select @@session.log_slow_verbosity;
#
# all valid values
#
set session log_slow_verbosity=1;
select @@session.log_slow_verbosity;
set session log_slow_verbosity=2;
select @@session.log_slow_verbosity;
set session log_slow_verbosity=3;
select @@session.log_slow_verbosity;
set session log_slow_verbosity=4;
select @@session.log_slow_verbosity;
set session log_slow_verbosity=5;
select @@session.log_slow_verbosity;
set session log_slow_verbosity=6;
select @@session.log_slow_verbosity;
set session log_slow_verbosity=7;
select @@session.log_slow_verbosity;
set session log_slow_verbosity='innodb';
select @@session.log_slow_verbosity;
set session log_slow_verbosity='query_plan';
select @@session.log_slow_verbosity;
set session log_slow_verbosity='innodb,query_plan';
select @@session.log_slow_verbosity;
set session log_slow_verbosity='explain';
select @@session.log_slow_verbosity;
set session log_slow_verbosity='innodb,query_plan,explain';
select @@session.log_slow_verbosity;
set session log_slow_verbosity='';
select @@session.log_slow_verbosity;
#
# incorrect types/values
#
--error ER_WRONG_TYPE_FOR_VAR
set session log_slow_verbosity=1.1;
--error ER_WRONG_TYPE_FOR_VAR
set session log_slow_verbosity=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set session log_slow_verbosity="foo";
--error ER_WRONG_VALUE_FOR_VAR
set session log_slow_verbosity=8;
SET @@global.log_slow_verbosity = @start_global_value;
|