Debian Codegraph @

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

raw
1 ################## mysql-test\t\log_queries_not_using_indexes_basic.test ######
2 # #
3 # Variable Name: log_queries_not_using_indexes #
4 # Scope: Global #
5 # Access Type: Static #
6 # Data Type: #
7 # #
8 # #
9 # Creation Date: 2008-02-07 #
10 # Author : Sharique Abdullah #
11 # #
12 # Description:Test Cases of Dynamic System Variable #
13 # log_queries_not_using_indexes #
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.1/en/server-system-variables.html #
20 # #
21 ###############################################################################
22
23 SET @start_value= @@global.log_queries_not_using_indexes;
24
25 ####################################################################
26 # Valid values for boolean #
27 ####################################################################
28 SET @@global.log_queries_not_using_indexes= DEFAULT;
29 SELECT @@global.log_queries_not_using_indexes;
30
31 SET @@global.log_queries_not_using_indexes= TRUE;
32 SELECT @@global.log_queries_not_using_indexes;
33
34 SET @@global.log_queries_not_using_indexes= true;
35 SELECT @@global.log_queries_not_using_indexes;
36
37 SET @@global.log_queries_not_using_indexes= 0;
38 SELECT @@global.log_queries_not_using_indexes;
39
40 SET @@global.log_queries_not_using_indexes= 1;
41 SELECT @@global.log_queries_not_using_indexes;
42
43 SET @goodvar= TRUE;
44 SET @@global.log_queries_not_using_indexes= @goodvar;
45 SELECT @@global.log_queries_not_using_indexes;
46
47 SET GLOBAL log_queries_not_using_indexes= DEFAULT;
48 SELECT @@global.log_queries_not_using_indexes;
49
50 SET GLOBAL log_queries_not_using_indexes= ON;
51 SELECT @@global.log_queries_not_using_indexes;
52
53 SET GLOBAL log_queries_not_using_indexes= OFF;
54 SELECT @@global.log_queries_not_using_indexes;
55
56 SET GLOBAL log_queries_not_using_indexes= -0;
57 SELECT @@global.log_queries_not_using_indexes;
58
59 --error ER_WRONG_TYPE_FOR_VAR
60 SET GLOBAL log_queries_not_using_indexes= 0.00;
61
62 SET GLOBAL log_queries_not_using_indexes= +0;
63 SELECT @@global.log_queries_not_using_indexes;
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_queries_not_using_indexes= 'DEFAULT';
71
72 --error ER_WRONG_VALUE_FOR_VAR
73 SET @@global.log_queries_not_using_indexes= 'true';
74
75 --error ER_WRONG_VALUE_FOR_VAR
76 SET @@global.log_queries_not_using_indexes= BLABLA;
77
78 --error ER_WRONG_VALUE_FOR_VAR
79 SET @@global.log_queries_not_using_indexes= 25;
80
81 --error ER_WRONG_VALUE_FOR_VAR
82 SET GLOBAL log_queries_not_using_indexes= -1;
83
84 SET @badvar= 'true';
85 --error ER_WRONG_VALUE_FOR_VAR
86 SET @@global.log_queries_not_using_indexes= @badvar;
87
88 --error ER_WRONG_VALUE_FOR_VAR
89 SET GLOBAL log_queries_not_using_indexes= 'DEFAULT';
90
91 --error ER_GLOBAL_VARIABLE
92 SET log_queries_not_using_indexes= TRUE;
93
94 --error ER_GLOBAL_VARIABLE
95 SET SESSION log_queries_not_using_indexes= TRUE;
96
97 --error ER_GLOBAL_VARIABLE
98 SET @@session.log_queries_not_using_indexes= TRUE;
99
100 --error ER_GLOBAL_VARIABLE
101 SET LOCAL log_queries_not_using_indexes= TRUE;
102
103 --error ER_PARSE_ERROR
104 SET @@global log_queries_not_using_indexes= TRUE;
105
106 --error ER_PARSE_ERROR
107 SET @@SESSION log_queries_not_using_indexes= TRUE;
108
109 SET @@global.log_queries_not_using_indexes= @start_value;
110