Debian Codegraph @

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

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