Debian Codegraph @

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

raw
1
2
3 ################## mysql-test\t\innodb_buffer_pool_instances_basic.test #######
4 # #
5 # Variable Name: innodb_buffer_pool_instances #
6 # Scope: Global #
7 # Access Type: Static #
8 # Data Type: numeric #
9 # #
10 # #
11 # Creation Date: 2008-02-07 #
12 # Author : Sharique Abdullah #
13 # #
14 # #
15 # Description:Test Cases of Dynamic System Variable #
16 # innodb_buffer_pool_instances #
17 # that checks the behavior of this variable in the following ways #
18 # * Value Check #
19 # * Scope Check #
20 # #
21 # Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
22 # server-system-variables.html #
23 # #
24 ###############################################################################
25
26
27 --echo '#---------------------BS_STVARS_035_01----------------------#'
28 ####################################################################
29 # Displaying default value #
30 ####################################################################
31 SELECT COUNT(@@GLOBAL.innodb_buffer_pool_instances);
32 --echo 1 Expected
33
34
35 --echo '#---------------------BS_STVARS_035_02----------------------#'
36 ####################################################################
37 # Check if Value can set #
38 ####################################################################
39
40 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
41 SET @@GLOBAL.innodb_buffer_pool_instances=1;
42 --echo Expected error 'Read only variable'
43
44 SELECT COUNT(@@GLOBAL.innodb_buffer_pool_instances);
45 --echo 1 Expected
46
47
48
49
50 --echo '#---------------------BS_STVARS_035_03----------------------#'
51 #################################################################
52 # Check if the value in GLOBAL Table matches value in variable #
53 #################################################################
54
55 --disable_warnings
56 SELECT @@GLOBAL.innodb_buffer_pool_instances = VARIABLE_VALUE
57 FROM performance_schema.global_variables
58 WHERE VARIABLE_NAME='innodb_buffer_pool_instances';
59 --enable_warnings
60 --echo 1 Expected
61
62 SELECT COUNT(@@GLOBAL.innodb_buffer_pool_instances);
63 --echo 1 Expected
64
65 --disable_warnings
66 SELECT COUNT(VARIABLE_VALUE)
67 FROM performance_schema.global_variables
68 WHERE VARIABLE_NAME='innodb_buffer_pool_instances';
69 --enable_warnings
70 --echo 1 Expected
71
72
73
74 --echo '#---------------------BS_STVARS_035_04----------------------#'
75 ################################################################################
76 # Check if accessing variable with and without GLOBAL point to same variable #
77 ################################################################################
78 SELECT @@innodb_buffer_pool_instances = @@GLOBAL.innodb_buffer_pool_instances;
79 --echo 1 Expected
80
81
82
83 --echo '#---------------------BS_STVARS_035_05----------------------#'
84 ################################################################################
85 # Check if innodb_buffer_pool_instances can be accessed with and without @@ sign #
86 ################################################################################
87
88 SELECT COUNT(@@innodb_buffer_pool_instances);
89 --echo 1 Expected
90
91 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
92 SELECT COUNT(@@local.innodb_buffer_pool_instances);
93 --echo Expected error 'Variable is a GLOBAL variable'
94
95 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
96 SELECT COUNT(@@SESSION.innodb_buffer_pool_instances);
97 --echo Expected error 'Variable is a GLOBAL variable'
98
99 SELECT COUNT(@@GLOBAL.innodb_buffer_pool_instances);
100 --echo 1 Expected
101
102 --Error ER_BAD_FIELD_ERROR
103 SELECT innodb_buffer_pool_instances;
104 --echo Expected error 'Unknown column'
105
106