Debian Codegraph @

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

raw
1 ################## mysql-test\t\log_slow_admin_statements_basic.test ######
2 # #
3 # Variable Name: log_slow_admin_statements #
4 # Scope: Global #
5 # Access Type: Static #
6 # Data Type: #
7 # #
8 # #
9 # Creation Date: 2013-02-05 #
10 # Author : Mark Leith #
11 # #
12 # Description:Test Cases of Dynamic System Variable #
13 # log_slow_admin_statements #
14 # that checks the behavior of this variable in the following ways #
15 # * Value Check #
16 # * Scope Check #
17 # #
18 # Reference: #
19 # http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html #
20 # #
21 ###############################################################################
22
23 SET @start_value= @@global.log_slow_admin_statements;
24
25 ####################################################################
26 # Valid values for boolean #
27 ####################################################################
28 SET @@global.log_slow_admin_statements= DEFAULT;
29 SELECT @@global.log_slow_admin_statements;
30
31 SET @@global.log_slow_admin_statements= TRUE;
32 SELECT @@global.log_slow_admin_statements;
33
34 SET @@global.log_slow_admin_statements= true;
35 SELECT @@global.log_slow_admin_statements;
36
37 SET @@global.log_slow_admin_statements= 0;
38 SELECT @@global.log_slow_admin_statements;
39
40 SET @@global.log_slow_admin_statements= 1;
41 SELECT @@global.log_slow_admin_statements;
42
43 SET @goodvar= TRUE;
44 SET @@global.log_slow_admin_statements= @goodvar;
45 SELECT @@global.log_slow_admin_statements;
46
47 SET GLOBAL log_slow_admin_statements= DEFAULT;
48 SELECT @@global.log_slow_admin_statements;
49
50 SET GLOBAL log_slow_admin_statements= ON;
51 SELECT @@global.log_slow_admin_statements;
52
53 SET GLOBAL log_slow_admin_statements= OFF;
54 SELECT @@global.log_slow_admin_statements;
55
56 SET GLOBAL log_slow_admin_statements= -0;
57 SELECT @@global.log_slow_admin_statements;
58
59 --error ER_WRONG_TYPE_FOR_VAR
60 SET GLOBAL log_slow_admin_statements= 0.00;
61
62 SET GLOBAL log_slow_admin_statements= +0;
63 SELECT @@global.log_slow_admin_statements;
64
65 #################################################################
66 # Check if the value in GLOBAL Table matches value in variable #
67 #################################################################
68
69 --error ER_WRONG_VALUE_FOR_VAR
70 SET @@global.log_slow_admin_statements= 'DEFAULT';
71
72 --error ER_WRONG_VALUE_FOR_VAR
73 SET @@global.log_slow_admin_statements= 'true';
74
75 --error ER_WRONG_VALUE_FOR_VAR
76 SET @@global.log_slow_admin_statements= BLABLA;
77
78 --error ER_WRONG_VALUE_FOR_VAR
79 SET @@global.log_slow_admin_statements= 25;
80
81 --error ER_WRONG_VALUE_FOR_VAR
82 SET GLOBAL log_slow_admin_statements= -1;
83
84 SET @badvar= 'true';
85 --error ER_WRONG_VALUE_FOR_VAR
86 SET @@global.log_slow_admin_statements= @badvar;
87
88 --error ER_WRONG_VALUE_FOR_VAR
89 SET GLOBAL log_slow_admin_statements= 'DEFAULT';
90
91 --error ER_GLOBAL_VARIABLE
92 SET log_slow_admin_statements= TRUE;
93
94 --error ER_GLOBAL_VARIABLE
95 SET SESSION log_slow_admin_statements= TRUE;
96
97 --error ER_GLOBAL_VARIABLE
98 SET @@session.log_slow_admin_statements= TRUE;
99
100 --error ER_GLOBAL_VARIABLE
101 SET LOCAL log_slow_admin_statements= TRUE;
102
103 --error ER_PARSE_ERROR
104 SET @@global log_slow_admin_statements= TRUE;
105
106 --error ER_PARSE_ERROR
107 SET @@SESSION log_slow_admin_statements= TRUE;
108
109 SET @@global.log_slow_admin_statements= @start_value;
110