Debian Codegraph @

mysql-test/suite/sys_vars/t/innodb_old_blocks_time_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_old_blocks_time;
9 SELECT @start_global_value;
10
11 #
12 # exists as global only
13 #
14 --echo Valid values are zero or above
15 select @@global.innodb_old_blocks_time >=0;
16 select @@global.innodb_old_blocks_time;
17 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
18 select @@session.innodb_old_blocks_time;
19 show global variables like 'innodb_old_blocks_time';
20 show session variables like 'innodb_old_blocks_time';
21 --disable_warnings
22 select * from information_schema.global_variables where variable_name='innodb_old_blocks_time';
23 select * from information_schema.session_variables where variable_name='innodb_old_blocks_time';
24 --enable_warnings
25
26 #
27 # show that it's writable
28 #
29 set global innodb_old_blocks_time=10;
30 select @@global.innodb_old_blocks_time;
31 --disable_warnings
32 select * from information_schema.global_variables where variable_name='innodb_old_blocks_time';
33 select * from information_schema.session_variables where variable_name='innodb_old_blocks_time';
34 --enable_warnings
35 --error ER_GLOBAL_VARIABLE
36 set session innodb_old_blocks_time=1;
37
38 #
39 # incorrect types
40 #
41 --error ER_WRONG_TYPE_FOR_VAR
42 set global innodb_old_blocks_time=1.1;
43 --error ER_WRONG_TYPE_FOR_VAR
44 set global innodb_old_blocks_time=1e1;
45 --error ER_WRONG_TYPE_FOR_VAR
46 set global innodb_old_blocks_time="foo";
47
48 set global innodb_old_blocks_time=-7;
49 select @@global.innodb_old_blocks_time;
50 --disable_warnings
51 select * from information_schema.global_variables where variable_name='innodb_old_blocks_time';
52 --enable_warnings
53
54 #
55 # cleanup
56 #
57 SET @@global.innodb_old_blocks_time = @start_global_value;
58 SELECT @@global.innodb_old_blocks_time;