1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Changing wsrep_slave_threads parameter requires that cluster

is connected so moved test here.
This commit is contained in:
Jan Lindström
2022-01-07 12:24:19 +02:00
parent ce415be294
commit e32c21cb93
2 changed files with 1 additions and 1 deletions

View File

@@ -0,0 +1,49 @@
#
# wsrep_slave_threads
#
# save the initial value
SET @wsrep_slave_threads_global_saved = @@global.wsrep_slave_threads;
# default
SELECT @@global.wsrep_slave_threads;
@@global.wsrep_slave_threads
1
# scope
SELECT @@session.wsrep_slave_threads;
ERROR HY000: Variable 'wsrep_slave_threads' is a GLOBAL variable
SET @@global.wsrep_slave_threads=1;
SELECT @@global.wsrep_slave_threads;
@@global.wsrep_slave_threads
1
# valid values
SET @@global.wsrep_slave_threads=10;
SELECT @@global.wsrep_slave_threads;
@@global.wsrep_slave_threads
10
SET @@global.wsrep_slave_threads=0;
Warnings:
Warning 1292 Truncated incorrect wsrep_slave_threads value: '0'
SELECT @@global.wsrep_slave_threads;
@@global.wsrep_slave_threads
1
SET @@global.wsrep_slave_threads=default;
SELECT @global.wsrep_slave_threads;
@global.wsrep_slave_threads
NULL
# invalid values
SET @@global.wsrep_slave_threads=NULL;
ERROR 42000: Incorrect argument type to variable 'wsrep_slave_threads'
SET @@global.wsrep_slave_threads='junk';
ERROR 42000: Incorrect argument type to variable 'wsrep_slave_threads'
SET @@global.wsrep_slave_threads=-1;
Warnings:
Warning 1292 Truncated incorrect wsrep_slave_threads value: '-1'
SELECT @global.wsrep_slave_threads;
@global.wsrep_slave_threads
NULL
# restore the initial value
SET @@global.wsrep_slave_threads = @wsrep_slave_threads_global_saved;
# End of test