mirror of
https://github.com/MariaDB/server.git
synced 2025-10-12 12:25:37 +03:00
MDEV-17058: Test failure on wsrep.variables MDEV-17060: Test failure on galera.galera_var_slave_threads Fix incorrect calculation of increased applier (slave) threads. Note that increase change takes effect "immediately" but we should use proper wait condition to wait it. Reducing the number of slave threads is not immediate as thread will only exit after a replication event.
160 lines
4.4 KiB
Plaintext
160 lines
4.4 KiB
Plaintext
--source include/have_wsrep.inc
|
|
|
|
SET @wsrep_provider_options_saved= @@global.wsrep_provider_options;
|
|
SET @wsrep_cluster_address_saved= @@global.wsrep_cluster_address;
|
|
|
|
--echo
|
|
--echo # MDEV#5534: mysql_tzinfo_to_sql generates wrong query
|
|
--echo #
|
|
--echo # Testing wsrep_replicate_myisam variable.
|
|
|
|
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
|
SELECT @@session.wsrep_replicate_myisam;
|
|
SELECT @@global.wsrep_replicate_myisam;
|
|
|
|
--error ER_GLOBAL_VARIABLE
|
|
SET SESSION wsrep_replicate_myisam= ON;
|
|
SET GLOBAL wsrep_replicate_myisam= ON;
|
|
|
|
# Reset it back.
|
|
SET GLOBAL wsrep_replicate_myisam= OFF;
|
|
SET GLOBAL wsrep_provider=none;
|
|
|
|
--echo #
|
|
--echo # MDEV#5790: SHOW GLOBAL STATUS LIKE does not show the correct list of
|
|
--echo # variables when using "_"
|
|
--echo #
|
|
|
|
CALL mtr.add_suppression("WSREP: Could not open saved state file for reading.*");
|
|
|
|
--disable_query_log
|
|
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
|
|
--let $galera_version=25.3.17
|
|
source include/check_galera_version.inc;
|
|
--enable_query_log
|
|
|
|
--replace_column 2 #
|
|
SHOW GLOBAL STATUS LIKE 'wsrep%';
|
|
|
|
--echo
|
|
--replace_column 2 #
|
|
SHOW GLOBAL STATUS LIKE 'wsrep_%';
|
|
|
|
--replace_column 2 #
|
|
SHOW GLOBAL STATUS LIKE 'wsrep_local_state_comment';
|
|
|
|
--echo # Should show nothing.
|
|
SHOW STATUS LIKE 'x';
|
|
|
|
# Reset it back.
|
|
SET GLOBAL wsrep_provider=none;
|
|
|
|
--echo #
|
|
--echo # MDEV#6079: xtrabackup SST failing with maria-10.0-galera
|
|
--echo #
|
|
|
|
--disable_query_log
|
|
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
|
|
--enable_query_log
|
|
|
|
# The following 2 variables are used in innobackupex during xtrabackup-based
|
|
# SST.
|
|
--echo
|
|
--replace_column 2 #
|
|
SHOW STATUS LIKE 'wsrep_local_state_uuid';
|
|
--echo
|
|
--replace_column 2 #
|
|
SHOW STATUS LIKE 'wsrep_last_committed';
|
|
|
|
# Reset it back.
|
|
SET GLOBAL wsrep_provider=none;
|
|
|
|
--echo
|
|
--echo #
|
|
--echo # MDEV#6206: wsrep_slave_threads subtracts from max_connections
|
|
--echo #
|
|
call mtr.add_suppression("WSREP: Failed to get provider options");
|
|
|
|
--disable_query_log
|
|
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
|
|
--enable_query_log
|
|
|
|
--replace_regex /.*libgalera_smm.*/libgalera_smm.so/
|
|
SELECT @@global.wsrep_provider;
|
|
SELECT @@global.wsrep_slave_threads;
|
|
SELECT @@global.wsrep_cluster_address;
|
|
SHOW STATUS LIKE 'threads_connected';
|
|
SHOW STATUS LIKE 'wsrep_thread_count';
|
|
--echo
|
|
|
|
--disable_query_log
|
|
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
|
|
--enable_query_log
|
|
|
|
--replace_regex /.*libgalera_smm.*/libgalera_smm.so/
|
|
SELECT @@global.wsrep_provider;
|
|
SELECT @@global.wsrep_cluster_address;
|
|
SHOW STATUS LIKE 'threads_connected';
|
|
SHOW STATUS LIKE 'wsrep_thread_count';
|
|
--echo
|
|
|
|
--echo # Setting wsrep_cluster_address triggers the creation of
|
|
--echo # applier/rollbacker threads.
|
|
SET GLOBAL wsrep_cluster_address= 'gcomm://';
|
|
|
|
--echo # Wait for applier threads to get created.
|
|
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
|
|
--source include/wait_condition.inc
|
|
|
|
--replace_regex /.*libgalera_smm.*/libgalera_smm.so/
|
|
SELECT @@global.wsrep_provider;
|
|
SELECT @@global.wsrep_cluster_address;
|
|
SHOW STATUS LIKE 'threads_connected';
|
|
SHOW STATUS LIKE 'wsrep_thread_count';
|
|
--echo
|
|
|
|
SET @wsrep_slave_threads_saved= @@global.wsrep_slave_threads;
|
|
SET GLOBAL wsrep_slave_threads= 10;
|
|
|
|
--echo # Wait for applier threads to get created.
|
|
--let $wait_condition = SELECT VARIABLE_VALUE = 11 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
|
|
--source include/wait_condition.inc
|
|
|
|
SHOW STATUS LIKE 'threads_connected';
|
|
SHOW STATUS LIKE 'wsrep_thread_count';
|
|
|
|
#
|
|
# privileges for wsrep_on
|
|
#
|
|
set wsrep_on=0;
|
|
set wsrep_on=1;
|
|
create user test@localhost;
|
|
connect con1,localhost,test;
|
|
set auto_increment_increment=10;
|
|
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
|
|
set wsrep_on=0;
|
|
disconnect con1;
|
|
connection default;
|
|
drop user test@localhost;
|
|
|
|
--echo #
|
|
--echo # MDEV#6411: Setting set @@global.wsrep_sst_auth=NULL causes crash
|
|
--echo #
|
|
SET @wsrep_sst_auth_saved= @@global.wsrep_sst_auth;
|
|
SET @@global.wsrep_sst_auth= 'user:pass';
|
|
SELECT @@global.wsrep_sst_auth;
|
|
SET @@global.wsrep_sst_auth= '';
|
|
SELECT @@global.wsrep_sst_auth;
|
|
SET @@global.wsrep_sst_auth= NULL;
|
|
SELECT @@global.wsrep_sst_auth;
|
|
SET @@global.wsrep_sst_auth= @wsrep_sst_auth_saved;
|
|
|
|
# Reset (for mtr internal checks)
|
|
SET GLOBAL wsrep_slave_threads= @wsrep_slave_threads_saved;
|
|
SET GLOBAL wsrep_provider= none;
|
|
SET GLOBAL wsrep_cluster_address= @wsrep_cluster_address_saved;
|
|
SET GLOBAL wsrep_provider_options= @wsrep_provider_options_saved;
|
|
|
|
--echo # End of test.
|
|
|