Debian Codegraph @

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

raw
1
2 #
3 # exists as a global only
4 #
5 # 2010-01-21 OBN - Added
6 #
7 #
8 source include/have_semisync_plugin.inc;
9 # The following is to prevent a mis-match on windows that has the name of of the lib ending with 'dll'
10 --replace_regex /\.dll/.so/
11 eval INSTALL PLUGIN rpl_semi_sync_source SONAME '$SEMISYNC_SOURCE_PLUGIN';
12 select @@global.rpl_semi_sync_source_enabled;
13 SET @start_global_value = @@global.rpl_semi_sync_source_enabled;
14
15 select @@global.rpl_semi_sync_source_enabled in (0,1);
16 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
17 select @@session.rpl_semi_sync_source_enabled;
18 show global variables like 'rpl_semi_sync_source_enabled';
19 show session variables like 'rpl_semi_sync_source_enabled';
20 --disable_warnings
21 select * from performance_schema.global_variables where variable_name='rpl_semi_sync_source_enabled';
22 select * from performance_schema.session_variables where variable_name='rpl_semi_sync_source_enabled';
23 --enable_warnings
24
25 #
26 # show that it's writable
27 #
28 set global rpl_semi_sync_source_enabled=0;
29 --error ER_GLOBAL_VARIABLE
30 set session rpl_semi_sync_source_enabled=0;
31 select @@global.rpl_semi_sync_source_enabled;
32 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
33 select @@session.rpl_semi_sync_source_enabled;
34 show global variables like 'rpl_semi_sync_source_enabled';
35 show session variables like 'rpl_semi_sync_source_enabled';
36 --disable_warnings
37 select * from performance_schema.global_variables where variable_name='rpl_semi_sync_source_enabled';
38 select * from performance_schema.session_variables where variable_name='rpl_semi_sync_source_enabled';
39 --enable_warnings
40 set global rpl_semi_sync_source_enabled=1;
41 --error ER_GLOBAL_VARIABLE
42 set session rpl_semi_sync_source_enabled=1;
43 select @@global.rpl_semi_sync_source_enabled;
44 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
45 select @@session.rpl_semi_sync_source_enabled;
46 show global variables like 'rpl_semi_sync_source_enabled';
47 show session variables like 'rpl_semi_sync_source_enabled';
48 --disable_warnings
49 select * from performance_schema.global_variables where variable_name='rpl_semi_sync_source_enabled';
50 select * from performance_schema.session_variables where variable_name='rpl_semi_sync_source_enabled';
51 --enable_warnings
52
53 #
54 # incorrect types
55 #
56 --error ER_WRONG_TYPE_FOR_VAR
57 set global rpl_semi_sync_source_enabled=1.1;
58 --error ER_WRONG_TYPE_FOR_VAR
59 set global rpl_semi_sync_source_enabled=1e1;
60 --error ER_WRONG_VALUE_FOR_VAR
61 set global rpl_semi_sync_source_enabled="some text";
62
63
64 #
65 # Cleanup
66 #
67 SET @@global.rpl_semi_sync_source_enabled = @start_global_value;
68 select @@global.rpl_semi_sync_source_enabled;
69 UNINSTALL PLUGIN rpl_semi_sync_source;
70