| 1 |
|
| 2 |
# |
| 3 |
# exists as a global only |
| 4 |
# |
| 5 |
# 2010-01-21 OBN - Added |
| 6 |
# |
| 7 |
source include/have_semisync_plugin.inc; |
| 8 |
# The following is to prevent a mis-match on windows that has the name of of the lib ending with 'dll' |
| 9 |
--replace_regex /\.dll/.so/ |
| 10 |
eval INSTALL PLUGIN rpl_semi_sync_source SONAME '$SEMISYNC_SOURCE_PLUGIN'; |
| 11 |
select @@global.rpl_semi_sync_source_timeout; |
| 12 |
SET @start_global_value = @@global.rpl_semi_sync_source_timeout; |
| 13 |
|
| 14 |
--echo Assuming value will not be more then 100 sec |
| 15 |
select @@global.rpl_semi_sync_source_timeout between 1 and 100000; |
| 16 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 17 |
select @@session.rpl_semi_sync_source_timeout; |
| 18 |
show global variables like 'rpl_semi_sync_source_timeout'; |
| 19 |
show session variables like 'rpl_semi_sync_source_timeout'; |
| 20 |
--disable_warnings |
| 21 |
select * from performance_schema.global_variables where variable_name='rpl_semi_sync_source_timeout'; |
| 22 |
select * from performance_schema.session_variables where variable_name='rpl_semi_sync_source_timeout'; |
| 23 |
--enable_warnings |
| 24 |
|
| 25 |
# |
| 26 |
# show that it's writable |
| 27 |
# |
| 28 |
set global rpl_semi_sync_source_timeout=42; |
| 29 |
--error ER_GLOBAL_VARIABLE |
| 30 |
set session rpl_semi_sync_source_timeout=99; |
| 31 |
select @@global.rpl_semi_sync_source_timeout; |
| 32 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 33 |
select @@session.rpl_semi_sync_source_timeout; |
| 34 |
show global variables like 'rpl_semi_sync_source_timeout'; |
| 35 |
show session variables like 'rpl_semi_sync_source_timeout'; |
| 36 |
--disable_warnings |
| 37 |
select * from performance_schema.global_variables where variable_name='rpl_semi_sync_source_timeout'; |
| 38 |
select * from performance_schema.session_variables where variable_name='rpl_semi_sync_source_timeout'; |
| 39 |
--enable_warnings |
| 40 |
|
| 41 |
# |
| 42 |
# incorrect types |
| 43 |
# |
| 44 |
--error ER_WRONG_TYPE_FOR_VAR |
| 45 |
set global rpl_semi_sync_source_timeout=1.1; |
| 46 |
--error ER_WRONG_TYPE_FOR_VAR |
| 47 |
set global rpl_semi_sync_source_timeout=1e1; |
| 48 |
--error ER_WRONG_TYPE_FOR_VAR |
| 49 |
set global rpl_semi_sync_source_timeout="some text"; |
| 50 |
|
| 51 |
|
| 52 |
# |
| 53 |
# Cleanup |
| 54 |
# |
| 55 |
SET @@global.rpl_semi_sync_source_timeout = @start_global_value; |
| 56 |
select @@global.rpl_semi_sync_source_timeout; |
| 57 |
UNINSTALL PLUGIN rpl_semi_sync_source; |
| 58 |
|