diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2021-01-19 10:00:05 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2021-01-21 11:41:29 +0200 |
commit | be5fce16a0d4104b216818438ca624bfaa19497a (patch) | |
tree | adf181973fad34ffa10c19d22e33fbbb7cfd872b /mysql-test | |
parent | 9377e9ba0c8c2b6a89d47e545eb292a6973ad2fb (diff) | |
download | mariadb-git-be5fce16a0d4104b216818438ca624bfaa19497a.tar.gz |
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
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/suite/galera/disabled.def | 3 | ||||
-rw-r--r-- | mysql-test/suite/galera/r/galera_var_wsrep_start_position.result (renamed from mysql-test/suite/sys_vars/r/wsrep_start_position_basic.result) | 17 | ||||
-rw-r--r-- | mysql-test/suite/galera/t/galera_var_wsrep_start_position.test (renamed from mysql-test/suite/sys_vars/t/wsrep_start_position_basic.test) | 16 | ||||
-rw-r--r-- | mysql-test/suite/sys_vars/r/wsrep_debug_basic.result | 8 | ||||
-rw-r--r-- | mysql-test/suite/wsrep/r/wsrep_variables_no_provider.result | 44 | ||||
-rw-r--r-- | mysql-test/suite/wsrep/r/wsrep_variables_wsrep_off.result | 39 | ||||
-rw-r--r-- | mysql-test/suite/wsrep/t/wsrep_variables_no_provider.cnf | 12 | ||||
-rw-r--r-- | mysql-test/suite/wsrep/t/wsrep_variables_no_provider.test | 38 | ||||
-rw-r--r-- | mysql-test/suite/wsrep/t/wsrep_variables_wsrep_off.cnf | 12 | ||||
-rw-r--r-- | mysql-test/suite/wsrep/t/wsrep_variables_wsrep_off.test | 30 |
10 files changed, 204 insertions, 15 deletions
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index 046feac5566..509841a823b 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -23,6 +23,7 @@ galera_binlog_stmt_autoinc : MDEV-19959 Galera test failure on galera_binlog_stm galera_encrypt_tmp_files : Get error failed to enable encryption of temporary files galera_ftwrl : MDEV-21525 galera.galera_ftwrl galera_gcache_recover_manytrx : MDEV-18834 Galera test failure +galera_ist_mysqldump : MDEV-24463 galera.galera_sst_mysqldump_with_key MTR failed: 'INSERT failed: 1213: Deadlock found when trying to get lock galera_kill_largechanges : MDEV-18179 Galera test failure on galera.galera_kill_largechanges galera_kill_nochanges : MDEV-18280 Galera test failure on galera_split_brain and galera_kill_nochanges galera_many_tables_nopk : MDEV-18182 Galera test failure on galera.galera_many_tables_nopk @@ -33,6 +34,8 @@ galera_shutdown_nonprim : MDEV-21493 galera.galera_shutdown_nonprim galera_split_brain : MDEV-18280 Galera test failure on galera_split_brain and galera_kill_nochanges galera_ssl_upgrade : MDEV-19950 Galera test failure on galera_ssl_upgrade galera_sst_mariabackup_encrypt_with_key : MDEV-21484 galera_sst_mariabackup_encrypt_with_key +galera_sst_mysqldump : MDEV-24463 galera.galera_sst_mysqldump_with_key MTR failed: 'INSERT failed: 1213: Deadlock found when trying to get lock +galera_sst_mysqldump_with_key : MDEV-24463 galera.galera_sst_mysqldump_with_key MTR failed: 'INSERT failed: 1213: Deadlock found when trying to get lock galera_toi_ddl_nonconflicting : MDEV-21518 galera.galera_toi_ddl_nonconflicting galera_toi_truncate : MDEV-22996 Hang on galera_toi_truncate test case galera_var_node_address : MDEV-20485 Galera test failure diff --git a/mysql-test/suite/sys_vars/r/wsrep_start_position_basic.result b/mysql-test/suite/galera/r/galera_var_wsrep_start_position.result index 255d8239530..3d409f90eac 100644 --- a/mysql-test/suite/sys_vars/r/wsrep_start_position_basic.result +++ b/mysql-test/suite/galera/r/galera_var_wsrep_start_position.result @@ -1,6 +1,9 @@ +connection node_2; +connection node_1; # # wsrep_start_position # +CALL mtr.add_suppression("WSREP: SST failed for position .*"); SET @wsrep_start_position_global_saved = @@global.wsrep_start_position; # default SELECT @@global.wsrep_start_position; @@ -15,20 +18,22 @@ SELECT @@global.wsrep_start_position; 00000000-0000-0000-0000-000000000000:-1 # valid values -SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:100'; +SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-1'; SELECT @@global.wsrep_start_position; @@global.wsrep_start_position -12345678-1234-1234-1234-123456789012:100 +00000000-0000-0000-0000-000000000000:-1 + SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:0'; +ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '00000000-0000-0000-0000-000000000000:0' SELECT @@global.wsrep_start_position; @@global.wsrep_start_position -00000000-0000-0000-0000-000000000000:0 -SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-1'; +00000000-0000-0000-0000-000000000000:-1 +# invalid values +SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:100'; +ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:100' SELECT @@global.wsrep_start_position; @@global.wsrep_start_position 00000000-0000-0000-0000-000000000000:-1 - -# invalid values SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-2'; ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '00000000-0000-0000-0000-000000000000:-2' SELECT @@global.wsrep_start_position; diff --git a/mysql-test/suite/sys_vars/t/wsrep_start_position_basic.test b/mysql-test/suite/galera/t/galera_var_wsrep_start_position.test index 4bac87bdc84..43fd09b902c 100644 --- a/mysql-test/suite/sys_vars/t/wsrep_start_position_basic.test +++ b/mysql-test/suite/galera/t/galera_var_wsrep_start_position.test @@ -1,11 +1,12 @@ ---source include/have_wsrep.inc +--source include/galera_cluster.inc --echo # --echo # wsrep_start_position --echo # -SET @wsrep_start_position_global_saved = @@global.wsrep_start_position; +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; @@ -15,19 +16,20 @@ SELECT @@global.wsrep_start_position; SELECT @@session.wsrep_start_position; SELECT @@global.wsrep_start_position; - --echo --echo # valid values -SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:100'; -SELECT @@global.wsrep_start_position; -SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:0'; -SELECT @@global.wsrep_start_position; 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 diff --git a/mysql-test/suite/sys_vars/r/wsrep_debug_basic.result b/mysql-test/suite/sys_vars/r/wsrep_debug_basic.result index 47d00f5dede..1c9c2ddf3a3 100644 --- a/mysql-test/suite/sys_vars/r/wsrep_debug_basic.result +++ b/mysql-test/suite/sys_vars/r/wsrep_debug_basic.result @@ -16,9 +16,11 @@ SELECT @@global.wsrep_debug; @@global.wsrep_debug NONE SET @@global.wsrep_debug=1; +Warnings: +Warning 1231 Setting 'wsrep_debug' has no effect because wsrep is switched off SELECT @@global.wsrep_debug; @@global.wsrep_debug -SERVER +NONE # valid values SET @@global.wsrep_debug=NONE; @@ -26,9 +28,11 @@ SELECT @@global.wsrep_debug; @@global.wsrep_debug NONE SET @@global.wsrep_debug=SERVER; +Warnings: +Warning 1231 Setting 'wsrep_debug' has no effect because wsrep is switched off SELECT @@global.wsrep_debug; @@global.wsrep_debug -SERVER +NONE SET @@global.wsrep_debug=default; SELECT @@global.wsrep_debug; @@global.wsrep_debug diff --git a/mysql-test/suite/wsrep/r/wsrep_variables_no_provider.result b/mysql-test/suite/wsrep/r/wsrep_variables_no_provider.result new file mode 100644 index 00000000000..ad35dc8dbcd --- /dev/null +++ b/mysql-test/suite/wsrep/r/wsrep_variables_no_provider.result @@ -0,0 +1,44 @@ +SELECT @@wsrep_on; +@@wsrep_on +1 +SET @wsrep_slave_threads_global_saved = @@global.wsrep_slave_threads; +SET @wsrep_debug_saved = @@global.wsrep_debug; +SET @wsrep_provider_options_saved= @@global.wsrep_provider_options; +SET @wsrep_cluster_address_saved= @@global.wsrep_cluster_address; +SET GLOBAL wsrep_provider=none; +SET SESSION wsrep_trx_fragment_size=DEFAULT; +ERROR HY000: Incorrect arguments to SET +SELECT @@session.wsrep_trx_fragment_size; +@@session.wsrep_trx_fragment_size +0 +SET GLOBAL wsrep_start_position='12345678-1234-1234-1234-123456789012:100'; +ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:100' +SHOW WARNINGS; +Level Code Message +Warning 1231 Cannot set 'wsrep_start_position' because wsrep is switched off or provider is not loaded +Error 1231 Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:100' +SELECT @@global.wsrep_start_position; +@@global.wsrep_start_position +00000000-0000-0000-0000-000000000000:-1 +SET GLOBAL wsrep_debug=1; +Warnings: +Warning 1231 Setting 'wsrep_debug' has no effect because wsrep is switched off +SELECT @@global.wsrep_debug; +@@global.wsrep_debug +NONE +SET GLOBAL wsrep_slave_threads=5; +SELECT @@global.wsrep_slave_threads; +@@global.wsrep_slave_threads +5 +SET GLOBAL wsrep_desync=1; +ERROR HY000: WSREP (galera) not started +SELECT @@global.wsrep_desync; +@@global.wsrep_desync +0 +SET SESSION wsrep_trx_fragment_unit='rows'; +ERROR HY000: Incorrect arguments to SET +SELECT @@session.wsrep_trx_fragment_unit; +@@session.wsrep_trx_fragment_unit +rows +SET @@global.wsrep_slave_threads = @wsrep_slave_threads_global_saved; +SET @@global.wsrep_debug = @wsrep_debug_saved; diff --git a/mysql-test/suite/wsrep/r/wsrep_variables_wsrep_off.result b/mysql-test/suite/wsrep/r/wsrep_variables_wsrep_off.result new file mode 100644 index 00000000000..7cae89eae8e --- /dev/null +++ b/mysql-test/suite/wsrep/r/wsrep_variables_wsrep_off.result @@ -0,0 +1,39 @@ +SELECT @@wsrep_on; +@@wsrep_on +0 +SET @wsrep_slave_threads_global_saved = @@global.wsrep_slave_threads; +SET @wsrep_debug_saved = @@global.wsrep_debug; +SET SESSION wsrep_trx_fragment_size=DEFAULT; +ERROR HY000: Incorrect arguments to SET +SELECT @@session.wsrep_trx_fragment_size; +@@session.wsrep_trx_fragment_size +0 +SET GLOBAL wsrep_start_position='12345678-1234-1234-1234-123456789012:100'; +ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:100' +SHOW WARNINGS; +Level Code Message +Warning 1231 Cannot set 'wsrep_start_position' because wsrep is switched off or provider is not loaded +Error 1231 Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:100' +SELECT @@global.wsrep_start_position; +@@global.wsrep_start_position +00000000-0000-0000-0000-000000000000:-1 +SET GLOBAL wsrep_debug=1; +Warnings: +Warning 1231 Setting 'wsrep_debug' has no effect because wsrep is switched off +SELECT @@global.wsrep_debug; +@@global.wsrep_debug +NONE +SET GLOBAL wsrep_slave_threads=5; +SELECT @@global.wsrep_slave_threads; +@@global.wsrep_slave_threads +5 +SET GLOBAL wsrep_desync=1; +ERROR HY000: WSREP (galera) not started +SELECT @@global.wsrep_desync; +@@global.wsrep_desync +0 +SET SESSION wsrep_trx_fragment_unit='rows'; +ERROR HY000: Incorrect arguments to SET +SELECT @@session.wsrep_trx_fragment_unit; +@@session.wsrep_trx_fragment_unit +rows diff --git a/mysql-test/suite/wsrep/t/wsrep_variables_no_provider.cnf b/mysql-test/suite/wsrep/t/wsrep_variables_no_provider.cnf new file mode 100644 index 00000000000..b73146d26e7 --- /dev/null +++ b/mysql-test/suite/wsrep/t/wsrep_variables_no_provider.cnf @@ -0,0 +1,12 @@ +# Use default setting for mysqld processes +!include include/default_mysqld.cnf + +[mysqld.1] +wsrep-on=ON +binlog-format=ROW +wsrep-provider=@ENV.WSREP_PROVIDER +wsrep-cluster-address='gcomm://' +#galera_port=@OPT.port +#ist_port=@OPT.port +#sst_port=@OPT.port + diff --git a/mysql-test/suite/wsrep/t/wsrep_variables_no_provider.test b/mysql-test/suite/wsrep/t/wsrep_variables_no_provider.test new file mode 100644 index 00000000000..b44c9c5ebc8 --- /dev/null +++ b/mysql-test/suite/wsrep/t/wsrep_variables_no_provider.test @@ -0,0 +1,38 @@ +--source include/have_wsrep.inc +--source include/have_innodb.inc + +SELECT @@wsrep_on; + +SET @wsrep_slave_threads_global_saved = @@global.wsrep_slave_threads; +SET @wsrep_debug_saved = @@global.wsrep_debug; +SET @wsrep_provider_options_saved= @@global.wsrep_provider_options; +SET @wsrep_cluster_address_saved= @@global.wsrep_cluster_address; + +SET GLOBAL wsrep_provider=none; + +--error ER_WRONG_ARGUMENTS +SET SESSION wsrep_trx_fragment_size=DEFAULT; +SELECT @@session.wsrep_trx_fragment_size; +--error ER_WRONG_VALUE_FOR_VAR +SET GLOBAL wsrep_start_position='12345678-1234-1234-1234-123456789012:100'; +SHOW WARNINGS; +SELECT @@global.wsrep_start_position; +SET GLOBAL wsrep_debug=1; +SELECT @@global.wsrep_debug; +SET GLOBAL wsrep_slave_threads=5; +SELECT @@global.wsrep_slave_threads; +--error ER_WRONG_ARGUMENTS +SET GLOBAL wsrep_desync=1; +SELECT @@global.wsrep_desync; +--error ER_WRONG_ARGUMENTS +SET SESSION wsrep_trx_fragment_unit='rows'; +SELECT @@session.wsrep_trx_fragment_unit; + +--disable_query_log +eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER'; +SET GLOBAL wsrep_cluster_address= @wsrep_cluster_address_saved; +SET GLOBAL wsrep_provider_options= @wsrep_provider_options_saved; +--source include/galera_wait_ready.inc +SET @@global.wsrep_slave_threads = @wsrep_slave_threads_global_saved; +SET @@global.wsrep_debug = @wsrep_debug_saved; +--enable_query_log diff --git a/mysql-test/suite/wsrep/t/wsrep_variables_wsrep_off.cnf b/mysql-test/suite/wsrep/t/wsrep_variables_wsrep_off.cnf new file mode 100644 index 00000000000..2e66b1ef23c --- /dev/null +++ b/mysql-test/suite/wsrep/t/wsrep_variables_wsrep_off.cnf @@ -0,0 +1,12 @@ +# Use default setting for mysqld processes +!include include/default_mysqld.cnf + +[mysqld] +wsrep-on=OFF + +[mysqld.1] +wsrep-on=OFF +#galera_port=@OPT.port +#ist_port=@OPT.port +#sst_port=@OPT.port + diff --git a/mysql-test/suite/wsrep/t/wsrep_variables_wsrep_off.test b/mysql-test/suite/wsrep/t/wsrep_variables_wsrep_off.test new file mode 100644 index 00000000000..4a9cd2bad5f --- /dev/null +++ b/mysql-test/suite/wsrep/t/wsrep_variables_wsrep_off.test @@ -0,0 +1,30 @@ +--source include/have_wsrep.inc +--source include/have_innodb.inc + +SELECT @@wsrep_on; + +SET @wsrep_slave_threads_global_saved = @@global.wsrep_slave_threads; +SET @wsrep_debug_saved = @@global.wsrep_debug; + +--error ER_WRONG_ARGUMENTS +SET SESSION wsrep_trx_fragment_size=DEFAULT; +SELECT @@session.wsrep_trx_fragment_size; +--error ER_WRONG_VALUE_FOR_VAR +SET GLOBAL wsrep_start_position='12345678-1234-1234-1234-123456789012:100'; +SHOW WARNINGS; +SELECT @@global.wsrep_start_position; +SET GLOBAL wsrep_debug=1; +SELECT @@global.wsrep_debug; +SET GLOBAL wsrep_slave_threads=5; +SELECT @@global.wsrep_slave_threads; +--error ER_WRONG_ARGUMENTS +SET GLOBAL wsrep_desync=1; +SELECT @@global.wsrep_desync; +--error ER_WRONG_ARGUMENTS +SET SESSION wsrep_trx_fragment_unit='rows'; +SELECT @@session.wsrep_trx_fragment_unit; + +--disable_query_log +SET @@global.wsrep_slave_threads = @wsrep_slave_threads_global_saved; +SET @@global.wsrep_debug = @wsrep_debug_saved; +--enable_query_log |