Debian Codegraph @

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

raw
1
2
3 # 2010-01-25 - Added
4 #
5
6 --source include/have_innodb.inc
7
8 SET @start_global_value = @@global.innodb_adaptive_hash_index;
9
10 #
11 # exists as global only
12 #
13 --echo Valid values are 'ON' and 'OFF'
14 select @@global.innodb_adaptive_hash_index in (0, 1);
15 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
16 select @@session.innodb_adaptive_hash_index;
17 --replace_column 2 #
18 show global variables like 'innodb_adaptive_hash_index';
19 --replace_column 2 #
20 show session variables like 'innodb_adaptive_hash_index';
21 select variable_name from information_schema.global_variables where variable_name='innodb_adaptive_hash_index';
22 select variable_name from information_schema.session_variables where variable_name='innodb_adaptive_hash_index';
23
24 #
25 # show that it's writable
26 #
27 set global innodb_adaptive_hash_index='OFF';
28 select @@global.innodb_adaptive_hash_index;
29 select * from information_schema.global_variables where variable_name='innodb_adaptive_hash_index';
30 select * from information_schema.session_variables where variable_name='innodb_adaptive_hash_index';
31 set @@global.innodb_adaptive_hash_index=1;
32 select @@global.innodb_adaptive_hash_index;
33 select * from information_schema.global_variables where variable_name='innodb_adaptive_hash_index';
34 select * from information_schema.session_variables where variable_name='innodb_adaptive_hash_index';
35 set global innodb_adaptive_hash_index=0;
36 select @@global.innodb_adaptive_hash_index;
37 select * from information_schema.global_variables where variable_name='innodb_adaptive_hash_index';
38 select * from information_schema.session_variables where variable_name='innodb_adaptive_hash_index';
39 set @@global.innodb_adaptive_hash_index='ON';
40 select @@global.innodb_adaptive_hash_index;
41 select * from information_schema.global_variables where variable_name='innodb_adaptive_hash_index';
42 select * from information_schema.session_variables where variable_name='innodb_adaptive_hash_index';
43 --error ER_GLOBAL_VARIABLE
44 set session innodb_adaptive_hash_index='OFF';
45 --error ER_GLOBAL_VARIABLE
46 set @@session.innodb_adaptive_hash_index='ON';
47
48 #
49 # incorrect types
50 #
51 --error ER_WRONG_TYPE_FOR_VAR
52 set global innodb_adaptive_hash_index=1.1;
53 --error ER_WRONG_TYPE_FOR_VAR
54 set global innodb_adaptive_hash_index=1e1;
55 --error ER_WRONG_VALUE_FOR_VAR
56 set global innodb_adaptive_hash_index=2;
57 --error ER_WRONG_VALUE_FOR_VAR
58 set global innodb_adaptive_hash_index=-3;
59 select @@global.innodb_adaptive_hash_index;
60 select * from information_schema.global_variables where variable_name='innodb_adaptive_hash_index';
61 select * from information_schema.session_variables where variable_name='innodb_adaptive_hash_index';
62 --error ER_WRONG_VALUE_FOR_VAR
63 set global innodb_adaptive_hash_index='AUTO';
64
65 #
66 # Cleanup
67 #
68
69 SET @@global.innodb_adaptive_hash_index = @start_global_value;