mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
10.4-MDEV-31470 wsrep_sst_method variable validity checking
This commit checks the validity of value change of wsrep_sst_method variable. The validity check is same as happens in donor node when incoming SST request is parsed. The commit has also a mtr test: wsrep.wsrep_variables_sst_method which verifies that wsrep_sst_method can be succesfully changed to acceptable values and that the SET command results in error if invalid value was entered. Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
This commit is contained in:
committed by
Julius Goryavsky
parent
aae78d7609
commit
c7feacb0de
50
mysql-test/suite/wsrep/t/wsrep_variables_sst_method.test
Normal file
50
mysql-test/suite/wsrep/t/wsrep_variables_sst_method.test
Normal file
@ -0,0 +1,50 @@
|
||||
--source include/have_wsrep.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
SELECT @@wsrep_on;
|
||||
|
||||
SET @wsrep_sst_method_saved = @@global.wsrep_sst_method;
|
||||
|
||||
/* test currently supported methods */
|
||||
SET GLOBAL wsrep_sst_method=DEFAULT;
|
||||
SELECT @@global.wsrep_sst_method;
|
||||
|
||||
SET GLOBAL wsrep_sst_method='rsync';
|
||||
SELECT @@global.wsrep_sst_method;
|
||||
|
||||
SET GLOBAL wsrep_sst_method='mysqldump';
|
||||
SELECT @@global.wsrep_sst_method;
|
||||
|
||||
SET GLOBAL wsrep_sst_method='mariabackup';
|
||||
SELECT @@global.wsrep_sst_method;
|
||||
|
||||
SET GLOBAL wsrep_sst_method='backup';
|
||||
SELECT @@global.wsrep_sst_method;
|
||||
|
||||
SET GLOBAL wsrep_sst_method='backup1.sh';
|
||||
SELECT @@global.wsrep_sst_method;
|
||||
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
SET GLOBAL wsrep_sst_method='my method';
|
||||
SELECT @@global.wsrep_sst_method;
|
||||
SHOW WARNINGS;
|
||||
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
SET GLOBAL wsrep_sst_method='/method';
|
||||
SELECT @@global.wsrep_sst_method;
|
||||
SHOW WARNINGS;
|
||||
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
SET GLOBAL wsrep_sst_method='method!';
|
||||
SELECT @@global.wsrep_sst_method;
|
||||
SHOW WARNINGS;
|
||||
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
SET GLOBAL wsrep_sst_method='method;';
|
||||
SELECT @@global.wsrep_sst_method;
|
||||
SHOW WARNINGS;
|
||||
|
||||
|
||||
--disable_query_log
|
||||
SET @@global.wsrep_sst_method = @wsrep_sst_method_saved;
|
||||
--enable_query_log
|
Reference in New Issue
Block a user