| 1 |
# |
| 2 |
# Initialization |
| 3 |
# |
| 4 |
INSTALL PLUGIN rpl_semi_sync_source SONAME 'semisync_source.so'; |
| 5 |
# |
| 6 |
# Verify it can set selected and showed correctly |
| 7 |
# |
| 8 |
SELECT @@GLOBAL.rpl_semi_sync_source_wait_point; |
| 9 |
@@GLOBAL.rpl_semi_sync_source_wait_point |
| 10 |
AFTER_SYNC |
| 11 |
SHOW GLOBAL VARIABLES LIKE 'rpl_semi_sync_source_wait_point'; |
| 12 |
Variable_name Value |
| 13 |
rpl_semi_sync_source_wait_point AFTER_SYNC |
| 14 |
SELECT * FROM performance_schema.global_variables WHERE |
| 15 |
VARIABLE_NAME = 'rpl_semi_sync_source_wait_point'; |
| 16 |
VARIABLE_NAME VARIABLE_VALUE |
| 17 |
rpl_semi_sync_source_wait_point AFTER_SYNC |
| 18 |
# |
| 19 |
# Verify it is not a session variable |
| 20 |
# |
| 21 |
SELECT @@SESSION.rpl_semi_sync_source_wait_point; |
| 22 |
ERROR HY000: Variable 'rpl_semi_sync_source_wait_point' is a GLOBAL variable |
| 23 |
SHOW SESSION VARIABLES LIKE 'rpl_semi_sync_source_wait_point'; |
| 24 |
Variable_name Value |
| 25 |
rpl_semi_sync_source_wait_point AFTER_SYNC |
| 26 |
SELECT * FROM performance_schema.session_variables WHERE |
| 27 |
VARIABLE_NAME ='rpl_semi_sync_source_wait_point'; |
| 28 |
VARIABLE_NAME VARIABLE_VALUE |
| 29 |
rpl_semi_sync_source_wait_point AFTER_SYNC |
| 30 |
# |
| 31 |
# Verify it can be set correctly |
| 32 |
# |
| 33 |
SET GLOBAL rpl_semi_sync_source_wait_point = AFTER_COMMIT; |
| 34 |
SELECT @@GLOBAL.rpl_semi_sync_source_wait_point; |
| 35 |
@@GLOBAL.rpl_semi_sync_source_wait_point |
| 36 |
AFTER_COMMIT |
| 37 |
SET GLOBAL rpl_semi_sync_source_wait_point = AFTER_SYNC; |
| 38 |
SELECT @@GLOBAL.rpl_semi_sync_source_wait_point; |
| 39 |
@@GLOBAL.rpl_semi_sync_source_wait_point |
| 40 |
AFTER_SYNC |
| 41 |
SET GLOBAL rpl_semi_sync_source_wait_point = 1; |
| 42 |
SELECT @@GLOBAL.rpl_semi_sync_source_wait_point; |
| 43 |
@@GLOBAL.rpl_semi_sync_source_wait_point |
| 44 |
AFTER_COMMIT |
| 45 |
SET GLOBAL rpl_semi_sync_source_wait_point = 0; |
| 46 |
SELECT @@GLOBAL.rpl_semi_sync_source_wait_point; |
| 47 |
@@GLOBAL.rpl_semi_sync_source_wait_point |
| 48 |
AFTER_SYNC |
| 49 |
SET SESSION rpl_semi_sync_source_wait_point = AFTER_COMMIT; |
| 50 |
ERROR HY000: Variable 'rpl_semi_sync_source_wait_point' is a GLOBAL variable and should be set with SET GLOBAL |
| 51 |
SHOW SESSION VARIABLES LIKE 'rpl_semi_sync_source_wait_point'; |
| 52 |
Variable_name Value |
| 53 |
rpl_semi_sync_source_wait_point AFTER_SYNC |
| 54 |
# |
| 55 |
# Verify it could not bet set with invalid values |
| 56 |
# |
| 57 |
SET GLOBAL rpl_semi_sync_source_wait_point = 2; |
| 58 |
ERROR 42000: Variable 'rpl_semi_sync_source_wait_point' can't be set to the value of '2' |
| 59 |
SET GLOBAL rpl_semi_sync_source_wait_point = blabla; |
| 60 |
ERROR 42000: Variable 'rpl_semi_sync_source_wait_point' can't be set to the value of 'blabla' |
| 61 |
SET GLOBAL rpl_semi_sync_source_wait_point = "blabla"; |
| 62 |
ERROR 42000: Variable 'rpl_semi_sync_source_wait_point' can't be set to the value of 'blabla' |
| 63 |
SET GLOBAL rpl_semi_sync_source_wait_point = ""; |
| 64 |
ERROR 42000: Variable 'rpl_semi_sync_source_wait_point' can't be set to the value of '' |
| 65 |
SET GLOBAL rpl_semi_sync_source_wait_point = NULL; |
| 66 |
ERROR 42000: Variable 'rpl_semi_sync_source_wait_point' can't be set to the value of 'NULL' |
| 67 |
SET GLOBAL rpl_semi_sync_source_wait_point = 0.1; |
| 68 |
ERROR 42000: Incorrect argument type to variable 'rpl_semi_sync_source_wait_point' |
| 69 |
# |
| 70 |
# Cleanup |
| 71 |
# |
| 72 |
UNINSTALL PLUGIN rpl_semi_sync_source; |