Debian Codegraph @

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

raw
1 ######### mysql-test\t\table_open_cache_instances_basic.test ##################
2 # #
3 # Variable Name: table_open_cache_instances #
4 # Scope: Global #
5 # Access Type: Static #
6 # Data Type: Integer #
7 # #
8 # #
9 # Creation Date: 2012-04-25 #
10 # Author : Mikael Ronstrom #
11 # #
12 # #
13 # #
14 # Description: #
15 # Test case for static system variable table_open_cache_instances, #
16 # Checks the behavior of this variable in the following ways: #
17 # * Value Check #
18 # * Scope Check #
19 # #
20 # #
21 ###############################################################################
22
23
24 --echo ####################################################################
25 --echo # Displaying default value #
26 --echo ####################################################################
27 SELECT @@GLOBAL.table_open_cache_instances;
28
29
30 --echo ####################################################################
31 --echo # Check that value cannot be set (this variable is settable only #
32 --echo # at start-up). #
33 --echo ####################################################################
34 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
35 SET @@GLOBAL.table_open_cache_instances=1;
36
37 SELECT @@GLOBAL.table_open_cache_instances;
38
39
40 --echo #################################################################
41 --echo # Check if the value in GLOBAL Table matches value in variable #
42 --echo #################################################################
43
44 --disable_warnings
45 SELECT @@GLOBAL.table_open_cache_instances = VARIABLE_VALUE
46 FROM performance_schema.global_variables
47 WHERE VARIABLE_NAME='table_open_cache_instances';
48 --enable_warnings
49
50 SELECT @@GLOBAL.table_open_cache_instances;
51
52 --disable_warnings
53 SELECT VARIABLE_VALUE
54 FROM performance_schema.global_variables
55 WHERE VARIABLE_NAME='table_open_cache_instances';
56 --enable_warnings
57
58
59 --echo ######################################################################
60 --echo # Check if accessing variable with and without GLOBAL point to same #
61 --echo # variable #
62 --echo ######################################################################
63 SELECT @@table_open_cache_instances = @@GLOBAL.table_open_cache_instances;
64
65
66 --echo ######################################################################
67 --echo # Check if variable has only the GLOBAL scope #
68 --echo ######################################################################
69
70 SELECT @@table_open_cache_instances;
71
72 SELECT @@GLOBAL.table_open_cache_instances;
73
74 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
75 SELECT @@local.table_open_cache_instances;
76
77 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
78 SELECT @@SESSION.table_open_cache_instances;