Debian Codegraph @

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

raw
1
2 ####################################################################
3 # Displaying default value #
4 ####################################################################
5 SELECT COUNT(@@GLOBAL.innodb_adaptive_hash_index_parts);
6 --echo 1 Expected
7
8
9 ####################################################################
10 # Check if Value can set #
11 ####################################################################
12
13 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
14 SET @@GLOBAL.innodb_adaptive_hash_index_parts=1;
15 --echo Expected error 'Read only variable'
16
17 SELECT COUNT(@@GLOBAL.innodb_adaptive_hash_index_parts);
18 --echo 1 Expected
19
20
21
22
23 #################################################################
24 # Check if the value in GLOBAL Table matches value in variable #
25 #################################################################
26
27 --disable_warnings
28 SELECT @@GLOBAL.innodb_adaptive_hash_index_parts = VARIABLE_VALUE
29 FROM performance_schema.global_variables
30 WHERE VARIABLE_NAME='innodb_adaptive_hash_index_parts';
31 --echo 1 Expected
32
33 SELECT COUNT(@@GLOBAL.innodb_adaptive_hash_index_parts);
34 --echo 1 Expected
35
36 SELECT COUNT(VARIABLE_VALUE)
37 FROM performance_schema.global_variables
38 WHERE VARIABLE_NAME='innodb_adaptive_hash_index_parts';
39 --echo 1 Expected
40 --enable_warnings
41
42
43
44 ################################################################################
45 # Check if accessing variable with and without GLOBAL point to same variable #
46 ################################################################################
47 SELECT @@innodb_adaptive_hash_index_parts = @@GLOBAL.innodb_adaptive_hash_index_parts;
48 --echo 1 Expected
49
50
51
52 ################################################################################
53 # Check if innodb_adaptive_hash_index_parts can be accessed with and without @@ sign #
54 ################################################################################
55
56 SELECT COUNT(@@innodb_adaptive_hash_index_parts);
57 --echo 1 Expected
58
59 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
60 SELECT COUNT(@@local.innodb_adaptive_hash_index_parts);
61 --echo Expected error 'Variable is a GLOBAL variable'
62
63 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
64 SELECT COUNT(@@SESSION.innodb_adaptive_hash_index_parts);
65 --echo Expected error 'Variable is a GLOBAL variable'
66
67 SELECT COUNT(@@GLOBAL.innodb_adaptive_hash_index_parts);
68 --echo 1 Expected
69
70 --Error ER_BAD_FIELD_ERROR
71 SELECT innodb_adaptive_hash_index_parts;
72 --echo Expected error 'Unknown column'
73
74