Debian Codegraph @

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

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