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