1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-30 05:23:50 +03:00
Files
mariadb/mysql-test/suite/galera/t/galera_var_wsrep_start_position.test
Jan Lindström be5fce16a0 MDEV-24596 : Assertion `state_ == s_exec || state_ == s_quitting' failed in wsrep::client_state::disable_streaming
There were multiple problems here
* wsrep_trx_fragment_size should not be set when wsrep is disabled or provider is not loaded
* wsrep_trx_fragment_unit should not be set when wsrep is disabled or provider is not loaded
* wsrep_debug has no effect if wsrep is disabled or provider is not loaded
* wsrep_start_position should not be set when wsrep is disabled or provider is not loaded any other value than default
* wsrep_start_position should be changed only when we are joiner or initialized
* wsrep_start_position should be allowed to set only a value that exits, thus
we need to add error handling to wsrep_sst_complete
2021-01-21 11:41:29 +02:00

77 lines
2.7 KiB
Plaintext

--source include/galera_cluster.inc
--echo #
--echo # wsrep_start_position
--echo #
CALL mtr.add_suppression("WSREP: SST failed for position .*");
SET @wsrep_start_position_global_saved = @@global.wsrep_start_position;
--echo # default
SELECT @@global.wsrep_start_position;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_start_position;
SELECT @@global.wsrep_start_position;
--echo
--echo # valid values
SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-1';
SELECT @@global.wsrep_start_position;
--echo
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:0';
SELECT @@global.wsrep_start_position;
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:100';
SELECT @@global.wsrep_start_position;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-2';
SELECT @@global.wsrep_start_position;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-2A';
SELECT @@global.wsrep_start_position;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:0A';
SELECT @@global.wsrep_start_position;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position='000000000000000-0000-0000-0000-000000000000:-1';
SELECT @@global.wsrep_start_position;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position='12345678-1234-1234-12345-123456789012:100';
SELECT @@global.wsrep_start_position;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position='12345678-1234-123-12345-123456789012:0';
SELECT @@global.wsrep_start_position;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:_99999';
SELECT @@global.wsrep_start_position;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:a';
SELECT @@global.wsrep_start_position;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position='OFF';
SELECT @@global.wsrep_start_position;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position=ON;
SELECT @@global.wsrep_start_position;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position='';
SELECT @@global.wsrep_start_position;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position=NULL;
SELECT @@global.wsrep_start_position;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position='junk';
SELECT @@global.wsrep_start_position;
--echo
--echo # restore the initial value
SET @@global.wsrep_start_position = @wsrep_start_position_global_saved;
--echo # End of test