mirror of
https://github.com/MariaDB/server.git
synced 2025-04-23 07:05:53 +03:00
Decoupled wsrep thread count from connection count. By doing so, the number of wsrep threads (applier/rollbacker) would no longer affect the threads_connected status variable and thus maximum allowable user connections limit would be @@max_connections. Also introduced a new status variable 'wsrep_thread_count' to hold the number of wsrep applier/rollbacker threads. Added a test case.
64 lines
1.9 KiB
Plaintext
64 lines
1.9 KiB
Plaintext
--source include/have_wsrep.inc
|
|
|
|
--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;
|
|
|
|
--echo
|
|
--echo #
|
|
--echo # MDEV#6206: wsrep_slave_threads subtracts from max_connections
|
|
--echo #
|
|
call mtr.add_suppression("safe_mutex: Found wrong usage of mutex 'LOCK_wsrep_slave_threads' and 'LOCK_global_system_variables'");
|
|
call mtr.add_suppression("WSREP: Failed to get provider options");
|
|
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
|
|
|
|
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
|
|
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.
|
|
sleep 3;
|
|
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.
|
|
sleep 3;
|
|
SHOW STATUS LIKE 'threads_connected';
|
|
SHOW STATUS LIKE 'wsrep_thread_count';
|
|
|
|
# reset (for mtr internal checks)
|
|
SET GLOBAL wsrep_slave_threads= @wsrep_slave_threads_saved;
|
|
SET GLOBAL wsrep_cluster_address= '';
|
|
SET GLOBAL wsrep_provider= 'none';
|
|
|
|
--echo # End of test.
|
|
|