Debian Codegraph @

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

raw
1
2
3 # 2010-01-27 - Added
4 #
5
6 --source include/have_innodb.inc
7
8 SET @start_global_value = @@global.innodb_read_ahead_threshold;
9 SELECT @start_global_value;
10
11 #
12 # exists as global only
13 #
14 --echo Valid values are between 0 and 64
15 select @@global.innodb_read_ahead_threshold between 0 and 64;
16 select @@global.innodb_read_ahead_threshold;
17 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
18 select @@session.innodb_read_ahead_threshold;
19 show global variables like 'innodb_read_ahead_threshold';
20 show session variables like 'innodb_read_ahead_threshold';
21 --disable_warnings
22 select * from information_schema.global_variables where variable_name='innodb_read_ahead_threshold';
23 select * from information_schema.session_variables where variable_name='innodb_read_ahead_threshold';
24 --enable_warnings
25
26 #
27 # show that it's writable
28 #
29 set global innodb_read_ahead_threshold=10;
30 select @@global.innodb_read_ahead_threshold;
31 --disable_warnings
32 select * from information_schema.global_variables where variable_name='innodb_read_ahead_threshold';
33 select * from information_schema.session_variables where variable_name='innodb_read_ahead_threshold';
34 --enable_warnings
35 --error ER_GLOBAL_VARIABLE
36 set session innodb_read_ahead_threshold=1;
37 #
38 # check the default value
39 #
40 set global innodb_read_ahead_threshold=DEFAULT;
41 select @@global.innodb_read_ahead_threshold;
42
43 #
44 # incorrect types
45 #
46 --error ER_WRONG_TYPE_FOR_VAR
47 set global innodb_read_ahead_threshold=1.1;
48 --error ER_WRONG_TYPE_FOR_VAR
49 set global innodb_read_ahead_threshold=1e1;
50 --error ER_WRONG_TYPE_FOR_VAR
51 set global innodb_read_ahead_threshold="foo";
52 --error ER_WRONG_TYPE_FOR_VAR
53 set global innodb_read_ahead_threshold=' ';
54 select @@global.innodb_read_ahead_threshold;
55 --error ER_WRONG_TYPE_FOR_VAR
56 set global innodb_read_ahead_threshold=" ";
57 select @@global.innodb_read_ahead_threshold;
58
59 set global innodb_read_ahead_threshold=-7;
60 select @@global.innodb_read_ahead_threshold;
61 --disable_warnings
62 select * from information_schema.global_variables where variable_name='innodb_read_ahead_threshold';
63 --enable_warnings
64 set global innodb_read_ahead_threshold=96;
65 select @@global.innodb_read_ahead_threshold;
66 --disable_warnings
67 select * from information_schema.global_variables where variable_name='innodb_read_ahead_threshold';
68 --enable_warnings
69
70 #
71 # min/max values
72 #
73 set global innodb_read_ahead_threshold=0;
74 select @@global.innodb_read_ahead_threshold;
75 set global innodb_read_ahead_threshold=64;
76 select @@global.innodb_read_ahead_threshold;
77
78 SET @@global.innodb_read_ahead_threshold = @start_global_value;
79 SELECT @@global.innodb_read_ahead_threshold;