Debian Codegraph @

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

raw
1 ################## mysql-test/t/innodb_temp_tablespaces_dir_basic.test ##############
2 # #
3 # Variable Name: innodb_temp_tablespaces_dir #
4 # Scope: Global #
5 # Access Type: Static #
6 # Data Type: string #
7 # #
8 # #
9 # Creation Date: 2018-02-09 #
10 # Author : Satya Bodapati
11 # #
12 # #
13 # Description: Read-only config global variable innodb_temp_tablespaces_dir #
14 # * Value check #
15 # * Scope check #
16 # #
17 ###############################################################################
18
19
20 ####################################################################
21 # Display the default value #
22 ####################################################################
23 SELECT COUNT(@@GLOBAL.innodb_temp_tablespaces_dir);
24 --echo 1 Expected
25
26
27 ####################################################################
28 # Check if Value can set Dynamically #
29 ####################################################################
30
31 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
32 SET @@GLOBAL.innodb_temp_tablespaces_dir="/tmp";
33 --echo Expected error 'Read only variable'
34
35 SELECT COUNT(@@GLOBAL.innodb_temp_tablespaces_dir);
36 --echo 1 Expected
37
38
39 ################################################################################
40 # Check if the value in GLOBAL table matches value in variable #
41 ################################################################################
42
43 --disable_warnings
44 SELECT @@GLOBAL.innodb_temp_tablespaces_dir = VARIABLE_VALUE
45 FROM performance_schema.global_variables
46 WHERE VARIABLE_NAME='innodb_temp_tablespaces_dir';
47 --enable_warnings
48 --echo 1 Expected
49
50 SELECT COUNT(@@GLOBAL.innodb_temp_tablespaces_dir);
51 --echo 1 Expected
52
53 --disable_warnings
54 SELECT COUNT(VARIABLE_VALUE)
55 FROM performance_schema.global_variables
56 WHERE VARIABLE_NAME='innodb_temp_tablespaces_dir';
57 --enable_warnings
58 --echo 1 Expected
59
60
61 ################################################################################
62 # Check if accessing variable with and without GLOBAL point to same variable #
63 ################################################################################
64 SELECT @@innodb_temp_tablespaces_dir = @@GLOBAL.innodb_temp_tablespaces_dir;
65 --echo 1 Expected
66
67 ##########################################################################
68 # Check if the value in SESSION Table matches value in variable #
69 ##########################################################################
70
71 --disable_warnings
72 SELECT @@innodb_temp_tablespaces_dir = VARIABLE_VALUE
73 FROM performance_schema.session_variables
74 WHERE VARIABLE_NAME='innodb_temp_tablespaces_dir';
75 --enable_warnings
76 --echo 1 Expected
77
78 ####################################################################################################
79 # Check if variable is an non-persistent variable #
80 ####################################################################################################
81 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
82 SET PERSIST_ONLY innodb_temp_tablespaces_dir = "/tmp";
83 --echo Expected error 'Non persistent read only variable'
84
85 ###################################################################################
86 # Check if innodb_temp_tablespaces_dir can be accessed with and without @@ sign #
87 ###################################################################################
88
89 SELECT COUNT(@@innodb_temp_tablespaces_dir);
90 --echo 1 Expected
91
92 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
93 SELECT COUNT(@@local.innodb_temp_tablespaces_dir);
94 --echo Expected error 'Variable is a GLOBAL variable'
95
96 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
97 SELECT COUNT(@@SESSION.innodb_temp_tablespaces_dir);
98 --echo Expected error 'Variable is a GLOBAL variable'
99
100 SELECT COUNT(@@GLOBAL.innodb_temp_tablespaces_dir);
101 --echo 1 Expected
102
103 --Error ER_BAD_FIELD_ERROR
104 SELECT innodb_temp_tablespaces_dir;
105 --echo Expected error 'Unknown column'
106
107 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
108 SET innodb_temp_tablespaces_dir = "/tmp";
109 --echo Expected error 'Read only variable'
110
111 --Error ER_PARSE_ERROR
112 SET local.innodb_temp_tablespaces_dir = 1;
113 --echo Expected error 'Parse error'
114
115 --Error ER_UNKNOWN_TABLE
116 SELECT local.innodb_temp_tablespaces_dir;
117 --echo Expected error 'Unknown table local in field list'
118
119 --Error ER_PARSE_ERROR
120 SET global.innodb_temp_tablespaces_dir = 1;
121 --echo Expected error 'Parse error'
122
123 --Error ER_UNKNOWN_TABLE
124 SELECT global.innodb_temp_tablespaces_dir;
125 --echo Expected error 'Unknown table global in field list'
126
127 --Error ER_BAD_FIELD_ERROR
128 SELECT innodb_temp_tablespaces_dir;
129
130 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
131 SELECT @@session.innodb_temp_tablespaces_dir;
132
133 --Error ER_BAD_FIELD_ERROR
134 SELECT innodb_temp_tablespaces_dir;
135 --echo Expected error 'Unknown column innodb_temp_tablespaces_dir in field list'