Debian Codegraph @

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

raw
1
2 #
3 # note, the default is 1800 on windows, 0 everywhere else
4 #
5
6 SET @start_global_value = @@global.flush_time;
7
8 #
9 # exists as global only
10 #
11 --replace_result 1800 0
12 select @@global.flush_time;
13 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
14 select @@session.flush_time;
15 --replace_result 1800 0
16 show global variables like 'flush_time';
17 --replace_result 1800 0
18 show session variables like 'flush_time';
19 --replace_result 1800 0
20 select * from information_schema.global_variables where variable_name='flush_time';
21 --replace_result 1800 0
22 select * from information_schema.session_variables where variable_name='flush_time';
23
24 #
25 # show that it's writable
26 #
27 set global flush_time=1;
28 select @@global.flush_time;
29 --error ER_GLOBAL_VARIABLE
30 set session flush_time=1;
31
32 #
33 # incorrect types
34 #
35 --error ER_WRONG_TYPE_FOR_VAR
36 set global flush_time=1.1;
37 --error ER_WRONG_TYPE_FOR_VAR
38 set global flush_time=1e1;
39 --error ER_WRONG_TYPE_FOR_VAR
40 set global flush_time="foo";
41
42 #
43 # min/max values
44 #
45 set global flush_time=0;
46 select @@global.flush_time;
47 set global flush_time=cast(-1 as unsigned int);
48 select @@global.flush_time;
49
50 SET @@global.flush_time = @start_global_value;