Debian Codegraph @

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

raw
1 ####################################################################
2 # Displaying default value #
3 ####################################################################
4 SELECT COUNT(@@GLOBAL.version_compile_zlib);
5
6 ####################################################################
7 # Check if Value can set #
8 ####################################################################
9 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
10 SET @@GLOBAL.version_compile_zlib=1;
11
12 #################################################################
13 # Check if the value in GLOBAL Table matches value in variable #
14 #################################################################
15
16 --disable_warnings
17 SELECT @@GLOBAL.version_compile_zlib = VARIABLE_VALUE
18 FROM performance_schema.global_variables
19 WHERE VARIABLE_NAME='version_compile_zlib';
20 --enable_warnings
21
22 --disable_warnings
23 SELECT COUNT(VARIABLE_VALUE)
24 FROM performance_schema.global_variables
25 WHERE VARIABLE_NAME='version_compile_zlib';
26 --enable_warnings
27
28 ################################################################################
29 # Check if accessing variable with and without GLOBAL point to same variable #
30 ################################################################################
31 SELECT @@version_compile_zlib = @@GLOBAL.version_compile_zlib;
32
33
34 ################################################################################
35 # Check if version_compile_zlib can be accessed with and without @@ sign #
36 ################################################################################
37 SELECT COUNT(@@version_compile_zlib);
38
39 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
40 SELECT COUNT(@@local.version_compile_zlib);
41
42 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
43 SELECT COUNT(@@SESSION.version_compile_zlib);
44
45 SELECT COUNT(@@GLOBAL.version_compile_zlib);
46
47 --Error ER_BAD_FIELD_ERROR
48 SELECT version_compile_zlib;
49
50