Commit 26e048ff authored by Nirbhay Choubey's avatar Nirbhay Choubey

Merged sys_vars.wsrep_* tests from maria-10.0-galera tree.

parent 7c58dd80
set @start_value = @@wsrep_auto_increment_control;
set @@global.wsrep_auto_increment_control=ON;
set @@global.wsrep_auto_increment_control=OFF;
set @@global.wsrep_auto_increment_control=1;
set @@global.wsrep_auto_increment_control=0;
SET @@global.wsrep_auto_increment_control = -1;
ERROR 42000: Variable 'wsrep_auto_increment_control' can't be set to the value of '-1'
set @@global.wsrep_auto_increment_control = @start_value;
#
# wsrep_auto_increment_control
#
# save the initial value
SET @wsrep_auto_increment_control_global_saved = @@global.wsrep_auto_increment_control;
# default
SELECT @@global.wsrep_auto_increment_control;
@@global.wsrep_auto_increment_control
1
# scope
SELECT @@session.wsrep_auto_increment_control;
ERROR HY000: Variable 'wsrep_auto_increment_control' is a GLOBAL variable
SET @@global.wsrep_auto_increment_control=OFF;
SELECT @@global.wsrep_auto_increment_control;
@@global.wsrep_auto_increment_control
0
SET @@global.wsrep_auto_increment_control=ON;
SELECT @@global.wsrep_auto_increment_control;
@@global.wsrep_auto_increment_control
1
# valid values
SET @@global.wsrep_auto_increment_control='OFF';
SELECT @@global.wsrep_auto_increment_control;
@@global.wsrep_auto_increment_control
0
SET @@global.wsrep_auto_increment_control=ON;
SELECT @@global.wsrep_auto_increment_control;
@@global.wsrep_auto_increment_control
1
SET @@global.wsrep_auto_increment_control=default;
SELECT @@global.wsrep_auto_increment_control;
@@global.wsrep_auto_increment_control
1
# invalid values
SET @@global.wsrep_auto_increment_control=NULL;
ERROR 42000: Variable 'wsrep_auto_increment_control' can't be set to the value of 'NULL'
SET @@global.wsrep_auto_increment_control='junk';
ERROR 42000: Variable 'wsrep_auto_increment_control' can't be set to the value of 'junk'
# restore the initial value
SET @@global.wsrep_auto_increment_control = @wsrep_auto_increment_control_global_saved;
# End of test
set @start_value = @@wsrep_causal_reads;
set @@global.wsrep_causal_reads=ON;
set @@global.wsrep_causal_reads=OFF;
set @@global.wsrep_causal_reads=1;
set @@global.wsrep_causal_reads=0;
SET @@global.wsrep_causal_reads = -1;
ERROR 42000: Variable 'wsrep_causal_reads' can't be set to the value of '-1'
set @@global.wsrep_causal_reads = @start_value;
#
# wsrep_causal_reads
#
# save the initial values
SET @wsrep_causal_reads_global_saved = @@global.wsrep_causal_reads;
SET @wsrep_causal_reads_session_saved = @@session.wsrep_causal_reads;
# default
SELECT @@global.wsrep_causal_reads;
@@global.wsrep_causal_reads
0
SELECT @@session.wsrep_causal_reads;
@@session.wsrep_causal_reads
0
# scope and valid values
SET @@global.wsrep_causal_reads=OFF;
SELECT @@global.wsrep_causal_reads;
@@global.wsrep_causal_reads
0
SET @@global.wsrep_causal_reads=ON;
SELECT @@global.wsrep_causal_reads;
@@global.wsrep_causal_reads
1
SET @@session.wsrep_causal_reads=OFF;
SELECT @@session.wsrep_causal_reads;
@@session.wsrep_causal_reads
0
SET @@session.wsrep_causal_reads=ON;
SELECT @@session.wsrep_causal_reads;
@@session.wsrep_causal_reads
1
SET @@session.wsrep_causal_reads=default;
SELECT @@session.wsrep_causal_reads;
@@session.wsrep_causal_reads
1
# invalid values
SET @@global.wsrep_causal_reads=NULL;
ERROR 42000: Variable 'wsrep_causal_reads' can't be set to the value of 'NULL'
SET @@global.wsrep_causal_reads='junk';
ERROR 42000: Variable 'wsrep_causal_reads' can't be set to the value of 'junk'
SET @@session.wsrep_causal_reads=NULL;
ERROR 42000: Variable 'wsrep_causal_reads' can't be set to the value of 'NULL'
SET @@session.wsrep_causal_reads='junk';
ERROR 42000: Variable 'wsrep_causal_reads' can't be set to the value of 'junk'
# restore the initial values
SET @@global.wsrep_causal_reads = @wsrep_causal_reads_global_saved;
SET @@session.wsrep_causal_reads = @wsrep_causal_reads_session_saved;
# End of test
set @start_value = @@wsrep_certify_nonpk;
set @@global.wsrep_certify_nonpk=ON;
set @@global.wsrep_certify_nonpk=OFF;
set @@global.wsrep_certify_nonpk=1;
set @@global.wsrep_certify_nonpk=0;
SET @@global.wsrep_certify_nonpk = -1;
ERROR 42000: Variable 'wsrep_certify_nonPK' can't be set to the value of '-1'
set @@global.wsrep_certify_nonpk = @start_value;
#
# wsrep_certify_nonpk
#
# save the initial value
SET @wsrep_certify_nonpk_global_saved = @@global.wsrep_certify_nonpk;
# default
SELECT @@global.wsrep_certify_nonpk;
@@global.wsrep_certify_nonpk
1
# scope
SELECT @@session.wsrep_certify_nonpk;
ERROR HY000: Variable 'wsrep_certify_nonPK' is a GLOBAL variable
SET @@global.wsrep_certify_nonpk=OFF;
SELECT @@global.wsrep_certify_nonpk;
@@global.wsrep_certify_nonpk
0
SET @@global.wsrep_certify_nonpk=ON;
SELECT @@global.wsrep_certify_nonpk;
@@global.wsrep_certify_nonpk
1
# valid values
SET @@global.wsrep_certify_nonpk='OFF';
SELECT @@global.wsrep_certify_nonpk;
@@global.wsrep_certify_nonpk
0
SET @@global.wsrep_certify_nonpk=ON;
SELECT @@global.wsrep_certify_nonpk;
@@global.wsrep_certify_nonpk
1
SET @@global.wsrep_certify_nonpk=default;
SELECT @@global.wsrep_certify_nonpk;
@@global.wsrep_certify_nonpk
1
# invalid values
SET @@global.wsrep_certify_nonpk=NULL;
ERROR 42000: Variable 'wsrep_certify_nonPK' can't be set to the value of 'NULL'
SET @@global.wsrep_certify_nonpk='junk';
ERROR 42000: Variable 'wsrep_certify_nonPK' can't be set to the value of 'junk'
# restore the initial value
SET @@global.wsrep_certify_nonpk = @wsrep_certify_nonpk_global_saved;
# End of test
SELECT COUNT(@@GLOBAL.wsrep_cluster_address);
COUNT(@@GLOBAL.wsrep_cluster_address)
1
1 Expected
SELECT COUNT(@@GLOBAL.wsrep_cluster_address);
COUNT(@@GLOBAL.wsrep_cluster_address)
1
1 Expected
SELECT @@GLOBAL.wsrep_cluster_address = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='wsrep_cluster_address';
@@GLOBAL.wsrep_cluster_address = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.wsrep_cluster_address);
COUNT(@@GLOBAL.wsrep_cluster_address)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='wsrep_cluster_address';
COUNT(VARIABLE_VALUE)
1
1 Expected
SELECT @@wsrep_cluster_address = @@GLOBAL.wsrep_cluster_address;
@@wsrep_cluster_address = @@GLOBAL.wsrep_cluster_address
1
1 Expected
SELECT COUNT(@@wsrep_cluster_address);
COUNT(@@wsrep_cluster_address)
1
1 Expected
SELECT COUNT(@@local.wsrep_cluster_address);
#
# wsrep_cluster_address
#
call mtr.add_suppression("safe_mutex: Found wrong usage of mutex.*");
# save the initial value
SET @wsrep_cluster_address_global_saved = @@global.wsrep_cluster_address;
# default
SELECT @@global.wsrep_cluster_address;
@@global.wsrep_cluster_address
# scope
SELECT @@session.wsrep_cluster_address;
ERROR HY000: Variable 'wsrep_cluster_address' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.wsrep_cluster_address);
ERROR HY000: Variable 'wsrep_cluster_address' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.wsrep_cluster_address);
COUNT(@@GLOBAL.wsrep_cluster_address)
1
1 Expected
SELECT wsrep_cluster_address = @@SESSION.wsrep_cluster_address;
ERROR 42S22: Unknown column 'wsrep_cluster_address' in 'field list'
Expected error 'Readonly variable'
SELECT @@global.wsrep_cluster_address;
@@global.wsrep_cluster_address
# valid values
SET @@global.wsrep_cluster_address='127.0.0.1';
SELECT @@global.wsrep_cluster_address;
@@global.wsrep_cluster_address
127.0.0.1
SET @@global.wsrep_cluster_address=AUTO;
SELECT @@global.wsrep_cluster_address;
@@global.wsrep_cluster_address
AUTO
SET @@global.wsrep_cluster_address=default;
SELECT @@global.wsrep_cluster_address;
@@global.wsrep_cluster_address
# invalid values
SET @@global.wsrep_node_address=NULL;
ERROR 42000: Variable 'wsrep_node_address' can't be set to the value of 'NULL'
SELECT @@global.wsrep_node_address;
@@global.wsrep_node_address
SET @@global.wsrep_cluster_address=ON;
SELECT @@global.wsrep_cluster_address;
@@global.wsrep_cluster_address
ON
SET @@global.wsrep_cluster_address='OFF';
SELECT @@global.wsrep_cluster_address;
@@global.wsrep_cluster_address
OFF
SET @@global.wsrep_cluster_address='junk';
SELECT @@global.wsrep_cluster_address;
@@global.wsrep_cluster_address
junk
# restore the initial value
SET @@global.wsrep_cluster_address = @wsrep_cluster_address_global_saved;
# End of test
set @start_value = @@wsrep_cluster_name;
set @@global.wsrep_cluster_name='test';
set @@global.wsrep_cluster_name=NULL;
#
# wsrep_cluster_name
#
# save the initial value
SET @wsrep_cluster_name_global_saved = @@global.wsrep_cluster_name;
# default
SELECT @@global.wsrep_cluster_name;
@@global.wsrep_cluster_name
my_wsrep_cluster
# scope
SELECT @@session.wsrep_cluster_name;
ERROR HY000: Variable 'wsrep_cluster_name' is a GLOBAL variable
SET @@global.wsrep_cluster_name='my_galera_cluster';
SELECT @@global.wsrep_cluster_name;
@@global.wsrep_cluster_name
my_galera_cluster
# valid values
SET @@global.wsrep_cluster_name='my_quoted_galera_cluster';
SELECT @@global.wsrep_cluster_name;
@@global.wsrep_cluster_name
my_quoted_galera_cluster
SET @@global.wsrep_cluster_name=my_unquoted_cluster;
SELECT @@global.wsrep_cluster_name;
@@global.wsrep_cluster_name
my_unquoted_cluster
SET @@global.wsrep_cluster_name=OFF;
SELECT @@global.wsrep_cluster_name;
@@global.wsrep_cluster_name
OFF
SET @@global.wsrep_cluster_name=default;
SELECT @@global.wsrep_cluster_name;
@@global.wsrep_cluster_name
my_wsrep_cluster
# invalid values
SET @@global.wsrep_cluster_name=NULL;
ERROR 42000: Variable 'wsrep_cluster_name' can't be set to the value of 'NULL'
SET @@global.wsrep_cluster_name = 1;
ERROR 42000: Incorrect argument type to variable 'wsrep_cluster_name'
set @@global.wsrep_cluster_name = @start_value;
# restore the initial value
SET @@global.wsrep_cluster_name = @wsrep_cluster_name_global_saved;
# End of test
set @start_value = @@wsrep_convert_lock_to_trx;
set @@global.wsrep_convert_lock_to_trx=ON;
set @@global.wsrep_convert_lock_to_trx=OFF;
set @@global.wsrep_convert_lock_to_trx=1;
set @@global.wsrep_convert_lock_to_trx=0;
SET @@global.wsrep_convert_lock_to_trx = -1;
ERROR 42000: Variable 'wsrep_convert_LOCK_to_trx' can't be set to the value of '-1'
set @@global.wsrep_convert_lock_to_trx = @start_value;
#
# wsrep_convert_lock_to_trx
#
# save the initial value
SET @wsrep_convert_lock_to_trx_global_saved = @@global.wsrep_convert_lock_to_trx;
# default
SELECT @@global.wsrep_convert_lock_to_trx;
@@global.wsrep_convert_lock_to_trx
0
# scope
SELECT @@session.wsrep_convert_lock_to_trx;
ERROR HY000: Variable 'wsrep_convert_LOCK_to_trx' is a GLOBAL variable
SET @@global.wsrep_convert_lock_to_trx=OFF;
SELECT @@global.wsrep_convert_lock_to_trx;
@@global.wsrep_convert_lock_to_trx
0
SET @@global.wsrep_convert_lock_to_trx=ON;
SELECT @@global.wsrep_convert_lock_to_trx;
@@global.wsrep_convert_lock_to_trx
1
# valid values
SET @@global.wsrep_convert_lock_to_trx='OFF';
SELECT @@global.wsrep_convert_lock_to_trx;
@@global.wsrep_convert_lock_to_trx
0
SET @@global.wsrep_convert_lock_to_trx=ON;
SELECT @@global.wsrep_convert_lock_to_trx;
@@global.wsrep_convert_lock_to_trx
1
SET @@global.wsrep_convert_lock_to_trx=default;
SELECT @@global.wsrep_convert_lock_to_trx;
@@global.wsrep_convert_lock_to_trx
0
# invalid values
SET @@global.wsrep_convert_lock_to_trx=NULL;
ERROR 42000: Variable 'wsrep_convert_LOCK_to_trx' can't be set to the value of 'NULL'
SET @@global.wsrep_convert_lock_to_trx='junk';
ERROR 42000: Variable 'wsrep_convert_LOCK_to_trx' can't be set to the value of 'junk'
# restore the initial value
SET @@global.wsrep_convert_lock_to_trx = @wsrep_convert_lock_to_trx_global_saved;
# End of test
SELECT COUNT(@@GLOBAL.wsrep_data_home_dir);
COUNT(@@GLOBAL.wsrep_data_home_dir)
1
1 Expected
SET @@GLOBAL.wsrep_data_home_dir=1;
ERROR HY000: Variable 'wsrep_data_home_dir' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.wsrep_data_home_dir);
COUNT(@@GLOBAL.wsrep_data_home_dir)
1
1 Expected
SELECT @@GLOBAL.wsrep_data_home_dir = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='wsrep_data_home_dir';
@@GLOBAL.wsrep_data_home_dir = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.wsrep_data_home_dir);
COUNT(@@GLOBAL.wsrep_data_home_dir)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='wsrep_data_home_dir';
COUNT(VARIABLE_VALUE)
1
1 Expected
SELECT @@wsrep_data_home_dir = @@GLOBAL.wsrep_data_home_dir;
@@wsrep_data_home_dir = @@GLOBAL.wsrep_data_home_dir
1
1 Expected
SELECT COUNT(@@wsrep_data_home_dir);
COUNT(@@wsrep_data_home_dir)
1
1 Expected
SELECT COUNT(@@local.wsrep_data_home_dir);
ERROR HY000: Variable 'wsrep_data_home_dir' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.wsrep_data_home_dir);
#
# wsrep_data_home_dir (readonly)
#
# default
SELECT @@global.wsrep_data_home_dir;
@@global.wsrep_data_home_dir
# scope
SELECT @@session.wsrep_data_home_dir;
ERROR HY000: Variable 'wsrep_data_home_dir' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.wsrep_data_home_dir);
COUNT(@@GLOBAL.wsrep_data_home_dir)
1
1 Expected
SELECT wsrep_data_home_dir = @@SESSION.wsrep_data_home_dir;
ERROR 42S22: Unknown column 'wsrep_data_home_dir' in 'field list'
Expected error 'Readonly variable'
SET @@global.wsrep_data_home_dir='/tmp/data';
ERROR HY000: Variable 'wsrep_data_home_dir' is a read only variable
SELECT @@global.wsrep_data_home_dir;
@@global.wsrep_data_home_dir
# valid values
SET @@global.wsrep_data_home_dir='/tmp/data';
ERROR HY000: Variable 'wsrep_data_home_dir' is a read only variable
SELECT @@global.wsrep_data_home_dir;
@@global.wsrep_data_home_dir
SET @@global.wsrep_data_home_dir=junk-dir;
ERROR HY000: Variable 'wsrep_data_home_dir' is a read only variable
SELECT @@global.wsrep_data_home_dir;
@@global.wsrep_data_home_dir
SET @@global.wsrep_data_home_dir=junk/dir;
ERROR HY000: Variable 'wsrep_data_home_dir' is a read only variable
SELECT @@global.wsrep_data_home_dir;
@@global.wsrep_data_home_dir
SET @@global.wsrep_data_home_dir=OFF;
ERROR HY000: Variable 'wsrep_data_home_dir' is a read only variable
SELECT @@global.wsrep_data_home_dir;
@@global.wsrep_data_home_dir
SET @@global.wsrep_data_home_dir=default;
ERROR HY000: Variable 'wsrep_data_home_dir' is a read only variable
SELECT @@global.wsrep_data_home_dir;
@@global.wsrep_data_home_dir
# invalid values
SET @@global.wsrep_data_home_dir=NULL;
ERROR HY000: Variable 'wsrep_data_home_dir' is a read only variable
# End of test
set @start_value = @@wsrep_dbug_option;
set @@global.wsrep_dbug_option='foo:bar';
set @@global.wsrep_dbug_option=NULL;
SET @@global.wsrep_dbug_option = -1;
#
# wsrep_dbug_option
#
# save the initial value
SET @wsrep_dbug_option_global_saved = @@global.wsrep_dbug_option;
# default
SELECT @@global.wsrep_dbug_option;
@@global.wsrep_dbug_option
# scope
SELECT @@session.wsrep_dbug_option;
ERROR HY000: Variable 'wsrep_dbug_option' is a GLOBAL variable
SET @@global.wsrep_dbug_option='test-dbug-string';
SELECT @@global.wsrep_dbug_option;
@@global.wsrep_dbug_option
test-dbug-string
# valid values
SET @@global.wsrep_dbug_option='quoted-dbug-string';
SELECT @@global.wsrep_dbug_option;
@@global.wsrep_dbug_option
quoted-dbug-string
SET @@global.wsrep_dbug_option=unquoted_dbug_string;
SELECT @@global.wsrep_dbug_option;
@@global.wsrep_dbug_option
unquoted_dbug_string
SET @@global.wsrep_dbug_option=OFF;
SELECT @@global.wsrep_dbug_option;
@@global.wsrep_dbug_option
OFF
SET @@global.wsrep_dbug_option=NULL;
SELECT @@global.wsrep_dbug_option;
@@global.wsrep_dbug_option
NULL
SET @@global.wsrep_dbug_option=default;
SELECT @@global.wsrep_dbug_option;
@@global.wsrep_dbug_option
# invalid values
SET @@global.wsrep_dbug_option=1;
ERROR 42000: Incorrect argument type to variable 'wsrep_dbug_option'
set @@global.wsrep_dbug_option = @start_value;
# restore the initial value
SET @@global.wsrep_dbug_option = @wsrep_dbug_option_global_saved;
# End of test
set @start_value = @@wsrep_debug;
set @@global.wsrep_debug=ON;
set @@global.wsrep_debug=OFF;
set @@global.wsrep_debug=1;
set @@global.wsrep_debug=0;
SET @@global.wsrep_debug = -1;
ERROR 42000: Variable 'wsrep_debug' can't be set to the value of '-1'
set @@global.wsrep_debug = @start_value;
#
# wsrep_debug
#
# save the initial value
SET @wsrep_debug_global_saved = @@global.wsrep_debug;
# default
SELECT @@global.wsrep_debug;
@@global.wsrep_debug
0
# scope
SELECT @@session.wsrep_debug;
ERROR HY000: Variable 'wsrep_debug' is a GLOBAL variable
SET @@global.wsrep_debug=OFF;
SELECT @@global.wsrep_debug;
@@global.wsrep_debug
0
SET @@global.wsrep_debug=ON;
SELECT @@global.wsrep_debug;
@@global.wsrep_debug
1
# valid values
SET @@global.wsrep_debug='OFF';
SELECT @@global.wsrep_debug;
@@global.wsrep_debug
0
SET @@global.wsrep_debug=ON;
SELECT @@global.wsrep_debug;
@@global.wsrep_debug
1
SET @@global.wsrep_debug=default;
SELECT @@global.wsrep_debug;
@@global.wsrep_debug
0
# invalid values
SET @@global.wsrep_debug=NULL;
ERROR 42000: Variable 'wsrep_debug' can't be set to the value of 'NULL'
SET @@global.wsrep_debug='junk';
ERROR 42000: Variable 'wsrep_debug' can't be set to the value of 'junk'
# restore the initial value
SET @@global.wsrep_debug = @wsrep_debug_global_saved;
# End of test
select @@global.wsrep_desync;
#
# wsrep_desync
#
call mtr.add_suppression("WSREP: SET desync failed 9 for SET @@global.wsrep_desync=ON");
# save the initial value
SET @wsrep_desync_global_saved = @@global.wsrep_desync;
# default
SELECT @@global.wsrep_desync;
@@global.wsrep_desync
0
# scope
SELECT @@session.wsrep_desync;
ERROR HY000: Variable 'wsrep_desync' is a GLOBAL variable
SET @@global.wsrep_desync=OFF;
Warnings:
Warning 1231 'wsrep_desync' is already OFF.
SELECT @@global.wsrep_desync;
@@global.wsrep_desync
0
SET @@global.wsrep_desync=ON;
ERROR HY000: Operation 'desync' failed for SET @@global.wsrep_desync=ON
SELECT @@global.wsrep_desync;
@@global.wsrep_desync
1
# valid values
SET @@global.wsrep_desync='OFF';
SELECT @@global.wsrep_desync;
@@global.wsrep_desync
0
SET @@global.wsrep_desync=ON;
ERROR HY000: Operation 'desync' failed for SET @@global.wsrep_desync=ON
SELECT @@global.wsrep_desync;
@@global.wsrep_desync
1
SET @@global.wsrep_desync=default;
SELECT @@global.wsrep_desync;
@@global.wsrep_desync
0
# invalid values
SET @@global.wsrep_desync=NULL;
ERROR 42000: Variable 'wsrep_desync' can't be set to the value of 'NULL'
SET @@global.wsrep_desync='junk';
ERROR 42000: Variable 'wsrep_desync' can't be set to the value of 'junk'
# restore the initial value
SET @@global.wsrep_desync = @wsrep_desync_global_saved;
Warnings:
Warning 1231 'wsrep_desync' is already OFF.
# End of test
set @start_value = @@wsrep_drupal_282555_workaround;
set @@global.wsrep_drupal_282555_workaround=ON;
set @@global.wsrep_drupal_282555_workaround=OFF;
set @@global.wsrep_drupal_282555_workaround=1;
set @@global.wsrep_drupal_282555_workaround=0;
SET @@global.wsrep_drupal_282555_workaround = -1;
ERROR 42000: Variable 'wsrep_drupal_282555_workaround' can't be set to the value of '-1'
set @@global.wsrep_drupal_282555_workaround = @start_value;
#
# wsrep_drupal_282555_workaround
#
# save the initial value
SET @wsrep_drupal_282555_workaround_global_saved = @@global.wsrep_drupal_282555_workaround;
# default
SELECT @@global.wsrep_drupal_282555_workaround;
@@global.wsrep_drupal_282555_workaround
0
# scope
SELECT @@session.wsrep_drupal_282555_workaround;
ERROR HY000: Variable 'wsrep_drupal_282555_workaround' is a GLOBAL variable
SET @@global.wsrep_drupal_282555_workaround=OFF;
SELECT @@global.wsrep_drupal_282555_workaround;
@@global.wsrep_drupal_282555_workaround
0
SET @@global.wsrep_drupal_282555_workaround=ON;
SELECT @@global.wsrep_drupal_282555_workaround;
@@global.wsrep_drupal_282555_workaround
1
# valid values
SET @@global.wsrep_drupal_282555_workaround='OFF';
SELECT @@global.wsrep_drupal_282555_workaround;
@@global.wsrep_drupal_282555_workaround
0
SET @@global.wsrep_drupal_282555_workaround=ON;
SELECT @@global.wsrep_drupal_282555_workaround;
@@global.wsrep_drupal_282555_workaround
1
SET @@global.wsrep_drupal_282555_workaround=default;
SELECT @@global.wsrep_drupal_282555_workaround;
@@global.wsrep_drupal_282555_workaround
0
# invalid values
SET @@global.wsrep_drupal_282555_workaround=NULL;
ERROR 42000: Variable 'wsrep_drupal_282555_workaround' can't be set to the value of 'NULL'
SET @@global.wsrep_drupal_282555_workaround='junk';
ERROR 42000: Variable 'wsrep_drupal_282555_workaround' can't be set to the value of 'junk'
# restore the initial value
SET @@global.wsrep_drupal_282555_workaround = @wsrep_drupal_282555_workaround_global_saved;
# End of test
set @start_value = @@wsrep_forced_binlog_format;
set @@global.wsrep_forced_binlog_format = ROW;
set @@global.wsrep_forced_binlog_format = MIXED;
set @@global.wsrep_forced_binlog_format = STATEMENT;
set @@global.wsrep_forced_binlog_format = NONE;
set @@global.wsrep_forced_binlog_format = FOO;
ERROR 42000: Variable 'wsrep_forced_binlog_format' can't be set to the value of 'FOO'
set @@global.wsrep_forced_binlog_format = @start_value;
#
# wsrep_forced_binlog_format
#
# save the initial value
SET @wsrep_forced_binlog_format_global_saved = @@global.wsrep_forced_binlog_format;
# default
SELECT @@global.wsrep_forced_binlog_format;
@@global.wsrep_forced_binlog_format
NONE
# scope
SELECT @@session.wsrep_forced_binlog_format;
ERROR HY000: Variable 'wsrep_forced_binlog_format' is a GLOBAL variable
SET @@global.wsrep_forced_binlog_format=STATEMENT;
SELECT @@global.wsrep_forced_binlog_format;
@@global.wsrep_forced_binlog_format
STATEMENT
# valid values
SET @@global.wsrep_forced_binlog_format=STATEMENT;
SELECT @@global.wsrep_forced_binlog_format;
@@global.wsrep_forced_binlog_format
STATEMENT
SET @@global.wsrep_forced_binlog_format=ROW;
SELECT @@global.wsrep_forced_binlog_format;
@@global.wsrep_forced_binlog_format
ROW
SET @@global.wsrep_forced_binlog_format=MIXED;
SELECT @@global.wsrep_forced_binlog_format;
@@global.wsrep_forced_binlog_format
MIXED
SET @@global.wsrep_forced_binlog_format=NONE;
SELECT @@global.wsrep_forced_binlog_format;
@@global.wsrep_forced_binlog_format
NONE
SET @@global.wsrep_forced_binlog_format=default;
SELECT @@global.wsrep_forced_binlog_format;
@@global.wsrep_forced_binlog_format
NONE
# invalid values
SET @@global.wsrep_forced_binlog_format=NULL;
ERROR 42000: Variable 'wsrep_forced_binlog_format' can't be set to the value of 'NULL'
SET @@global.wsrep_forced_binlog_format='junk';
ERROR 42000: Variable 'wsrep_forced_binlog_format' can't be set to the value of 'junk'
SET @@global.wsrep_forced_binlog_format=ON;
ERROR 42000: Variable 'wsrep_forced_binlog_format' can't be set to the value of 'ON'
# restore the initial value
SET @@global.wsrep_forced_binlog_format = @wsrep_forced_binlog_format_global_saved;
# End of test
set @start_value = @@wsrep_load_data_splitting;
set @@global.wsrep_load_data_splitting=ON;
set @@global.wsrep_load_data_splitting=OFF;
set @@global.wsrep_load_data_splitting=1;
set @@global.wsrep_load_data_splitting=0;
SET @@global.wsrep_load_data_splitting = -1;
ERROR 42000: Variable 'wsrep_load_data_splitting' can't be set to the value of '-1'
set @@global.wsrep_load_data_splitting = @start_value;
#
# wsrep_load_data_splitting
#
# save the initial value
SET @wsrep_load_data_splitting_global_saved = @@global.wsrep_load_data_splitting;
# default
SELECT @@global.wsrep_load_data_splitting;
@@global.wsrep_load_data_splitting
1
# scope
SELECT @@session.wsrep_load_data_splitting;
ERROR HY000: Variable 'wsrep_load_data_splitting' is a GLOBAL variable
SET @@global.wsrep_load_data_splitting=OFF;
SELECT @@global.wsrep_load_data_splitting;
@@global.wsrep_load_data_splitting
0
SET @@global.wsrep_load_data_splitting=ON;
SELECT @@global.wsrep_load_data_splitting;
@@global.wsrep_load_data_splitting
1
# valid values
SET @@global.wsrep_load_data_splitting='OFF';
SELECT @@global.wsrep_load_data_splitting;
@@global.wsrep_load_data_splitting
0
SET @@global.wsrep_load_data_splitting=ON;
SELECT @@global.wsrep_load_data_splitting;
@@global.wsrep_load_data_splitting
1
SET @@global.wsrep_load_data_splitting=default;
SELECT @@global.wsrep_load_data_splitting;
@@global.wsrep_load_data_splitting
1
# invalid values
SET @@global.wsrep_load_data_splitting=NULL;
ERROR 42000: Variable 'wsrep_load_data_splitting' can't be set to the value of 'NULL'
SET @@global.wsrep_load_data_splitting='junk';
ERROR 42000: Variable 'wsrep_load_data_splitting' can't be set to the value of 'junk'
# restore the initial value
SET @@global.wsrep_load_data_splitting = @wsrep_load_data_splitting_global_saved;
# End of test
set @start_value = @@wsrep_log_conflicts;
set @@global.wsrep_log_conflicts=ON;
set @@global.wsrep_log_conflicts=OFF;
set @@global.wsrep_log_conflicts=1;
set @@global.wsrep_log_conflicts=0;
SET @@global.wsrep_log_conflicts = -1;
ERROR 42000: Variable 'wsrep_log_conflicts' can't be set to the value of '-1'
set @@global.wsrep_log_conflicts = @start_value;
#
# wsrep_log_conflicts
#
# save the initial value
SET @wsrep_log_conflicts_global_saved = @@global.wsrep_log_conflicts;
# default
SELECT @@global.wsrep_log_conflicts;
@@global.wsrep_log_conflicts
0
# scope
SELECT @@session.wsrep_log_conflicts;
ERROR HY000: Variable 'wsrep_log_conflicts' is a GLOBAL variable
SET @@global.wsrep_log_conflicts=OFF;
SELECT @@global.wsrep_log_conflicts;
@@global.wsrep_log_conflicts
0
SET @@global.wsrep_log_conflicts=ON;
SELECT @@global.wsrep_log_conflicts;
@@global.wsrep_log_conflicts
1
# valid values
SET @@global.wsrep_log_conflicts='OFF';
SELECT @@global.wsrep_log_conflicts;
@@global.wsrep_log_conflicts
0
SET @@global.wsrep_log_conflicts=ON;
SELECT @@global.wsrep_log_conflicts;
@@global.wsrep_log_conflicts
1
SET @@global.wsrep_log_conflicts=default;
SELECT @@global.wsrep_log_conflicts;
@@global.wsrep_log_conflicts
0
# invalid values
SET @@global.wsrep_log_conflicts=NULL;
ERROR 42000: Variable 'wsrep_log_conflicts' can't be set to the value of 'NULL'
SET @@global.wsrep_log_conflicts='junk';
ERROR 42000: Variable 'wsrep_log_conflicts' can't be set to the value of 'junk'
# restore the initial value
SET @@global.wsrep_log_conflicts = @wsrep_log_conflicts_global_saved;
# End of test
set @start_value = @@wsrep_max_ws_rows;
set @@global.wsrep_max_ws_rows=256000;
set @@global.wsrep_max_ws_rows=0;
#
# wsrep_max_ws_rows
#
# save the initial value
SET @wsrep_max_ws_rows_global_saved = @@global.wsrep_max_ws_rows;
# default
SELECT @@global.wsrep_max_ws_rows;
@@global.wsrep_max_ws_rows
131072
# scope
SELECT @@session.wsrep_max_ws_rows;
ERROR HY000: Variable 'wsrep_max_ws_rows' is a GLOBAL variable
SET @@global.wsrep_max_ws_rows=1;
SELECT @@global.wsrep_max_ws_rows;
@@global.wsrep_max_ws_rows
1
# valid values
SET @@global.wsrep_max_ws_rows=131072;
SELECT @@global.wsrep_max_ws_rows;
@@global.wsrep_max_ws_rows
131072
SET @@global.wsrep_max_ws_rows=131073;
SELECT @@global.wsrep_max_ws_rows;
@@global.wsrep_max_ws_rows
131073
SET @@global.wsrep_max_ws_rows=0;
Warnings:
Warning 1292 Truncated incorrect wsrep_max_ws_rows value: '0'
show warnings;
Level Code Message
Warning 1292 Truncated incorrect wsrep_max_ws_rows value: '0'
set @@global.wsrep_max_ws_rows=-1;
SELECT @@global.wsrep_max_ws_rows;
@@global.wsrep_max_ws_rows
1
SET @@global.wsrep_max_ws_rows=default;
SELECT @global.wsrep_max_ws_rows;
@global.wsrep_max_ws_rows
NULL
# invalid values
SET @@global.wsrep_max_ws_rows=NULL;
ERROR 42000: Incorrect argument type to variable 'wsrep_max_ws_rows'
SET @@global.wsrep_max_ws_rows='junk';
ERROR 42000: Incorrect argument type to variable 'wsrep_max_ws_rows'
SET @@global.wsrep_max_ws_rows=-1;
Warnings:
Warning 1292 Truncated incorrect wsrep_max_ws_rows value: '-1'
show warnings;
Level Code Message
Warning 1292 Truncated incorrect wsrep_max_ws_rows value: '-1'
SET @@global.wsrep_max_ws_rows = r;
ERROR 42000: Incorrect argument type to variable 'wsrep_max_ws_rows'
set @@global.wsrep_max_ws_rows = @start_value;
SELECT @global.wsrep_max_ws_rows;
@global.wsrep_max_ws_rows
NULL
# restore the initial value
SET @@global.wsrep_max_ws_rows = @wsrep_max_ws_rows_global_saved;
# End of test
set @start_value = @@wsrep_max_ws_size;
set @@global.wsrep_max_ws_size=256000;
set @@global.wsrep_max_ws_size=0;
#
# wsrep_max_ws_size
#
# save the initial value
SET @wsrep_max_ws_size_global_saved = @@global.wsrep_max_ws_size;
# default
SELECT @@global.wsrep_max_ws_size;
@@global.wsrep_max_ws_size
1073741824
# scope
SELECT @@session.wsrep_max_ws_size;
ERROR HY000: Variable 'wsrep_max_ws_size' is a GLOBAL variable
SET @@global.wsrep_max_ws_size=1;
Warnings:
Warning 1292 Truncated incorrect wsrep_max_ws_size value: '1'
SELECT @@global.wsrep_max_ws_size;
@@global.wsrep_max_ws_size
1024
# valid values
SET @@global.wsrep_max_ws_size=1073741824;
SELECT @@global.wsrep_max_ws_size;
@@global.wsrep_max_ws_size
1073741824
SET @@global.wsrep_max_ws_size=1073741825;
SELECT @@global.wsrep_max_ws_size;
@@global.wsrep_max_ws_size
1073741825
SET @@global.wsrep_max_ws_size=0;
Warnings:
Warning 1292 Truncated incorrect wsrep_max_ws_size value: '0'
show warnings;
Level Code Message
Warning 1292 Truncated incorrect wsrep_max_ws_size value: '0'
set @@global.wsrep_max_ws_size=-1;
SELECT @@global.wsrep_max_ws_size;
@@global.wsrep_max_ws_size
1024
SET @@global.wsrep_max_ws_size=default;
SELECT @global.wsrep_max_ws_size;
@global.wsrep_max_ws_size
NULL
# invalid values
SET @@global.wsrep_max_ws_size=NULL;
ERROR 42000: Incorrect argument type to variable 'wsrep_max_ws_size'
SET @@global.wsrep_max_ws_size='junk';
ERROR 42000: Incorrect argument type to variable 'wsrep_max_ws_size'
SELECT @global.wsrep_max_ws_size;
@global.wsrep_max_ws_size
NULL
SET @@global.wsrep_max_ws_size=-1;
Warnings:
Warning 1292 Truncated incorrect wsrep_max_ws_size value: '-1'
show warnings;
Level Code Message
Warning 1292 Truncated incorrect wsrep_max_ws_size value: '-1'
SET @@global.wsrep_max_ws_size = r;
ERROR 42000: Incorrect argument type to variable 'wsrep_max_ws_size'
set @@global.wsrep_max_ws_size = @start_value;
SELECT @global.wsrep_max_ws_size;
@global.wsrep_max_ws_size
NULL
# restore the initial value
SET @@global.wsrep_max_ws_size = @wsrep_max_ws_size_global_saved;
# End of test
set @start_value = @@wsrep_mysql_replication_bundle;
set @@global.wsrep_mysql_replication_bundle=0;
set @@global.wsrep_mysql_replication_bundle=1000;
set @@global.wsrep_mysql_replication_bundle=-1;
#
# wsrep_mysql_replication_bundle
#
# save the initial value
SET @wsrep_mysql_replication_bundle_global_saved = @@global.wsrep_mysql_replication_bundle;
# default
SELECT @@global.wsrep_mysql_replication_bundle;
@@global.wsrep_mysql_replication_bundle
0
# scope
SELECT @@session.wsrep_mysql_replication_bundle;
ERROR HY000: Variable 'wsrep_mysql_replication_bundle' is a GLOBAL variable
SELECT @@global.wsrep_mysql_replication_bundle;
@@global.wsrep_mysql_replication_bundle
0
# valid values
SET @@global.wsrep_mysql_replication_bundle=0;
SELECT @@global.wsrep_mysql_replication_bundle;
@@global.wsrep_mysql_replication_bundle
0
SET @@global.wsrep_mysql_replication_bundle=1000;
SELECT @@global.wsrep_mysql_replication_bundle;
@@global.wsrep_mysql_replication_bundle
1000
SET @@global.wsrep_mysql_replication_bundle=default;
SELECT @@global.wsrep_mysql_replication_bundle;
@@global.wsrep_mysql_replication_bundle
0
# invalid values
SET @@global.wsrep_mysql_replication_bundle=NULL;
ERROR 42000: Incorrect argument type to variable 'wsrep_mysql_replication_bundle'
SET @@global.wsrep_mysql_replication_bundle='junk';
ERROR 42000: Incorrect argument type to variable 'wsrep_mysql_replication_bundle'
SET @@global.wsrep_mysql_replication_bundle=-1;
Warnings:
Warning 1292 Truncated incorrect wsrep_mysql_replication_bundle value: '-1'
show warnings;
Level Code Message
Warning 1292 Truncated incorrect wsrep_mysql_replication_bundle value: '-1'
set @@global.wsrep_mysql_replication_bundle=1001;
SELECT @@global.wsrep_mysql_replication_bundle;
@@global.wsrep_mysql_replication_bundle
0
SET @@global.wsrep_mysql_replication_bundle=1001;
Warnings:
Warning 1292 Truncated incorrect wsrep_mysql_replication_bundle value: '1001'
show warnings;
Level Code Message
Warning 1292 Truncated incorrect wsrep_mysql_replication_bundle value: '1001'
SET @@global.wsrep_mysql_replication_bundle = r;
ERROR 42000: Incorrect argument type to variable 'wsrep_mysql_replication_bundle'
set @@global.wsrep_mysql_replication_bundle = @start_value;
SELECT @@global.wsrep_mysql_replication_bundle;
@@global.wsrep_mysql_replication_bundle
1000
# restore the initial value
SET @@global.wsrep_mysql_replication_bundle = @wsrep_mysql_replication_bundle_global_saved;
# End of test
SELECT COUNT(@@GLOBAL.wsrep_node_address);
COUNT(@@GLOBAL.wsrep_node_address)
1
1 Expected
SET @@GLOBAL.wsrep_node_address=1;
ERROR 42000: Incorrect argument type to variable 'wsrep_node_address'
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.wsrep_node_address);
COUNT(@@GLOBAL.wsrep_node_address)
1
1 Expected
SELECT @@GLOBAL.wsrep_node_address = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='wsrep_node_address';
@@GLOBAL.wsrep_node_address = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.wsrep_node_address);
COUNT(@@GLOBAL.wsrep_node_address)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='wsrep_node_address';
COUNT(VARIABLE_VALUE)
1
1 Expected
SELECT @@wsrep_node_address = @@GLOBAL.wsrep_node_address;
@@wsrep_node_address = @@GLOBAL.wsrep_node_address
1
1 Expected
SELECT COUNT(@@wsrep_node_address);
COUNT(@@wsrep_node_address)
1
1 Expected
SELECT COUNT(@@local.wsrep_node_address);
#
# wsrep_node_address
#
# save the initial value
SET @wsrep_node_address_global_saved = @@global.wsrep_node_address;
# default
SELECT @@global.wsrep_node_address;
@@global.wsrep_node_address
# scope
SELECT @@session.wsrep_node_address;
ERROR HY000: Variable 'wsrep_node_address' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.wsrep_node_address);
ERROR HY000: Variable 'wsrep_node_address' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.wsrep_node_address);
COUNT(@@GLOBAL.wsrep_node_address)
1
1 Expected
SELECT @@global.wsrep_node_address;
@@global.wsrep_node_address
# valid values
SET @@global.wsrep_node_address='127.0.0.1';
SELECT @@global.wsrep_node_address;
@@global.wsrep_node_address
127.0.0.1
SET @@global.wsrep_node_address=default;
SELECT @@global.wsrep_node_address;
@@global.wsrep_node_address
# invalid values
SET @@global.wsrep_node_address=NULL;
ERROR 42000: Variable 'wsrep_node_address' can't be set to the value of 'NULL'
SELECT @@global.wsrep_node_address;
@@global.wsrep_node_address
SET @@global.wsrep_node_address=ON;
SELECT @@global.wsrep_node_address;
@@global.wsrep_node_address
ON
SET @@global.wsrep_node_address='OFF';
SELECT @@global.wsrep_node_address;
@@global.wsrep_node_address
OFF
SET @@global.wsrep_node_address='junk';
SELECT @@global.wsrep_node_address;
@@global.wsrep_node_address
junk
# restore the initial value
SET @@global.wsrep_node_address = @wsrep_node_address_global_saved;
# End of test
SELECT COUNT(@@GLOBAL.wsrep_node_incoming_address);
COUNT(@@GLOBAL.wsrep_node_incoming_address)
1
1 Expected
SET @@GLOBAL.wsrep_node_incoming_address=1;
ERROR 42000: Incorrect argument type to variable 'wsrep_node_incoming_address'
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.wsrep_node_incoming_address);
COUNT(@@GLOBAL.wsrep_node_incoming_address)
1
1 Expected
SELECT @@GLOBAL.wsrep_node_incoming_address = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='wsrep_node_incoming_address';
@@GLOBAL.wsrep_node_incoming_address = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.wsrep_node_incoming_address);
COUNT(@@GLOBAL.wsrep_node_incoming_address)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='wsrep_node_incoming_address';
COUNT(VARIABLE_VALUE)
1
1 Expected
SELECT @@wsrep_node_incoming_address = @@GLOBAL.wsrep_node_incoming_address;
@@wsrep_node_incoming_address = @@GLOBAL.wsrep_node_incoming_address
1
1 Expected
SELECT COUNT(@@wsrep_node_incoming_address);
COUNT(@@wsrep_node_incoming_address)
1
1 Expected
SELECT COUNT(@@local.wsrep_node_incoming_address);
#
# wsrep_node_incoming_address
#
# save the initial value
SET @wsrep_node_incoming_address_global_saved = @@global.wsrep_node_incoming_address;
# default
SELECT @@global.wsrep_node_incoming_address;
@@global.wsrep_node_incoming_address
AUTO
# scope
SELECT @@session.wsrep_node_incoming_address;
ERROR HY000: Variable 'wsrep_node_incoming_address' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.wsrep_node_incoming_address);
ERROR HY000: Variable 'wsrep_node_incoming_address' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.wsrep_node_incoming_address);
COUNT(@@GLOBAL.wsrep_node_incoming_address)
1
1 Expected
SELECT @@global.wsrep_node_incoming_address;
@@global.wsrep_node_incoming_address
AUTO
# valid values
SET @@global.wsrep_node_incoming_address='127.0.0.1:4444';
SELECT @@global.wsrep_node_incoming_address;
@@global.wsrep_node_incoming_address
127.0.0.1:4444
SET @@global.wsrep_node_incoming_address='127.0.0.1';
SELECT @@global.wsrep_node_incoming_address;
@@global.wsrep_node_incoming_address
127.0.0.1
SET @@global.wsrep_node_incoming_address=AUTO;
SELECT @@global.wsrep_node_incoming_address;
@@global.wsrep_node_incoming_address
AUTO
SET @@global.wsrep_node_incoming_address=default;
SELECT @@global.wsrep_node_incoming_address;
@@global.wsrep_node_incoming_address
AUTO
# invalid values
SET @@global.wsrep_node_incoming_address=ON;
SELECT @@global.wsrep_node_incoming_address;
@@global.wsrep_node_incoming_address
ON
SET @@global.wsrep_node_incoming_address='OFF';
SELECT @@global.wsrep_node_incoming_address;
@@global.wsrep_node_incoming_address
OFF
SET @@global.wsrep_node_incoming_address=NULL;
SELECT @@global.wsrep_node_incoming_address;
@@global.wsrep_node_incoming_address
NULL
SET @@global.wsrep_node_incoming_address='junk';
SELECT @@global.wsrep_node_incoming_address;
@@global.wsrep_node_incoming_address
junk
# restore the initial value
SET @@global.wsrep_node_incoming_address = @wsrep_node_incoming_address_global_saved;
# End of test
set @start_value = @@wsrep_node_name;
set @@global.wsrep_node_name='test';
set @@global.wsrep_node_name=NULL;
SET @@global.wsrep_node_name = 1;
#
# wsrep_node_name
#
call mtr.add_suppression("WSREP: Failed to get provider options");
# save the initial value
SET @wsrep_node_name_global_saved = @@global.wsrep_node_name;
# default
SELECT @@global.wsrep_node_name;
@@global.wsrep_node_name
# scope
SELECT @@session.wsrep_node_name;
ERROR HY000: Variable 'wsrep_node_name' is a GLOBAL variable
SET @@global.wsrep_node_name='node_name';
SELECT @@global.wsrep_node_name;
@@global.wsrep_node_name
node_name
# valid values
SET @@global.wsrep_node_name='my_node';
SELECT @@global.wsrep_node_name;
@@global.wsrep_node_name
my_node
SET @@global.wsrep_node_name='hyphenated-node-name';
SELECT @@global.wsrep_node_name;
@@global.wsrep_node_name
hyphenated-node-name
SET @@global.wsrep_node_name=default;
SELECT @@global.wsrep_node_name;
@@global.wsrep_node_name
# invalid values
SET @@global.wsrep_node_name=NULL;
ERROR 42000: Variable 'wsrep_node_name' can't be set to the value of 'NULL'
SELECT @@global.wsrep_node_name;
@@global.wsrep_node_name
SET @@global.wsrep_node_name=1;
ERROR 42000: Incorrect argument type to variable 'wsrep_node_name'
set @@global.wsrep_node_name = @start_value;
SELECT @@global.wsrep_node_name;
@@global.wsrep_node_name
# restore the initial value
SET @@global.wsrep_node_name = @wsrep_node_name_global_saved;
# End of test
set @start_value = @@wsrep_notify_cmd;
set @@global.wsrep_notify_cmd='test';
set @@global.wsrep_notify_cmd=NULL;
SET @@global.wsrep_notify_cmd = 1;
#
# wsrep_notify_cmd
#
call mtr.add_suppression("WSREP: Failed to get provider options");
# save the initial value
SET @wsrep_notify_cmd_global_saved = @@global.wsrep_notify_cmd;
# default
SELECT @@global.wsrep_notify_cmd;
@@global.wsrep_notify_cmd
# scope
SELECT @@session.wsrep_notify_cmd;
ERROR HY000: Variable 'wsrep_notify_cmd' is a GLOBAL variable
SET @@global.wsrep_notify_cmd='notify_cmd';
SELECT @@global.wsrep_notify_cmd;
@@global.wsrep_notify_cmd
notify_cmd
# valid values
SET @@global.wsrep_notify_cmd='command';
SELECT @@global.wsrep_notify_cmd;
@@global.wsrep_notify_cmd
command
SET @@global.wsrep_notify_cmd='hyphenated-command';
SELECT @@global.wsrep_notify_cmd;
@@global.wsrep_notify_cmd
hyphenated-command
SET @@global.wsrep_notify_cmd=default;
SELECT @@global.wsrep_notify_cmd;
@@global.wsrep_notify_cmd
SET @@global.wsrep_notify_cmd=NULL;
SELECT @@global.wsrep_notify_cmd;
@@global.wsrep_notify_cmd
NULL
# invalid values
SET @@global.wsrep_notify_cmd=1;
ERROR 42000: Incorrect argument type to variable 'wsrep_notify_cmd'
set @@global.wsrep_notify_cmd = @start_value;
SELECT @@global.wsrep_notify_cmd;
@@global.wsrep_notify_cmd
NULL
# restore the initial value
SET @@global.wsrep_notify_cmd = @wsrep_notify_cmd_global_saved;
# End of test
set @start_value = @@wsrep_on;
set @@global.wsrep_on=ON;
set @@global.wsrep_on=OFF;
set @@global.wsrep_on=1;
set @@global.wsrep_on=0;
SET @@global.wsrep_on = -1;
ERROR 42000: Variable 'wsrep_on' can't be set to the value of '-1'
set @@global.wsrep_on = @start_value;
#
# wsrep_on
#
# save the initial values
SET @wsrep_on_global_saved = @@global.wsrep_on;
SET @wsrep_on_session_saved = @@session.wsrep_on;
# default
SELECT @@global.wsrep_on;
@@global.wsrep_on
0
SELECT @@session.wsrep_on;
@@session.wsrep_on
0
# scope and valid values
SET @@global.wsrep_on=OFF;
SELECT @@global.wsrep_on;
@@global.wsrep_on
0
SET @@global.wsrep_on=ON;
SELECT @@global.wsrep_on;
@@global.wsrep_on
1
SET @@session.wsrep_on=OFF;
SELECT @@session.wsrep_on;
@@session.wsrep_on
0
SET @@session.wsrep_on=ON;
SELECT @@session.wsrep_on;
@@session.wsrep_on
1
SET @@session.wsrep_on=default;
SELECT @@session.wsrep_on;
@@session.wsrep_on
1
# invalid values
SET @@global.wsrep_on=NULL;
ERROR 42000: Variable 'wsrep_on' can't be set to the value of 'NULL'
SET @@global.wsrep_on='junk';
ERROR 42000: Variable 'wsrep_on' can't be set to the value of 'junk'
SET @@session.wsrep_on=NULL;
ERROR 42000: Variable 'wsrep_on' can't be set to the value of 'NULL'
SET @@session.wsrep_on='junk';
ERROR 42000: Variable 'wsrep_on' can't be set to the value of 'junk'
# restore the initial values
SET @@global.wsrep_on = @wsrep_on_global_saved;
SET @@session.wsrep_on = @wsrep_on_session_saved;
# End of test
set @start_value = @@wsrep_osu_method;
set @@global.wsrep_osu_method='TOI';
set @@global.wsrep_osu_method='RSU';
set @@global.wsrep_osu_method=TOI;
set @@global.wsrep_osu_method=RSU;
set @@global.wsrep_osu_method=TSU;
ERROR 42000: Variable 'wsrep_OSU_method' can't be set to the value of 'TSU'
set @@global.wsrep_osu_method='TSU';
ERROR 42000: Variable 'wsrep_OSU_method' can't be set to the value of 'TSU'
SET @@global.wsrep_on = -1;
ERROR 42000: Variable 'wsrep_on' can't be set to the value of '-1'
set @@global.wsrep_osu_method = @start_value;
#
# wsrep_osu_method
#
# save the initial value
SET @wsrep_osu_method_global_saved = @@global.wsrep_osu_method;
# default
SELECT @@global.wsrep_osu_method;
@@global.wsrep_osu_method
TOI
# scope
SELECT @@session.wsrep_osu_method;
ERROR HY000: Variable 'wsrep_OSU_method' is a GLOBAL variable
SET @@global.wsrep_osu_method=TOI;
SELECT @@global.wsrep_osu_method;
@@global.wsrep_osu_method
TOI
# valid values
SET @@global.wsrep_osu_method=TOI;
SELECT @@global.wsrep_osu_method;
@@global.wsrep_osu_method
TOI
SET @@global.wsrep_osu_method=RSU;
SELECT @@global.wsrep_osu_method;
@@global.wsrep_osu_method
RSU
SET @@global.wsrep_osu_method="RSU";
SELECT @@global.wsrep_osu_method;
@@global.wsrep_osu_method
RSU
SET @@global.wsrep_osu_method=default;
SELECT @@global.wsrep_osu_method;
@@global.wsrep_osu_method
TOI
SET @@global.wsrep_osu_method=1;
SELECT @@global.wsrep_osu_method;
@@global.wsrep_osu_method
RSU
# invalid values
SET @@global.wsrep_osu_method=4;
ERROR 42000: Variable 'wsrep_OSU_method' can't be set to the value of '4'
SELECT @@global.wsrep_osu_method;
@@global.wsrep_osu_method
RSU
SET @@global.wsrep_osu_method=NULL;
ERROR 42000: Variable 'wsrep_OSU_method' can't be set to the value of 'NULL'
SELECT @@global.wsrep_osu_method;
@@global.wsrep_osu_method
RSU
SET @@global.wsrep_osu_method='junk';
ERROR 42000: Variable 'wsrep_OSU_method' can't be set to the value of 'junk'
SELECT @@global.wsrep_osu_method;
@@global.wsrep_osu_method
RSU
# restore the initial value
SET @@global.wsrep_osu_method = @wsrep_osu_method_global_saved;
# End of test
SELECT COUNT(@@GLOBAL.wsrep_provider);
COUNT(@@GLOBAL.wsrep_provider)
1
1 Expected
#
# wsrep_provider
#
# save the initial value
SET @wsrep_provider_global_saved = @@global.wsrep_provider;
# default
SELECT @@global.wsrep_provider;
@@global.wsrep_provider
none
# scope
SELECT @@session.wsrep_provider;
ERROR HY000: Variable 'wsrep_provider' is a GLOBAL variable
SELECT @@global.wsrep_provider;
@@global.wsrep_provider
none
# valid values
SET @@global.wsrep_provider=default;
SELECT @@global.wsrep_provider;
@@global.wsrep_provider
none
# invalid values
SET @@global.wsrep_provider='/invalid/libgalera_smm.so';
ERROR 42000: Variable 'wsrep_provider' can't be set to the value of '/invalid/libgalera_smm.so'
SET @@global.wsrep_provider=NULL;
ERROR 42000: Variable 'wsrep_provider' can't be set to the value of 'NULL'
SELECT @@global.wsrep_provider;
@@global.wsrep_provider
none
SET @@global.wsrep_provider=1;
ERROR 42000: Incorrect argument type to variable 'wsrep_provider'
SELECT @@global.wsrep_provider;
@@global.wsrep_provider
none
# restore the initial value
SET @@global.wsrep_provider = @wsrep_provider_global_saved;
# End of test
SELECT COUNT(@@GLOBAL.wsrep_provider_options);
COUNT(@@GLOBAL.wsrep_provider_options)
1
1 Expected
#
# wsrep_provider_options
#
call mtr.add_suppression("WSREP: Failed to get provider options");
# save the initial value
SET @wsrep_provider_options_global_saved = @@global.wsrep_provider_options;
# default
SELECT @@global.wsrep_provider_options;
@@global.wsrep_provider_options
# scope
SELECT @@session.wsrep_provider_options;
ERROR HY000: Variable 'wsrep_provider_options' is a GLOBAL variable
SET @@global.wsrep_provider_options='option1';
SELECT @@global.wsrep_provider_options;
@@global.wsrep_provider_options
option1
# valid values
SET @@global.wsrep_provider_options='name1=value1;name2=value2';
SELECT @@global.wsrep_provider_options;
@@global.wsrep_provider_options
name1=value1;name2=value2
SET @@global.wsrep_provider_options='hyphenated-name:value';
SELECT @@global.wsrep_provider_options;
@@global.wsrep_provider_options
hyphenated-name:value
SET @@global.wsrep_provider_options=default;
SELECT @@global.wsrep_provider_options;
@@global.wsrep_provider_options
# invalid values
SET @@global.wsrep_provider_options=1;
ERROR 42000: Incorrect argument type to variable 'wsrep_provider_options'
SELECT @@global.wsrep_provider_options;
@@global.wsrep_provider_options
SET @@global.wsrep_provider_options=NULL;
ERROR HY000: Incorrect arguments to SET
SELECT @@global.wsrep_provider_options;
@@global.wsrep_provider_options
NULL
# restore the initial value
SET @@global.wsrep_provider_options = @wsrep_provider_options_global_saved;
# End of test
SELECT COUNT(@@GLOBAL.wsrep_recover);
COUNT(@@GLOBAL.wsrep_recover)
1
1 Expected
set @@global.wsrep_recover=ON;
#
# wsrep_recover
#
# default
SELECT @@global.wsrep_recover;
@@global.wsrep_recover
0
SELECT @@session.wsrep_recover;
ERROR HY000: Variable 'wsrep_recover' is a GLOBAL variable
# scope and valid values
SET @@global.wsrep_recover=OFF;
ERROR HY000: Variable 'wsrep_recover' is a read only variable
Expected error 'Readonly variable'
set @@global.wsrep_recover=OFF;
SET @@global.wsrep_recover=ON;
ERROR HY000: Variable 'wsrep_recover' is a read only variable
Expected error 'Readonly variable'
SELECT @@GLOBAL.wsrep_recover = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='wsrep_recover';
@@GLOBAL.wsrep_recover = VARIABLE_VALUE
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'OFF'
1 Expected
SELECT COUNT(@@GLOBAL.wsrep_recover);
COUNT(@@GLOBAL.wsrep_recover)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='wsrep_recover';
COUNT(VARIABLE_VALUE)
1
1 Expected
SELECT @@wsrep_recover = @@GLOBAL.wsrep_recover;
@@wsrep_recover = @@GLOBAL.wsrep_recover
1
1 Expected
SELECT COUNT(@@wsrep_recover);
COUNT(@@wsrep_recover)
1
1 Expected
SELECT COUNT(@@local.wsrep_recover);
ERROR HY000: Variable 'wsrep_recover' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.wsrep_recover);
ERROR HY000: Variable 'wsrep_recover' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.wsrep_recover);
COUNT(@@GLOBAL.wsrep_recover)
1
1 Expected
SELECT wsrep_recover = @@SESSION.wsrep_recover;
ERROR 42S22: Unknown column 'wsrep_recover' in 'field list'
Expected error 'Readonly variable'
# invalid values
SET @@global.wsrep_recover=NULL;
ERROR HY000: Variable 'wsrep_recover' is a read only variable
SET @@global.wsrep_recover='junk';
ERROR HY000: Variable 'wsrep_recover' is a read only variable
# End of test
set @start_value = @@wsrep_replicate_myisam;
set @@global.wsrep_replicate_myisam=ON;
set @@global.wsrep_replicate_myisam=OFF;
set @@global.wsrep_replicate_myisam=1;
set @@global.wsrep_replicate_myisam=0;
SET @@global.wsrep_replicate_myisam = -1;
ERROR 42000: Variable 'wsrep_replicate_myisam' can't be set to the value of '-1'
set @@global.wsrep_replicate_myisam = @start_value;
#
# wsrep_replicate_myisam
#
# save the initial value
SET @wsrep_replicate_myisam_global_saved = @@global.wsrep_replicate_myisam;
# default
SELECT @@global.wsrep_replicate_myisam;
@@global.wsrep_replicate_myisam
0
SELECT @@session.wsrep_replicate_myisam;
ERROR HY000: Variable 'wsrep_replicate_myisam' is a GLOBAL variable
# scope and valid values
SET @@global.wsrep_replicate_myisam=OFF;
SELECT @@global.wsrep_replicate_myisam;
@@global.wsrep_replicate_myisam
0
SET @@global.wsrep_replicate_myisam=ON;
SELECT @@global.wsrep_replicate_myisam;
@@global.wsrep_replicate_myisam
1
# invalid values
SET @@global.wsrep_replicate_myisam=NULL;
ERROR 42000: Variable 'wsrep_replicate_myisam' can't be set to the value of 'NULL'
SET @@global.wsrep_replicate_myisam='junk';
ERROR 42000: Variable 'wsrep_replicate_myisam' can't be set to the value of 'junk'
# restore the initial value
SET @@global.wsrep_replicate_myisam = @wsrep_replicate_myisam_global_saved;
# End of test
set @start_value = @@wsrep_restart_slave;
set @@global.wsrep_restart_slave=ON;
set @@global.wsrep_restart_slave=OFF;
set @@global.wsrep_restart_slave=1;
set @@global.wsrep_restart_slave=0;
SET @@global.wsrep_restart_slave = -1;
ERROR 42000: Variable 'wsrep_restart_slave' can't be set to the value of '-1'
set @@global.wsrep_restart_slave = @start_value;
#
# wsrep_restart_slave
#
# save the initial value
SET @wsrep_restart_slave_global_saved = @@global.wsrep_restart_slave;
# default
SELECT @@global.wsrep_restart_slave;
@@global.wsrep_restart_slave
0
SELECT @@session.wsrep_restart_slave;
ERROR HY000: Variable 'wsrep_restart_slave' is a GLOBAL variable
# scope and valid values
SET @@global.wsrep_restart_slave=OFF;
SELECT @@global.wsrep_restart_slave;
@@global.wsrep_restart_slave
0
SET @@global.wsrep_restart_slave=ON;
SELECT @@global.wsrep_restart_slave;
@@global.wsrep_restart_slave
1
# invalid values
SET @@global.wsrep_restart_slave=NULL;
ERROR 42000: Variable 'wsrep_restart_slave' can't be set to the value of 'NULL'
SET @@global.wsrep_restart_slave='junk';
ERROR 42000: Variable 'wsrep_restart_slave' can't be set to the value of 'junk'
# restore the initial value
SET @@global.wsrep_restart_slave = @wsrep_restart_slave_global_saved;
# End of test
set @start_value = @@wsrep_restart_slave;
set @@global.wsrep_restart_slave=ON;
set @@global.wsrep_restart_slave=OFF;
set @@global.wsrep_restart_slave=1;
set @@global.wsrep_restart_slave=0;
SET @@global.wsrep_restart_slave = -1;
ERROR 42000: Variable 'wsrep_restart_slave' can't be set to the value of '-1'
set @@global.wsrep_restart_slave = @start_value;
#
# wsrep_retry_autocommit
#
# save the initial values
SET @wsrep_retry_autocommit_global_saved = @@global.wsrep_retry_autocommit;
SET @wsrep_retry_autocommit_session_saved = @@session.wsrep_retry_autocommit;
# default
SELECT @@global.wsrep_retry_autocommit;
@@global.wsrep_retry_autocommit
1
# scope
SET @@session.wsrep_retry_autocommit=1;
SELECT @@session.wsrep_retry_autocommit;
@@session.wsrep_retry_autocommit
1
SET @@global.wsrep_retry_autocommit=1;
SELECT @@global.wsrep_retry_autocommit;
@@global.wsrep_retry_autocommit
1
# valid values
SET @@global.wsrep_retry_autocommit=10;
SELECT @@global.wsrep_retry_autocommit;
@@global.wsrep_retry_autocommit
10
SET @@global.wsrep_retry_autocommit=0;
SELECT @@global.wsrep_retry_autocommit;
@@global.wsrep_retry_autocommit
0
SET @@global.wsrep_retry_autocommit=default;
SELECT @global.wsrep_retry_autocommit;
@global.wsrep_retry_autocommit
NULL
SET @@session.wsrep_retry_autocommit=10;
SELECT @@session.wsrep_retry_autocommit;
@@session.wsrep_retry_autocommit
10
SET @@session.wsrep_retry_autocommit=0;
SELECT @@session.wsrep_retry_autocommit;
@@session.wsrep_retry_autocommit
0
SET @@session.wsrep_retry_autocommit=default;
SELECT @session.wsrep_retry_autocommit;
@session.wsrep_retry_autocommit
NULL
# invalid values
SET @@global.wsrep_retry_autocommit=NULL;
ERROR 42000: Incorrect argument type to variable 'wsrep_retry_autocommit'
SET @@global.wsrep_retry_autocommit='junk';
ERROR 42000: Incorrect argument type to variable 'wsrep_retry_autocommit'
SET @@global.wsrep_retry_autocommit=-1;
Warnings:
Warning 1292 Truncated incorrect wsrep_retry_autocommit value: '-1'
SELECT @global.wsrep_retry_autocommit;
@global.wsrep_retry_autocommit
NULL
# restore the initial value
SET @@global.wsrep_retry_autocommit = @wsrep_retry_autocommit_global_saved;
SET @@session.wsrep_retry_autocommit = @wsrep_retry_autocommit_session_saved;
# End of test
set @start_value = @@wsrep_slave_threads;
set @@global.wsrep_slave_threads=1;
set @@global.wsrep_slave_threads=4;
show warnings;
Level Code Message
set @@global.wsrep_slave_threads=0;
#
# 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'
show warnings;
Level Code Message
Warning 1292 Truncated incorrect wsrep_slave_threads value: '0'
set @@global.wsrep_slave_threads=-1;
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'
show warnings;
Level Code Message
Warning 1292 Truncated incorrect wsrep_slave_threads value: '-1'
SET @@global.wsrep_slave_threads = r;
ERROR 42000: Incorrect argument type to variable 'wsrep_slave_threads'
set @@global.wsrep_slave_threads = @start_value;
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
SELECT COUNT(@@wsrep_sst_auth);
COUNT(@@wsrep_sst_auth)
0
#
# wsrep_sst_auth
#
# save the initial value
SET @wsrep_sst_auth_global_saved = @@global.wsrep_sst_auth;
# default
SELECT @@global.wsrep_sst_auth;
@@global.wsrep_sst_auth
NULL
# scope
SELECT @@session.wsrep_sst_auth;
ERROR HY000: Variable 'wsrep_sst_auth' is a GLOBAL variable
SET @@global.wsrep_sst_auth='user:pass';
SELECT @@global.wsrep_sst_auth;
@@global.wsrep_sst_auth
********
# valid values
SET @@global.wsrep_sst_auth=user;
SELECT @@global.wsrep_sst_auth;
@@global.wsrep_sst_auth
********
SET @@global.wsrep_sst_auth='user:1234';
SELECT @@global.wsrep_sst_auth;
@@global.wsrep_sst_auth
********
SET @@global.wsrep_sst_auth='hyphenated-user-name:';
SELECT @@global.wsrep_sst_auth;
@@global.wsrep_sst_auth
********
SET @@global.wsrep_sst_auth=default;
SELECT @@global.wsrep_sst_auth;
@@global.wsrep_sst_auth
NULL
SET @@global.wsrep_sst_auth=NULL;
SELECT @@global.wsrep_sst_auth;
@@global.wsrep_sst_auth
NULL
# invalid values
SET @@global.wsrep_sst_auth=1;
ERROR 42000: Incorrect argument type to variable 'wsrep_sst_auth'
SELECT @@global.wsrep_sst_auth;
@@global.wsrep_sst_auth
NULL
SET @@global.wsrep_sst_auth=user:pass;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ':pass' at line 1
# restore the initial value
SET @@global.wsrep_sst_auth = @wsrep_sst_auth_global_saved;
# End of test
SELECT COUNT(@@wsrep_sst_donor);
COUNT(@@wsrep_sst_donor)
1
set @start_value = @@wsrep_sst_donor;
set @@global.wsrep_sst_donor='foo';
set @@global.wsrep_sst_donor=NULL;
set @@global.wsrep_sst_donor=r;
set @@global.wsrep_sst_donor=1;
#
# wsrep_sst_donor
#
# save the initial value
SET @wsrep_sst_donor_global_saved = @@global.wsrep_sst_donor;
# default
SELECT @@global.wsrep_sst_donor;
@@global.wsrep_sst_donor
# scope
SELECT @@session.wsrep_sst_donor;
ERROR HY000: Variable 'wsrep_sst_donor' is a GLOBAL variable
SET @@global.wsrep_sst_donor=rsync;
SELECT @@global.wsrep_sst_donor;
@@global.wsrep_sst_donor
rsync
# valid values
SET @@global.wsrep_sst_donor=node1;
SELECT @@global.wsrep_sst_donor;
@@global.wsrep_sst_donor
node1
SET @@global.wsrep_sst_donor='node1,node2';
SELECT @@global.wsrep_sst_donor;
@@global.wsrep_sst_donor
node1,node2
SET @@global.wsrep_sst_donor='hyphenated-donor-name';
SELECT @@global.wsrep_sst_donor;
@@global.wsrep_sst_donor
hyphenated-donor-name
SET @@global.wsrep_sst_donor=default;
SELECT @@global.wsrep_sst_donor;
@@global.wsrep_sst_donor
SET @@global.wsrep_sst_donor=NULL;
SELECT @@global.wsrep_sst_donor;
@@global.wsrep_sst_donor
NULL
# invalid values
SET @@global.wsrep_sst_donor=1;
ERROR 42000: Incorrect argument type to variable 'wsrep_sst_donor'
set @@global.wsrep_sst_donor = @start_value;
SELECT @@global.wsrep_sst_donor;
@@global.wsrep_sst_donor
NULL
# restore the initial value
SET @@global.wsrep_sst_donor = @wsrep_sst_donor_global_saved;
# End of test
set @start_value = @@wsrep_sst_donor_rejects_queries;
set @@global.wsrep_sst_donor_rejects_queries=ON;
set @@global.wsrep_sst_donor_rejects_queries=OFF;
set @@global.wsrep_sst_donor_rejects_queries=1;
set @@global.wsrep_sst_donor_rejects_queries=0;
SET @@global.wsrep_sst_donor_rejects_queries = -1;
ERROR 42000: Variable 'wsrep_sst_donor_rejects_queries' can't be set to the value of '-1'
set @@global.wsrep_sst_donor_rejects_queries = @start_value;
#
# wsrep_sst_donor_rejects_queries
#
# save the initial value
SET @wsrep_sst_donor_rejects_queries_global_saved = @@global.wsrep_sst_donor_rejects_queries;
# default
SELECT @@global.wsrep_sst_donor_rejects_queries;
@@global.wsrep_sst_donor_rejects_queries
0
# scope
SELECT @@session.wsrep_sst_donor_rejects_queries;
ERROR HY000: Variable 'wsrep_sst_donor_rejects_queries' is a GLOBAL variable
SET @@global.wsrep_sst_donor_rejects_queries=OFF;
SELECT @@global.wsrep_sst_donor_rejects_queries;
@@global.wsrep_sst_donor_rejects_queries
0
SET @@global.wsrep_sst_donor_rejects_queries=ON;
SELECT @@global.wsrep_sst_donor_rejects_queries;
@@global.wsrep_sst_donor_rejects_queries
1
# valid values
SET @@global.wsrep_sst_donor_rejects_queries='OFF';
SELECT @@global.wsrep_sst_donor_rejects_queries;
@@global.wsrep_sst_donor_rejects_queries
0
SET @@global.wsrep_sst_donor_rejects_queries=ON;
SELECT @@global.wsrep_sst_donor_rejects_queries;
@@global.wsrep_sst_donor_rejects_queries
1
SET @@global.wsrep_sst_donor_rejects_queries=default;
SELECT @@global.wsrep_sst_donor_rejects_queries;
@@global.wsrep_sst_donor_rejects_queries
0
# invalid values
SET @@global.wsrep_sst_donor_rejects_queries=NULL;
ERROR 42000: Variable 'wsrep_sst_donor_rejects_queries' can't be set to the value of 'NULL'
SET @@global.wsrep_sst_donor_rejects_queries='junk';
ERROR 42000: Variable 'wsrep_sst_donor_rejects_queries' can't be set to the value of 'junk'
# restore the initial value
SET @@global.wsrep_sst_donor_rejects_queries = @wsrep_sst_donor_rejects_queries_global_saved;
# End of test
set @start_value = @@wsrep_sst_method;
set @@global.wsrep_sst_method='xtrabackup';
set @@global.wsrep_sst_method='xtrabackup-v2';
set @@global.wsrep_sst_method='rsync';
set @@global.wsrep_sst_method='mysqldump';
set @@global.wsrep_sst_method='myscript';
set @@global.wsrep_sst_method='skip';
set @@global.wsrep_sst_method=NULL;
#
# wsrep_sst_method
#
# save the initial value
SET @wsrep_sst_method_global_saved = @@global.wsrep_sst_method;
# default
SELECT @@global.wsrep_sst_method;
@@global.wsrep_sst_method
rsync
# scope
SELECT @@session.wsrep_sst_method;
ERROR HY000: Variable 'wsrep_sst_method' is a GLOBAL variable
SET @@global.wsrep_sst_method=rsync;
SELECT @@global.wsrep_sst_method;
@@global.wsrep_sst_method
rsync
# valid values
SET @@global.wsrep_sst_method=rsync;
SELECT @@global.wsrep_sst_method;
@@global.wsrep_sst_method
rsync
SET @@global.wsrep_sst_method=mysqldump;
SELECT @@global.wsrep_sst_method;
@@global.wsrep_sst_method
mysqldump
SET @@global.wsrep_sst_method=xtrabackup;
SELECT @@global.wsrep_sst_method;
@@global.wsrep_sst_method
xtrabackup
SET @@global.wsrep_sst_method="xtrabackup-v2";
SELECT @@global.wsrep_sst_method;
@@global.wsrep_sst_method
xtrabackup-v2
SET @@global.wsrep_sst_method=default;
SELECT @@global.wsrep_sst_method;
@@global.wsrep_sst_method
rsync
SET @@global.wsrep_sst_method='junk';
SELECT @@global.wsrep_sst_method;
@@global.wsrep_sst_method
junk
# invalid values
SET @@global.wsrep_sst_method=NULL;
ERROR 42000: Variable 'wsrep_sst_method' can't be set to the value of 'NULL'
SET @@global.wsrep_sst_method = -1;
ERROR 42000: Incorrect argument type to variable 'wsrep_sst_method'
set @@global.wsrep_sst_method = @start_value;
SELECT @@global.wsrep_sst_method;
@@global.wsrep_sst_method
junk
# restore the initial value
SET @@global.wsrep_sst_method = @wsrep_sst_method_global_saved;
# End of test
set @start_value = @@wsrep_sst_receive_address;
set @@global.wsrep_sst_receive_address='128.0.2.1';
set @@global.wsrep_sst_receive_address=AUTO;
set @@global.wsrep_sst_receive_address='AUTO';
set @@global.wsrep_sst_receive_address=NULL;
SET @@global.wsrep_sst_receive_address = -1;
ERROR 42000: Incorrect argument type to variable 'wsrep_sst_receive_address'
set @@global.wsrep_sst_receive_address = @start_value;
#
# wsrep_sst_receive_address
#
# save the initial value
SET @wsrep_sst_receive_address_global_saved = @@global.wsrep_sst_receive_address;
# default
SELECT @@global.wsrep_sst_receive_address;
@@global.wsrep_sst_receive_address
AUTO
# scope
SELECT @@session.wsrep_sst_receive_address;
ERROR HY000: Variable 'wsrep_sst_receive_address' is a GLOBAL variable
SELECT @@global.wsrep_sst_receive_address;
@@global.wsrep_sst_receive_address
AUTO
# valid values
SET @@global.wsrep_sst_receive_address=AUTO;
SELECT @@global.wsrep_sst_receive_address;
@@global.wsrep_sst_receive_address
AUTO
SET @@global.wsrep_sst_receive_address=default;
SELECT @@global.wsrep_sst_receive_address;
@@global.wsrep_sst_receive_address
AUTO
SET @@global.wsrep_sst_receive_address='192.168.2.254';
SELECT @@global.wsrep_sst_receive_address;
@@global.wsrep_sst_receive_address
192.168.2.254
# invalid values
SET @@global.wsrep_sst_receive_address='127.0.0.1:4444';
ERROR 42000: Variable 'wsrep_sst_receive_address' can't be set to the value of '127.0.0.1:4444'
SET @@global.wsrep_sst_receive_address='127.0.0.1';
ERROR 42000: Variable 'wsrep_sst_receive_address' can't be set to the value of '127.0.0.1'
SELECT @@global.wsrep_sst_receive_address;
@@global.wsrep_sst_receive_address
192.168.2.254
SET @@global.wsrep_sst_receive_address=NULL;
ERROR 42000: Variable 'wsrep_sst_receive_address' can't be set to the value of 'NULL'
SELECT @@global.wsrep_sst_receive_address;
@@global.wsrep_sst_receive_address
192.168.2.254
SET @@global.wsrep_sst_receive_address='OFF';
SELECT @@global.wsrep_sst_receive_address;
@@global.wsrep_sst_receive_address
OFF
SET @@global.wsrep_sst_receive_address=ON;
SELECT @@global.wsrep_sst_receive_address;
@@global.wsrep_sst_receive_address
ON
SET @@global.wsrep_sst_receive_address='';
SELECT @@global.wsrep_sst_receive_address;
@@global.wsrep_sst_receive_address
SET @@global.wsrep_sst_receive_address='junk';
SELECT @@global.wsrep_sst_receive_address;
@@global.wsrep_sst_receive_address
junk
# restore the initial value
SET @@global.wsrep_sst_receive_address = @wsrep_sst_receive_address_global_saved;
# End of test
set @start_value = @@wsrep_start_position;
set @@global.wsrep_start_position='foo:bar';
ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of 'foo:bar'
set @@global.wsrep_start_position=NULL;
#
# wsrep_start_position
#
# save the initial value
SET @wsrep_start_position_global_saved = @@global.wsrep_start_position;
# default
SELECT @@global.wsrep_start_position;
@@global.wsrep_start_position
00000000-0000-0000-0000-000000000000:-1
# scope
SELECT @@session.wsrep_start_position;
ERROR HY000: Variable 'wsrep_start_position' is a GLOBAL variable
SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-1';
SELECT @@global.wsrep_start_position;
@@global.wsrep_start_position
00000000-0000-0000-0000-000000000000:-1
# valid values
SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-2';
SELECT @@global.wsrep_start_position;
@@global.wsrep_start_position
00000000-0000-0000-0000-000000000000:-2
SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:100';
SELECT @@global.wsrep_start_position;
@@global.wsrep_start_position
12345678-1234-1234-1234-123456789012:100
SET @@global.wsrep_start_position=default;
SELECT @@global.wsrep_start_position;
@@global.wsrep_start_position
00000000-0000-0000-0000-000000000000:-1
# invalid values
SET @@global.wsrep_start_position='000000000000000-0000-0000-0000-000000000000:-1';
ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '000000000000000-0000-0000-0000-000000000000:-1'
SET @@global.wsrep_start_position='12345678-1234-1234-12345-123456789012:100';
ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-12345-123456789012:100'
SET @@global.wsrep_start_position='12345678-1234-123-12345-123456789012:0';
ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-123-12345-123456789012:0'
SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:_99999';
ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:_99999'
SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:a';
ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:a'
SET @@global.wsrep_start_position='OFF';
ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of 'OFF'
SET @@global.wsrep_start_position=ON;
ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of 'ON'
SET @@global.wsrep_start_position='';
ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of ''
SET @@global.wsrep_start_position=NULL;
ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of 'NULL'
SET @@global.wsrep_start_position = -1;
ERROR 42000: Incorrect argument type to variable 'wsrep_start_position'
set @@global.wsrep_start_position = @start_value;
SET @@global.wsrep_start_position='junk';
ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of 'junk'
# restore the initial value
SET @@global.wsrep_start_position = @wsrep_start_position_global_saved;
# End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_auto_increment_control;
--echo #
--echo # wsrep_auto_increment_control
--echo #
set @@global.wsrep_auto_increment_control=ON;
set @@global.wsrep_auto_increment_control=OFF;
set @@global.wsrep_auto_increment_control=1;
set @@global.wsrep_auto_increment_control=0;
--Error 1231
SET @@global.wsrep_auto_increment_control = -1;
--echo # save the initial value
SET @wsrep_auto_increment_control_global_saved = @@global.wsrep_auto_increment_control;
set @@global.wsrep_auto_increment_control = @start_value;
--echo # default
SELECT @@global.wsrep_auto_increment_control;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_auto_increment_control;
SET @@global.wsrep_auto_increment_control=OFF;
SELECT @@global.wsrep_auto_increment_control;
SET @@global.wsrep_auto_increment_control=ON;
SELECT @@global.wsrep_auto_increment_control;
--echo
--echo # valid values
SET @@global.wsrep_auto_increment_control='OFF';
SELECT @@global.wsrep_auto_increment_control;
SET @@global.wsrep_auto_increment_control=ON;
SELECT @@global.wsrep_auto_increment_control;
SET @@global.wsrep_auto_increment_control=default;
SELECT @@global.wsrep_auto_increment_control;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_auto_increment_control=NULL;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_auto_increment_control='junk';
--echo
--echo # restore the initial value
SET @@global.wsrep_auto_increment_control = @wsrep_auto_increment_control_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_causal_reads;
--echo #
--echo # wsrep_causal_reads
--echo #
set @@global.wsrep_causal_reads=ON;
set @@global.wsrep_causal_reads=OFF;
set @@global.wsrep_causal_reads=1;
set @@global.wsrep_causal_reads=0;
--Error 1231
SET @@global.wsrep_causal_reads = -1;
--echo # save the initial values
SET @wsrep_causal_reads_global_saved = @@global.wsrep_causal_reads;
SET @wsrep_causal_reads_session_saved = @@session.wsrep_causal_reads;
set @@global.wsrep_causal_reads = @start_value;
--echo # default
SELECT @@global.wsrep_causal_reads;
SELECT @@session.wsrep_causal_reads;
--echo
--echo # scope and valid values
SET @@global.wsrep_causal_reads=OFF;
SELECT @@global.wsrep_causal_reads;
SET @@global.wsrep_causal_reads=ON;
SELECT @@global.wsrep_causal_reads;
SET @@session.wsrep_causal_reads=OFF;
SELECT @@session.wsrep_causal_reads;
SET @@session.wsrep_causal_reads=ON;
SELECT @@session.wsrep_causal_reads;
SET @@session.wsrep_causal_reads=default;
SELECT @@session.wsrep_causal_reads;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_causal_reads=NULL;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_causal_reads='junk';
--error ER_WRONG_VALUE_FOR_VAR
SET @@session.wsrep_causal_reads=NULL;
--error ER_WRONG_VALUE_FOR_VAR
SET @@session.wsrep_causal_reads='junk';
--echo
--echo # restore the initial values
SET @@global.wsrep_causal_reads = @wsrep_causal_reads_global_saved;
SET @@session.wsrep_causal_reads = @wsrep_causal_reads_session_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
set @start_value = @@wsrep_certify_nonpk;
set @@global.wsrep_certify_nonpk=ON;
set @@global.wsrep_certify_nonpk=OFF;
set @@global.wsrep_certify_nonpk=1;
set @@global.wsrep_certify_nonpk=0;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_certify_nonpk = -1;
set @@global.wsrep_certify_nonpk = @start_value;
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_certify_nonpk;
--echo #
--echo # wsrep_certify_nonpk
--echo #
set @@global.wsrep_certify_nonpk=ON;
set @@global.wsrep_certify_nonpk=OFF;
set @@global.wsrep_certify_nonpk=1;
set @@global.wsrep_certify_nonpk=0;
--Error 1231
SET @@global.wsrep_certify_nonpk = -1;
--echo # save the initial value
SET @wsrep_certify_nonpk_global_saved = @@global.wsrep_certify_nonpk;
set @@global.wsrep_certify_nonpk = @start_value;
--echo # default
SELECT @@global.wsrep_certify_nonpk;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_certify_nonpk;
SET @@global.wsrep_certify_nonpk=OFF;
SELECT @@global.wsrep_certify_nonpk;
SET @@global.wsrep_certify_nonpk=ON;
SELECT @@global.wsrep_certify_nonpk;
--echo
--echo # valid values
SET @@global.wsrep_certify_nonpk='OFF';
SELECT @@global.wsrep_certify_nonpk;
SET @@global.wsrep_certify_nonpk=ON;
SELECT @@global.wsrep_certify_nonpk;
SET @@global.wsrep_certify_nonpk=default;
SELECT @@global.wsrep_certify_nonpk;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_certify_nonpk=NULL;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_certify_nonpk='junk';
--echo
--echo # restore the initial value
SET @@global.wsrep_certify_nonpk = @wsrep_certify_nonpk_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
SELECT COUNT(@@GLOBAL.wsrep_cluster_address);
--echo 1 Expected
SELECT COUNT(@@GLOBAL.wsrep_cluster_address);
--echo 1 Expected
SELECT @@GLOBAL.wsrep_cluster_address = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='wsrep_cluster_address';
--echo 1 Expected
SELECT COUNT(@@GLOBAL.wsrep_cluster_address);
--echo 1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='wsrep_cluster_address';
--echo 1 Expected
SELECT @@wsrep_cluster_address = @@GLOBAL.wsrep_cluster_address;
--echo 1 Expected
SELECT COUNT(@@wsrep_cluster_address);
--echo 1 Expected
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@local.wsrep_cluster_address);
--echo Expected error 'Variable is a GLOBAL variable'
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@SESSION.wsrep_cluster_address);
--echo Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.wsrep_cluster_address);
--echo 1 Expected
--Error ER_BAD_FIELD_ERROR
SELECT wsrep_cluster_address = @@SESSION.wsrep_cluster_address;
--echo Expected error 'Readonly variable'
--source include/have_wsrep.inc
--echo #
--echo # wsrep_cluster_address
--echo #
call mtr.add_suppression("safe_mutex: Found wrong usage of mutex.*");
--echo # save the initial value
SET @wsrep_cluster_address_global_saved = @@global.wsrep_cluster_address;
--echo # default
SELECT @@global.wsrep_cluster_address;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_cluster_address;
SELECT @@global.wsrep_cluster_address;
--echo
--echo # valid values
SET @@global.wsrep_cluster_address='127.0.0.1';
SELECT @@global.wsrep_cluster_address;
SET @@global.wsrep_cluster_address=AUTO;
SELECT @@global.wsrep_cluster_address;
SET @@global.wsrep_cluster_address=default;
SELECT @@global.wsrep_cluster_address;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_node_address=NULL;
SELECT @@global.wsrep_node_address;
# The values being assigned to wsrep_node_address are not verified so the
# following alues are currently valid too.
SET @@global.wsrep_cluster_address=ON;
SELECT @@global.wsrep_cluster_address;
SET @@global.wsrep_cluster_address='OFF';
SELECT @@global.wsrep_cluster_address;
SET @@global.wsrep_cluster_address='junk';
SELECT @@global.wsrep_cluster_address;
--echo
--echo # restore the initial value
SET @@global.wsrep_cluster_address = @wsrep_cluster_address_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_cluster_name;
--echo #
--echo # wsrep_cluster_name
--echo #
set @@global.wsrep_cluster_name='test';
--Error 1231
set @@global.wsrep_cluster_name=NULL;
--Error 1232
SET @@global.wsrep_cluster_name = 1;
--echo # save the initial value
SET @wsrep_cluster_name_global_saved = @@global.wsrep_cluster_name;
set @@global.wsrep_cluster_name = @start_value;
\ No newline at end of file
--echo # default
SELECT @@global.wsrep_cluster_name;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_cluster_name;
SET @@global.wsrep_cluster_name='my_galera_cluster';
SELECT @@global.wsrep_cluster_name;
--echo
--echo # valid values
SET @@global.wsrep_cluster_name='my_quoted_galera_cluster';
SELECT @@global.wsrep_cluster_name;
SET @@global.wsrep_cluster_name=my_unquoted_cluster;
SELECT @@global.wsrep_cluster_name;
SET @@global.wsrep_cluster_name=OFF;
SELECT @@global.wsrep_cluster_name;
SET @@global.wsrep_cluster_name=default;
SELECT @@global.wsrep_cluster_name;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_cluster_name=NULL;
--echo
--echo # restore the initial value
SET @@global.wsrep_cluster_name = @wsrep_cluster_name_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_convert_lock_to_trx;
--echo #
--echo # wsrep_convert_lock_to_trx
--echo #
set @@global.wsrep_convert_lock_to_trx=ON;
set @@global.wsrep_convert_lock_to_trx=OFF;
set @@global.wsrep_convert_lock_to_trx=1;
set @@global.wsrep_convert_lock_to_trx=0;
--Error 1231
SET @@global.wsrep_convert_lock_to_trx = -1;
--echo # save the initial value
SET @wsrep_convert_lock_to_trx_global_saved = @@global.wsrep_convert_lock_to_trx;
set @@global.wsrep_convert_lock_to_trx = @start_value;
\ No newline at end of file
--echo # default
SELECT @@global.wsrep_convert_lock_to_trx;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_convert_lock_to_trx;
SET @@global.wsrep_convert_lock_to_trx=OFF;
SELECT @@global.wsrep_convert_lock_to_trx;
SET @@global.wsrep_convert_lock_to_trx=ON;
SELECT @@global.wsrep_convert_lock_to_trx;
--echo
--echo # valid values
SET @@global.wsrep_convert_lock_to_trx='OFF';
SELECT @@global.wsrep_convert_lock_to_trx;
SET @@global.wsrep_convert_lock_to_trx=ON;
SELECT @@global.wsrep_convert_lock_to_trx;
SET @@global.wsrep_convert_lock_to_trx=default;
SELECT @@global.wsrep_convert_lock_to_trx;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_convert_lock_to_trx=NULL;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_convert_lock_to_trx='junk';
--echo
--echo # restore the initial value
SET @@global.wsrep_convert_lock_to_trx = @wsrep_convert_lock_to_trx_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
SELECT COUNT(@@GLOBAL.wsrep_data_home_dir);
--echo 1 Expected
--echo #
--echo # wsrep_data_home_dir (readonly)
--echo #
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@GLOBAL.wsrep_data_home_dir=1;
--echo Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.wsrep_data_home_dir);
--echo 1 Expected
SELECT @@GLOBAL.wsrep_data_home_dir = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='wsrep_data_home_dir';
--echo 1 Expected
SELECT COUNT(@@GLOBAL.wsrep_data_home_dir);
--echo 1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='wsrep_data_home_dir';
--echo 1 Expected
SELECT @@wsrep_data_home_dir = @@GLOBAL.wsrep_data_home_dir;
--echo 1 Expected
SELECT COUNT(@@wsrep_data_home_dir);
--echo 1 Expected
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@local.wsrep_data_home_dir);
--echo Expected error 'Variable is a GLOBAL variable'
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@SESSION.wsrep_data_home_dir);
--echo Expected error 'Variable is a GLOBAL variable'
--echo # default
SELECT @@global.wsrep_data_home_dir;
SELECT COUNT(@@GLOBAL.wsrep_data_home_dir);
--echo 1 Expected
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_data_home_dir;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.wsrep_data_home_dir='/tmp/data';
SELECT @@global.wsrep_data_home_dir;
--Error ER_BAD_FIELD_ERROR
SELECT wsrep_data_home_dir = @@SESSION.wsrep_data_home_dir;
--echo Expected error 'Readonly variable'
--echo
--echo # valid values
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.wsrep_data_home_dir='/tmp/data';
SELECT @@global.wsrep_data_home_dir;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.wsrep_data_home_dir=junk-dir;
SELECT @@global.wsrep_data_home_dir;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.wsrep_data_home_dir=junk/dir;
SELECT @@global.wsrep_data_home_dir;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.wsrep_data_home_dir=OFF;
SELECT @@global.wsrep_data_home_dir;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.wsrep_data_home_dir=default;
SELECT @@global.wsrep_data_home_dir;
--echo
--echo # invalid values
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.wsrep_data_home_dir=NULL;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_dbug_option;
--echo #
--echo # wsrep_dbug_option
--echo #
set @@global.wsrep_dbug_option='foo:bar';
set @@global.wsrep_dbug_option=NULL;
--Error 1232
SET @@global.wsrep_dbug_option = -1;
--echo # save the initial value
SET @wsrep_dbug_option_global_saved = @@global.wsrep_dbug_option;
set @@global.wsrep_dbug_option = @start_value;
--echo # default
SELECT @@global.wsrep_dbug_option;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_dbug_option;
SET @@global.wsrep_dbug_option='test-dbug-string';
SELECT @@global.wsrep_dbug_option;
--echo
--echo # valid values
SET @@global.wsrep_dbug_option='quoted-dbug-string';
SELECT @@global.wsrep_dbug_option;
SET @@global.wsrep_dbug_option=unquoted_dbug_string;
SELECT @@global.wsrep_dbug_option;
SET @@global.wsrep_dbug_option=OFF;
SELECT @@global.wsrep_dbug_option;
SET @@global.wsrep_dbug_option=NULL;
SELECT @@global.wsrep_dbug_option;
SET @@global.wsrep_dbug_option=default;
SELECT @@global.wsrep_dbug_option;
--echo
--echo # invalid values
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_dbug_option=1;
--echo
--echo # restore the initial value
SET @@global.wsrep_dbug_option = @wsrep_dbug_option_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_debug;
--echo #
--echo # wsrep_debug
--echo #
set @@global.wsrep_debug=ON;
set @@global.wsrep_debug=OFF;
set @@global.wsrep_debug=1;
set @@global.wsrep_debug=0;
--Error 1231
SET @@global.wsrep_debug = -1;
--echo # save the initial value
SET @wsrep_debug_global_saved = @@global.wsrep_debug;
set @@global.wsrep_debug = @start_value;
\ No newline at end of file
--echo # default
SELECT @@global.wsrep_debug;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_debug;
SET @@global.wsrep_debug=OFF;
SELECT @@global.wsrep_debug;
SET @@global.wsrep_debug=ON;
SELECT @@global.wsrep_debug;
--echo
--echo # valid values
SET @@global.wsrep_debug='OFF';
SELECT @@global.wsrep_debug;
SET @@global.wsrep_debug=ON;
SELECT @@global.wsrep_debug;
SET @@global.wsrep_debug=default;
SELECT @@global.wsrep_debug;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_debug=NULL;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_debug='junk';
--echo
--echo # restore the initial value
SET @@global.wsrep_debug = @wsrep_debug_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
set @start_value = @@wsrep_debug_option;
--error 1231
set @@global.wsrep_debug_option='foo:bar';
--error 1231
set @@global.wsrep_debug_option=NULL;
--Error 1232
SET @@global.wsrep_debug_option = -1;
set @@global.wsrep_debug_option = @start_value;
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
select @@global.wsrep_desync;
--echo #
--echo # wsrep_desync
--echo #
# expected as no wsrep provider is currently loaded
call mtr.add_suppression("WSREP: SET desync failed 9 for SET @@global.wsrep_desync=ON");
--echo # save the initial value
SET @wsrep_desync_global_saved = @@global.wsrep_desync;
--echo # default
SELECT @@global.wsrep_desync;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_desync;
SET @@global.wsrep_desync=OFF;
SELECT @@global.wsrep_desync;
# expected as no wsrep provider is currently loaded
--error ER_CANNOT_USER
SET @@global.wsrep_desync=ON;
SELECT @@global.wsrep_desync;
--echo
--echo # valid values
SET @@global.wsrep_desync='OFF';
SELECT @@global.wsrep_desync;
# expected as no wsrep provider is currently loaded
--error ER_CANNOT_USER
SET @@global.wsrep_desync=ON;
SELECT @@global.wsrep_desync;
SET @@global.wsrep_desync=default;
SELECT @@global.wsrep_desync;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_desync=NULL;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_desync='junk';
--echo
--echo # restore the initial value
SET @@global.wsrep_desync = @wsrep_desync_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_drupal_282555_workaround;
--echo #
--echo # wsrep_drupal_282555_workaround
--echo #
set @@global.wsrep_drupal_282555_workaround=ON;
set @@global.wsrep_drupal_282555_workaround=OFF;
set @@global.wsrep_drupal_282555_workaround=1;
set @@global.wsrep_drupal_282555_workaround=0;
--Error 1231
SET @@global.wsrep_drupal_282555_workaround = -1;
--echo # save the initial value
SET @wsrep_drupal_282555_workaround_global_saved = @@global.wsrep_drupal_282555_workaround;
set @@global.wsrep_drupal_282555_workaround = @start_value;
\ No newline at end of file
--echo # default
SELECT @@global.wsrep_drupal_282555_workaround;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_drupal_282555_workaround;
SET @@global.wsrep_drupal_282555_workaround=OFF;
SELECT @@global.wsrep_drupal_282555_workaround;
SET @@global.wsrep_drupal_282555_workaround=ON;
SELECT @@global.wsrep_drupal_282555_workaround;
--echo
--echo # valid values
SET @@global.wsrep_drupal_282555_workaround='OFF';
SELECT @@global.wsrep_drupal_282555_workaround;
SET @@global.wsrep_drupal_282555_workaround=ON;
SELECT @@global.wsrep_drupal_282555_workaround;
SET @@global.wsrep_drupal_282555_workaround=default;
SELECT @@global.wsrep_drupal_282555_workaround;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_drupal_282555_workaround=NULL;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_drupal_282555_workaround='junk';
--echo
--echo # restore the initial value
SET @@global.wsrep_drupal_282555_workaround = @wsrep_drupal_282555_workaround_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_forced_binlog_format;
--echo #
--echo # wsrep_forced_binlog_format
--echo #
set @@global.wsrep_forced_binlog_format = ROW;
set @@global.wsrep_forced_binlog_format = MIXED;
set @@global.wsrep_forced_binlog_format = STATEMENT;
set @@global.wsrep_forced_binlog_format = NONE;
--echo # save the initial value
SET @wsrep_forced_binlog_format_global_saved = @@global.wsrep_forced_binlog_format;
--error 1231
set @@global.wsrep_forced_binlog_format = FOO;
--echo # default
SELECT @@global.wsrep_forced_binlog_format;
set @@global.wsrep_forced_binlog_format = @start_value;
\ No newline at end of file
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_forced_binlog_format;
SET @@global.wsrep_forced_binlog_format=STATEMENT;
SELECT @@global.wsrep_forced_binlog_format;
--echo
--echo # valid values
SET @@global.wsrep_forced_binlog_format=STATEMENT;
SELECT @@global.wsrep_forced_binlog_format;
SET @@global.wsrep_forced_binlog_format=ROW;
SELECT @@global.wsrep_forced_binlog_format;
SET @@global.wsrep_forced_binlog_format=MIXED;
SELECT @@global.wsrep_forced_binlog_format;
SET @@global.wsrep_forced_binlog_format=NONE;
SELECT @@global.wsrep_forced_binlog_format;
SET @@global.wsrep_forced_binlog_format=default;
SELECT @@global.wsrep_forced_binlog_format;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_forced_binlog_format=NULL;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_forced_binlog_format='junk';
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_forced_binlog_format=ON;
--echo
--echo # restore the initial value
SET @@global.wsrep_forced_binlog_format = @wsrep_forced_binlog_format_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_load_data_splitting;
--echo #
--echo # wsrep_load_data_splitting
--echo #
set @@global.wsrep_load_data_splitting=ON;
set @@global.wsrep_load_data_splitting=OFF;
set @@global.wsrep_load_data_splitting=1;
set @@global.wsrep_load_data_splitting=0;
--Error 1231
SET @@global.wsrep_load_data_splitting = -1;
--echo # save the initial value
SET @wsrep_load_data_splitting_global_saved = @@global.wsrep_load_data_splitting;
set @@global.wsrep_load_data_splitting = @start_value;
\ No newline at end of file
--echo # default
SELECT @@global.wsrep_load_data_splitting;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_load_data_splitting;
SET @@global.wsrep_load_data_splitting=OFF;
SELECT @@global.wsrep_load_data_splitting;
SET @@global.wsrep_load_data_splitting=ON;
SELECT @@global.wsrep_load_data_splitting;
--echo
--echo # valid values
SET @@global.wsrep_load_data_splitting='OFF';
SELECT @@global.wsrep_load_data_splitting;
SET @@global.wsrep_load_data_splitting=ON;
SELECT @@global.wsrep_load_data_splitting;
SET @@global.wsrep_load_data_splitting=default;
SELECT @@global.wsrep_load_data_splitting;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_load_data_splitting=NULL;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_load_data_splitting='junk';
--echo
--echo # restore the initial value
SET @@global.wsrep_load_data_splitting = @wsrep_load_data_splitting_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_log_conflicts;
--echo #
--echo # wsrep_log_conflicts
--echo #
set @@global.wsrep_log_conflicts=ON;
set @@global.wsrep_log_conflicts=OFF;
set @@global.wsrep_log_conflicts=1;
set @@global.wsrep_log_conflicts=0;
--Error 1231
SET @@global.wsrep_log_conflicts = -1;
--echo # save the initial value
SET @wsrep_log_conflicts_global_saved = @@global.wsrep_log_conflicts;
set @@global.wsrep_log_conflicts = @start_value;
\ No newline at end of file
--echo # default
SELECT @@global.wsrep_log_conflicts;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_log_conflicts;
SET @@global.wsrep_log_conflicts=OFF;
SELECT @@global.wsrep_log_conflicts;
SET @@global.wsrep_log_conflicts=ON;
SELECT @@global.wsrep_log_conflicts;
--echo
--echo # valid values
SET @@global.wsrep_log_conflicts='OFF';
SELECT @@global.wsrep_log_conflicts;
SET @@global.wsrep_log_conflicts=ON;
SELECT @@global.wsrep_log_conflicts;
SET @@global.wsrep_log_conflicts=default;
SELECT @@global.wsrep_log_conflicts;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_log_conflicts=NULL;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_log_conflicts='junk';
--echo
--echo # restore the initial value
SET @@global.wsrep_log_conflicts = @wsrep_log_conflicts_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_max_ws_rows;
--echo #
--echo # wsrep_max_ws_rows
--echo #
set @@global.wsrep_max_ws_rows=256000;
set @@global.wsrep_max_ws_rows=0;
show warnings;
set @@global.wsrep_max_ws_rows=-1;
show warnings;
--Error 1232
SET @@global.wsrep_max_ws_rows = r;
--echo # save the initial value
SET @wsrep_max_ws_rows_global_saved = @@global.wsrep_max_ws_rows;
set @@global.wsrep_max_ws_rows = @start_value;
\ No newline at end of file
--echo # default
SELECT @@global.wsrep_max_ws_rows;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_max_ws_rows;
SET @@global.wsrep_max_ws_rows=1;
SELECT @@global.wsrep_max_ws_rows;
--echo
--echo # valid values
SET @@global.wsrep_max_ws_rows=131072;
SELECT @@global.wsrep_max_ws_rows;
SET @@global.wsrep_max_ws_rows=131073;
SELECT @@global.wsrep_max_ws_rows;
SET @@global.wsrep_max_ws_rows=0;
SELECT @@global.wsrep_max_ws_rows;
SET @@global.wsrep_max_ws_rows=default;
SELECT @global.wsrep_max_ws_rows;
--echo
--echo # invalid values
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_max_ws_rows=NULL;
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_max_ws_rows='junk';
# expect warnings (Truncated incorrect wsrep_max_ws_rows value: '-1')
SET @@global.wsrep_max_ws_rows=-1;
SELECT @global.wsrep_max_ws_rows;
--echo
--echo # restore the initial value
SET @@global.wsrep_max_ws_rows = @wsrep_max_ws_rows_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_max_ws_size;
--echo #
--echo # wsrep_max_ws_size
--echo #
set @@global.wsrep_max_ws_size=256000;
set @@global.wsrep_max_ws_size=0;
show warnings;
set @@global.wsrep_max_ws_size=-1;
show warnings;
--Error 1232
SET @@global.wsrep_max_ws_size = r;
--echo # save the initial value
SET @wsrep_max_ws_size_global_saved = @@global.wsrep_max_ws_size;
set @@global.wsrep_max_ws_size = @start_value;
\ No newline at end of file
--echo # default
SELECT @@global.wsrep_max_ws_size;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_max_ws_size;
SET @@global.wsrep_max_ws_size=1;
SELECT @@global.wsrep_max_ws_size;
--echo
--echo # valid values
SET @@global.wsrep_max_ws_size=1073741824;
SELECT @@global.wsrep_max_ws_size;
SET @@global.wsrep_max_ws_size=1073741825;
SELECT @@global.wsrep_max_ws_size;
SET @@global.wsrep_max_ws_size=0;
SELECT @@global.wsrep_max_ws_size;
SET @@global.wsrep_max_ws_size=default;
SELECT @global.wsrep_max_ws_size;
--echo
--echo # invalid values
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_max_ws_size=NULL;
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_max_ws_size='junk';
SELECT @global.wsrep_max_ws_size;
SET @@global.wsrep_max_ws_size=-1;
SELECT @global.wsrep_max_ws_size;
--echo
--echo # restore the initial value
SET @@global.wsrep_max_ws_size = @wsrep_max_ws_size_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_mysql_replication_bundle;
--echo #
--echo # wsrep_mysql_replication_bundle
--echo #
set @@global.wsrep_mysql_replication_bundle=0;
set @@global.wsrep_mysql_replication_bundle=1000;
--echo # save the initial value
SET @wsrep_mysql_replication_bundle_global_saved = @@global.wsrep_mysql_replication_bundle;
set @@global.wsrep_mysql_replication_bundle=-1;
show warnings;
set @@global.wsrep_mysql_replication_bundle=1001;
show warnings;
--Error 1232
SET @@global.wsrep_mysql_replication_bundle = r;
--echo # default
SELECT @@global.wsrep_mysql_replication_bundle;
set @@global.wsrep_mysql_replication_bundle = @start_value;
\ No newline at end of file
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_mysql_replication_bundle;
SELECT @@global.wsrep_mysql_replication_bundle;
--echo
--echo # valid values
SET @@global.wsrep_mysql_replication_bundle=0;
SELECT @@global.wsrep_mysql_replication_bundle;
SET @@global.wsrep_mysql_replication_bundle=1000;
SELECT @@global.wsrep_mysql_replication_bundle;
SET @@global.wsrep_mysql_replication_bundle=default;
SELECT @@global.wsrep_mysql_replication_bundle;
--echo
--echo # invalid values
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_mysql_replication_bundle=NULL;
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_mysql_replication_bundle='junk';
# expect warning (truncated incorrect value)
SET @@global.wsrep_mysql_replication_bundle=-1;
SELECT @@global.wsrep_mysql_replication_bundle;
# expect warning (truncated incorrect value)
SET @@global.wsrep_mysql_replication_bundle=1001;
SELECT @@global.wsrep_mysql_replication_bundle;
--echo
--echo # restore the initial value
SET @@global.wsrep_mysql_replication_bundle = @wsrep_mysql_replication_bundle_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
SELECT COUNT(@@GLOBAL.wsrep_node_address);
--echo 1 Expected
--error 1232
SET @@GLOBAL.wsrep_node_address=1;
--echo Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.wsrep_node_address);
--echo 1 Expected
SELECT @@GLOBAL.wsrep_node_address = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='wsrep_node_address';
--echo 1 Expected
SELECT COUNT(@@GLOBAL.wsrep_node_address);
--echo 1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='wsrep_node_address';
--echo 1 Expected
SELECT @@wsrep_node_address = @@GLOBAL.wsrep_node_address;
--echo 1 Expected
SELECT COUNT(@@wsrep_node_address);
--echo 1 Expected
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@local.wsrep_node_address);
--echo Expected error 'Variable is a GLOBAL variable'
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@SESSION.wsrep_node_address);
--echo Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.wsrep_node_address);
--echo 1 Expected
--source include/have_wsrep.inc
--echo #
--echo # wsrep_node_address
--echo #
--echo # save the initial value
SET @wsrep_node_address_global_saved = @@global.wsrep_node_address;
--echo # default
SELECT @@global.wsrep_node_address;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_node_address;
SELECT @@global.wsrep_node_address;
--echo
--echo # valid values
SET @@global.wsrep_node_address='127.0.0.1';
SELECT @@global.wsrep_node_address;
# default == ''
SET @@global.wsrep_node_address=default;
SELECT @@global.wsrep_node_address;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_node_address=NULL;
SELECT @@global.wsrep_node_address;
# The values being assigned to wsrep_node_address are not verified so the
# following alues are currently valid too.
SET @@global.wsrep_node_address=ON;
SELECT @@global.wsrep_node_address;
SET @@global.wsrep_node_address='OFF';
SELECT @@global.wsrep_node_address;
SET @@global.wsrep_node_address='junk';
SELECT @@global.wsrep_node_address;
--echo
--echo # restore the initial value
SET @@global.wsrep_node_address = @wsrep_node_address_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
SELECT COUNT(@@GLOBAL.wsrep_node_incoming_address);
--echo 1 Expected
--error 1232
SET @@GLOBAL.wsrep_node_incoming_address=1;
--echo Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.wsrep_node_incoming_address);
--echo 1 Expected
SELECT @@GLOBAL.wsrep_node_incoming_address = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='wsrep_node_incoming_address';
--echo 1 Expected
SELECT COUNT(@@GLOBAL.wsrep_node_incoming_address);
--echo 1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='wsrep_node_incoming_address';
--echo 1 Expected
SELECT @@wsrep_node_incoming_address = @@GLOBAL.wsrep_node_incoming_address;
--echo 1 Expected
SELECT COUNT(@@wsrep_node_incoming_address);
--echo 1 Expected
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@local.wsrep_node_incoming_address);
--echo Expected error 'Variable is a GLOBAL variable'
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@SESSION.wsrep_node_incoming_address);
--echo Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.wsrep_node_incoming_address);
--echo 1 Expected
--source include/have_wsrep.inc
--echo #
--echo # wsrep_node_incoming_address
--echo #
--echo # save the initial value
SET @wsrep_node_incoming_address_global_saved = @@global.wsrep_node_incoming_address;
--echo # default
SELECT @@global.wsrep_node_incoming_address;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_node_incoming_address;
SELECT @@global.wsrep_node_incoming_address;
--echo
--echo # valid values
SET @@global.wsrep_node_incoming_address='127.0.0.1:4444';
SELECT @@global.wsrep_node_incoming_address;
SET @@global.wsrep_node_incoming_address='127.0.0.1';
SELECT @@global.wsrep_node_incoming_address;
SET @@global.wsrep_node_incoming_address=AUTO;
SELECT @@global.wsrep_node_incoming_address;
SET @@global.wsrep_node_incoming_address=default;
SELECT @@global.wsrep_node_incoming_address;
--echo
--echo # invalid values
# The values being assigned to wsrep_node_incoming_address are not verified so
# the following values are currently valid too.
SET @@global.wsrep_node_incoming_address=ON;
SELECT @@global.wsrep_node_incoming_address;
SET @@global.wsrep_node_incoming_address='OFF';
SELECT @@global.wsrep_node_incoming_address;
SET @@global.wsrep_node_incoming_address=NULL;
SELECT @@global.wsrep_node_incoming_address;
SET @@global.wsrep_node_incoming_address='junk';
SELECT @@global.wsrep_node_incoming_address;
--echo
--echo # restore the initial value
SET @@global.wsrep_node_incoming_address = @wsrep_node_incoming_address_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_node_name;
--echo #
--echo # wsrep_node_name
--echo #
set @@global.wsrep_node_name='test';
set @@global.wsrep_node_name=NULL;
--Error 1232
SET @@global.wsrep_node_name = 1;
call mtr.add_suppression("WSREP: Failed to get provider options");
set @@global.wsrep_node_name = @start_value;
\ No newline at end of file
--echo # save the initial value
SET @wsrep_node_name_global_saved = @@global.wsrep_node_name;
--echo # default
SELECT @@global.wsrep_node_name;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_node_name;
SET @@global.wsrep_node_name='node_name';
SELECT @@global.wsrep_node_name;
--echo
--echo # valid values
SET @@global.wsrep_node_name='my_node';
SELECT @@global.wsrep_node_name;
SET @@global.wsrep_node_name='hyphenated-node-name';
SELECT @@global.wsrep_node_name;
SET @@global.wsrep_node_name=default;
SELECT @@global.wsrep_node_name;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_node_name=NULL;
SELECT @@global.wsrep_node_name;
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_node_name=1;
SELECT @@global.wsrep_node_name;
--echo
--echo # restore the initial value
SET @@global.wsrep_node_name = @wsrep_node_name_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_notify_cmd;
--echo #
--echo # wsrep_notify_cmd
--echo #
set @@global.wsrep_notify_cmd='test';
set @@global.wsrep_notify_cmd=NULL;
--Error 1232
SET @@global.wsrep_notify_cmd = 1;
call mtr.add_suppression("WSREP: Failed to get provider options");
set @@global.wsrep_notify_cmd = @start_value;
\ No newline at end of file
--echo # save the initial value
SET @wsrep_notify_cmd_global_saved = @@global.wsrep_notify_cmd;
--echo # default
SELECT @@global.wsrep_notify_cmd;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_notify_cmd;
SET @@global.wsrep_notify_cmd='notify_cmd';
SELECT @@global.wsrep_notify_cmd;
--echo
--echo # valid values
SET @@global.wsrep_notify_cmd='command';
SELECT @@global.wsrep_notify_cmd;
SET @@global.wsrep_notify_cmd='hyphenated-command';
SELECT @@global.wsrep_notify_cmd;
SET @@global.wsrep_notify_cmd=default;
SELECT @@global.wsrep_notify_cmd;
SET @@global.wsrep_notify_cmd=NULL;
SELECT @@global.wsrep_notify_cmd;
--echo
--echo # invalid values
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_notify_cmd=1;
SELECT @@global.wsrep_notify_cmd;
--echo
--echo # restore the initial value
SET @@global.wsrep_notify_cmd = @wsrep_notify_cmd_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_on;
--echo #
--echo # wsrep_on
--echo #
set @@global.wsrep_on=ON;
set @@global.wsrep_on=OFF;
set @@global.wsrep_on=1;
set @@global.wsrep_on=0;
--Error 1231
SET @@global.wsrep_on = -1;
--echo # save the initial values
SET @wsrep_on_global_saved = @@global.wsrep_on;
SET @wsrep_on_session_saved = @@session.wsrep_on;
set @@global.wsrep_on = @start_value;
--echo # default
SELECT @@global.wsrep_on;
SELECT @@session.wsrep_on;
--echo
--echo # scope and valid values
SET @@global.wsrep_on=OFF;
SELECT @@global.wsrep_on;
SET @@global.wsrep_on=ON;
SELECT @@global.wsrep_on;
SET @@session.wsrep_on=OFF;
SELECT @@session.wsrep_on;
SET @@session.wsrep_on=ON;
SELECT @@session.wsrep_on;
SET @@session.wsrep_on=default;
SELECT @@session.wsrep_on;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_on=NULL;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_on='junk';
--error ER_WRONG_VALUE_FOR_VAR
SET @@session.wsrep_on=NULL;
--error ER_WRONG_VALUE_FOR_VAR
SET @@session.wsrep_on='junk';
--echo
--echo # restore the initial values
SET @@global.wsrep_on = @wsrep_on_global_saved;
SET @@session.wsrep_on = @wsrep_on_session_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_osu_method;
--echo #
--echo # wsrep_osu_method
--echo #
set @@global.wsrep_osu_method='TOI';
set @@global.wsrep_osu_method='RSU';
set @@global.wsrep_osu_method=TOI;
set @@global.wsrep_osu_method=RSU;
--echo # save the initial value
SET @wsrep_osu_method_global_saved = @@global.wsrep_osu_method;
--Error 1231
set @@global.wsrep_osu_method=TSU;
--Error 1231
set @@global.wsrep_osu_method='TSU';
--Error 1231
SET @@global.wsrep_on = -1;
--echo # default
SELECT @@global.wsrep_osu_method;
set @@global.wsrep_osu_method = @start_value;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_osu_method;
SET @@global.wsrep_osu_method=TOI;
SELECT @@global.wsrep_osu_method;
--echo
--echo # valid values
SET @@global.wsrep_osu_method=TOI;
SELECT @@global.wsrep_osu_method;
SET @@global.wsrep_osu_method=RSU;
SELECT @@global.wsrep_osu_method;
SET @@global.wsrep_osu_method="RSU";
SELECT @@global.wsrep_osu_method;
SET @@global.wsrep_osu_method=default;
SELECT @@global.wsrep_osu_method;
# numeric value
SET @@global.wsrep_osu_method=1;
SELECT @@global.wsrep_osu_method;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_osu_method=4;
SELECT @@global.wsrep_osu_method;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_osu_method=NULL;
SELECT @@global.wsrep_osu_method;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_osu_method='junk';
SELECT @@global.wsrep_osu_method;
--echo
--echo # restore the initial value
SET @@global.wsrep_osu_method = @wsrep_osu_method_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
SELECT COUNT(@@GLOBAL.wsrep_provider);
--echo 1 Expected
--echo #
--echo # wsrep_provider
--echo #
--echo # save the initial value
SET @wsrep_provider_global_saved = @@global.wsrep_provider;
--echo # default
SELECT @@global.wsrep_provider;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_provider;
SELECT @@global.wsrep_provider;
--echo
--echo # valid values
SET @@global.wsrep_provider=default;
SELECT @@global.wsrep_provider;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_provider='/invalid/libgalera_smm.so';
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_provider=NULL;
SELECT @@global.wsrep_provider;
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_provider=1;
SELECT @@global.wsrep_provider;
--echo
--echo # restore the initial value
SET @@global.wsrep_provider = @wsrep_provider_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
SELECT COUNT(@@GLOBAL.wsrep_provider_options);
--echo 1 Expected
--echo #
--echo # wsrep_provider_options
--echo #
call mtr.add_suppression("WSREP: Failed to get provider options");
--echo # save the initial value
SET @wsrep_provider_options_global_saved = @@global.wsrep_provider_options;
--echo # default
SELECT @@global.wsrep_provider_options;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_provider_options;
SET @@global.wsrep_provider_options='option1';
SELECT @@global.wsrep_provider_options;
--echo
--echo # valid values
SET @@global.wsrep_provider_options='name1=value1;name2=value2';
SELECT @@global.wsrep_provider_options;
SET @@global.wsrep_provider_options='hyphenated-name:value';
SELECT @@global.wsrep_provider_options;
SET @@global.wsrep_provider_options=default;
SELECT @@global.wsrep_provider_options;
--echo
--echo # invalid values
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_provider_options=1;
SELECT @@global.wsrep_provider_options;
--error ER_WRONG_ARGUMENTS
SET @@global.wsrep_provider_options=NULL;
SELECT @@global.wsrep_provider_options;
--echo
--echo # restore the initial value
SET @@global.wsrep_provider_options = @wsrep_provider_options_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
SELECT COUNT(@@GLOBAL.wsrep_recover);
--echo 1 Expected
--Error 1238
set @@global.wsrep_recover=ON;
--echo Expected error 'Readonly variable'
--Error 1238
set @@global.wsrep_recover=OFF;
--echo Expected error 'Readonly variable'
SELECT @@GLOBAL.wsrep_recover = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='wsrep_recover';
--echo 1 Expected
SELECT COUNT(@@GLOBAL.wsrep_recover);
--echo 1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='wsrep_recover';
--echo 1 Expected
SELECT @@wsrep_recover = @@GLOBAL.wsrep_recover;
--echo 1 Expected
SELECT COUNT(@@wsrep_recover);
--echo 1 Expected
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@local.wsrep_recover);
--echo Expected error 'Variable is a GLOBAL variable'
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@SESSION.wsrep_recover);
--echo Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.wsrep_recover);
--echo 1 Expected
--Error ER_BAD_FIELD_ERROR
SELECT wsrep_recover = @@SESSION.wsrep_recover;
--echo Expected error 'Readonly variable'
--source include/have_wsrep.inc
--echo #
--echo # wsrep_recover
--echo #
--echo # default
SELECT @@global.wsrep_recover;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_recover;
--echo
--echo # scope and valid values
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.wsrep_recover=OFF;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.wsrep_recover=ON;
--echo
--echo # invalid values
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.wsrep_recover=NULL;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.wsrep_recover='junk';
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_replicate_myisam;
--echo #
--echo # wsrep_replicate_myisam
--echo #
set @@global.wsrep_replicate_myisam=ON;
set @@global.wsrep_replicate_myisam=OFF;
set @@global.wsrep_replicate_myisam=1;
set @@global.wsrep_replicate_myisam=0;
--Error 1231
SET @@global.wsrep_replicate_myisam = -1;
--echo # save the initial value
SET @wsrep_replicate_myisam_global_saved = @@global.wsrep_replicate_myisam;
set @@global.wsrep_replicate_myisam = @start_value;
\ No newline at end of file
--echo # default
SELECT @@global.wsrep_replicate_myisam;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_replicate_myisam;
--echo
--echo # scope and valid values
#--error ER_INCORRECT_GLOBAL_LOCAL_VAR
#TODO: check if it is expected for variable to be dynamic?
SET @@global.wsrep_replicate_myisam=OFF;
SELECT @@global.wsrep_replicate_myisam;
#--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.wsrep_replicate_myisam=ON;
SELECT @@global.wsrep_replicate_myisam;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_replicate_myisam=NULL;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_replicate_myisam='junk';
--echo
--echo # restore the initial value
SET @@global.wsrep_replicate_myisam = @wsrep_replicate_myisam_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_restart_slave;
--echo #
--echo # wsrep_restart_slave
--echo #
set @@global.wsrep_restart_slave=ON;
set @@global.wsrep_restart_slave=OFF;
set @@global.wsrep_restart_slave=1;
set @@global.wsrep_restart_slave=0;
--Error 1231
SET @@global.wsrep_restart_slave = -1;
--echo # save the initial value
SET @wsrep_restart_slave_global_saved = @@global.wsrep_restart_slave;
set @@global.wsrep_restart_slave = @start_value;
\ No newline at end of file
--echo # default
SELECT @@global.wsrep_restart_slave;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_restart_slave;
--echo
--echo # scope and valid values
#--error ER_INCORRECT_GLOBAL_LOCAL_VAR
#TODO: check if it is expected for variable to be dynamic?
SET @@global.wsrep_restart_slave=OFF;
SELECT @@global.wsrep_restart_slave;
#--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.wsrep_restart_slave=ON;
SELECT @@global.wsrep_restart_slave;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_restart_slave=NULL;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_restart_slave='junk';
--echo
--echo # restore the initial value
SET @@global.wsrep_restart_slave = @wsrep_restart_slave_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_restart_slave;
--echo #
--echo # wsrep_retry_autocommit
--echo #
set @@global.wsrep_restart_slave=ON;
set @@global.wsrep_restart_slave=OFF;
set @@global.wsrep_restart_slave=1;
set @@global.wsrep_restart_slave=0;
--Error 1231
SET @@global.wsrep_restart_slave = -1;
--echo # save the initial values
SET @wsrep_retry_autocommit_global_saved = @@global.wsrep_retry_autocommit;
SET @wsrep_retry_autocommit_session_saved = @@session.wsrep_retry_autocommit;
set @@global.wsrep_restart_slave = @start_value;
\ No newline at end of file
--echo # default
SELECT @@global.wsrep_retry_autocommit;
--echo
--echo # scope
SET @@session.wsrep_retry_autocommit=1;
SELECT @@session.wsrep_retry_autocommit;
SET @@global.wsrep_retry_autocommit=1;
SELECT @@global.wsrep_retry_autocommit;
--echo
--echo # valid values
SET @@global.wsrep_retry_autocommit=10;
SELECT @@global.wsrep_retry_autocommit;
SET @@global.wsrep_retry_autocommit=0;
SELECT @@global.wsrep_retry_autocommit;
SET @@global.wsrep_retry_autocommit=default;
SELECT @global.wsrep_retry_autocommit;
SET @@session.wsrep_retry_autocommit=10;
SELECT @@session.wsrep_retry_autocommit;
SET @@session.wsrep_retry_autocommit=0;
SELECT @@session.wsrep_retry_autocommit;
SET @@session.wsrep_retry_autocommit=default;
SELECT @session.wsrep_retry_autocommit;
--echo
--echo # invalid values
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_retry_autocommit=NULL;
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_retry_autocommit='junk';
# expect warning : Truncated incorrect wsrep_retry_autocommit value: '-1'
SET @@global.wsrep_retry_autocommit=-1;
SELECT @global.wsrep_retry_autocommit;
--echo
--echo # restore the initial value
SET @@global.wsrep_retry_autocommit = @wsrep_retry_autocommit_global_saved;
SET @@session.wsrep_retry_autocommit = @wsrep_retry_autocommit_session_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
set @start_value = @@wsrep_slave_threads;
set @@global.wsrep_slave_threads=1;
set @@global.wsrep_slave_threads=4;
show warnings;
set @@global.wsrep_slave_threads=0;
show warnings;
set @@global.wsrep_slave_threads=-1;
show warnings;
--Error 1232
SET @@global.wsrep_slave_threads = r;
set @@global.wsrep_slave_threads = @start_value;
\ No newline at end of file
--source include/have_wsrep.inc
--echo #
--echo # wsrep_slave_threads
--echo #
--echo # save the initial value
SET @wsrep_slave_threads_global_saved = @@global.wsrep_slave_threads;
--echo # default
SELECT @@global.wsrep_slave_threads;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_slave_threads;
SET @@global.wsrep_slave_threads=1;
SELECT @@global.wsrep_slave_threads;
--echo
--echo # valid values
SET @@global.wsrep_slave_threads=10;
SELECT @@global.wsrep_slave_threads;
SET @@global.wsrep_slave_threads=0;
SELECT @@global.wsrep_slave_threads;
SET @@global.wsrep_slave_threads=default;
SELECT @global.wsrep_slave_threads;
--echo
--echo # invalid values
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_slave_threads=NULL;
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_slave_threads='junk';
# expect warning : Truncated incorrect wsrep_slave_threads value: '-1'
SET @@global.wsrep_slave_threads=-1;
SELECT @global.wsrep_slave_threads;
--echo
--echo # restore the initial value
SET @@global.wsrep_slave_threads = @wsrep_slave_threads_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
SELECT COUNT(@@wsrep_sst_auth);
# Cause crash, fix later
#set @start_value = @@wsrep_sst_auth;
#set @@global.wsrep_sst_auth='root:pass';
#set @@global.wsrep_sst_auth=NULL;
#set @@global.wsrep_sst_auth=r;
#set @@global.wsrep_sst_auth=1;
#set @@global.wsrep_sst_auth = @start_value;
--source include/have_wsrep.inc
--echo #
--echo # wsrep_sst_auth
--echo #
--echo # save the initial value
SET @wsrep_sst_auth_global_saved = @@global.wsrep_sst_auth;
--echo # default
SELECT @@global.wsrep_sst_auth;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_sst_auth;
SET @@global.wsrep_sst_auth='user:pass';
SELECT @@global.wsrep_sst_auth;
--echo
--echo # valid values
SET @@global.wsrep_sst_auth=user;
SELECT @@global.wsrep_sst_auth;
SET @@global.wsrep_sst_auth='user:1234';
SELECT @@global.wsrep_sst_auth;
SET @@global.wsrep_sst_auth='hyphenated-user-name:';
SELECT @@global.wsrep_sst_auth;
SET @@global.wsrep_sst_auth=default;
SELECT @@global.wsrep_sst_auth;
SET @@global.wsrep_sst_auth=NULL;
SELECT @@global.wsrep_sst_auth;
--echo
--echo # invalid values
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_sst_auth=1;
SELECT @@global.wsrep_sst_auth;
--error ER_PARSE_ERROR
SET @@global.wsrep_sst_auth=user:pass;
--echo
--echo # restore the initial value
SET @@global.wsrep_sst_auth = @wsrep_sst_auth_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
SELECT COUNT(@@wsrep_sst_donor);
set @start_value = @@wsrep_sst_donor;
set @@global.wsrep_sst_donor='foo';
set @@global.wsrep_sst_donor=NULL;
set @@global.wsrep_sst_donor=r;
--error 1232
set @@global.wsrep_sst_donor=1;
set @@global.wsrep_sst_donor = @start_value;
--source include/have_wsrep.inc
--echo #
--echo # wsrep_sst_donor
--echo #
--echo # save the initial value
SET @wsrep_sst_donor_global_saved = @@global.wsrep_sst_donor;
--echo # default
SELECT @@global.wsrep_sst_donor;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_sst_donor;
SET @@global.wsrep_sst_donor=rsync;
SELECT @@global.wsrep_sst_donor;
--echo
--echo # valid values
SET @@global.wsrep_sst_donor=node1;
SELECT @@global.wsrep_sst_donor;
SET @@global.wsrep_sst_donor='node1,node2';
SELECT @@global.wsrep_sst_donor;
SET @@global.wsrep_sst_donor='hyphenated-donor-name';
SELECT @@global.wsrep_sst_donor;
SET @@global.wsrep_sst_donor=default;
SELECT @@global.wsrep_sst_donor;
SET @@global.wsrep_sst_donor=NULL;
SELECT @@global.wsrep_sst_donor;
--echo
--echo # invalid values
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_sst_donor=1;
SELECT @@global.wsrep_sst_donor;
--echo
--echo # restore the initial value
SET @@global.wsrep_sst_donor = @wsrep_sst_donor_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_sst_donor_rejects_queries;
--echo #
--echo # wsrep_sst_donor_rejects_queries
--echo #
set @@global.wsrep_sst_donor_rejects_queries=ON;
set @@global.wsrep_sst_donor_rejects_queries=OFF;
set @@global.wsrep_sst_donor_rejects_queries=1;
set @@global.wsrep_sst_donor_rejects_queries=0;
--Error 1231
SET @@global.wsrep_sst_donor_rejects_queries = -1;
--echo # save the initial value
SET @wsrep_sst_donor_rejects_queries_global_saved = @@global.wsrep_sst_donor_rejects_queries;
set @@global.wsrep_sst_donor_rejects_queries = @start_value;
--echo # default
SELECT @@global.wsrep_sst_donor_rejects_queries;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_sst_donor_rejects_queries;
SET @@global.wsrep_sst_donor_rejects_queries=OFF;
SELECT @@global.wsrep_sst_donor_rejects_queries;
SET @@global.wsrep_sst_donor_rejects_queries=ON;
SELECT @@global.wsrep_sst_donor_rejects_queries;
--echo
--echo # valid values
SET @@global.wsrep_sst_donor_rejects_queries='OFF';
SELECT @@global.wsrep_sst_donor_rejects_queries;
SET @@global.wsrep_sst_donor_rejects_queries=ON;
SELECT @@global.wsrep_sst_donor_rejects_queries;
SET @@global.wsrep_sst_donor_rejects_queries=default;
SELECT @@global.wsrep_sst_donor_rejects_queries;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_sst_donor_rejects_queries=NULL;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_sst_donor_rejects_queries='junk';
--echo
--echo # restore the initial value
SET @@global.wsrep_sst_donor_rejects_queries = @wsrep_sst_donor_rejects_queries_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
set @start_value = @@wsrep_sst_method;
set @@global.wsrep_sst_method='xtrabackup';
set @@global.wsrep_sst_method='xtrabackup-v2';
set @@global.wsrep_sst_method='rsync';
set @@global.wsrep_sst_method='mysqldump';
set @@global.wsrep_sst_method='myscript';
set @@global.wsrep_sst_method='skip';
--error 1231
set @@global.wsrep_sst_method=NULL;
--Error 1232
SET @@global.wsrep_sst_method = -1;
set @@global.wsrep_sst_method = @start_value;
\ No newline at end of file
--source include/have_wsrep.inc
--echo #
--echo # wsrep_sst_method
--echo #
--echo # save the initial value
SET @wsrep_sst_method_global_saved = @@global.wsrep_sst_method;
--echo # default
SELECT @@global.wsrep_sst_method;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_sst_method;
SET @@global.wsrep_sst_method=rsync;
SELECT @@global.wsrep_sst_method;
--echo
--echo # valid values
SET @@global.wsrep_sst_method=rsync;
SELECT @@global.wsrep_sst_method;
SET @@global.wsrep_sst_method=mysqldump;
SELECT @@global.wsrep_sst_method;
SET @@global.wsrep_sst_method=xtrabackup;
SELECT @@global.wsrep_sst_method;
SET @@global.wsrep_sst_method="xtrabackup-v2";
SELECT @@global.wsrep_sst_method;
SET @@global.wsrep_sst_method=default;
SELECT @@global.wsrep_sst_method;
# Its a valid name for an SST method
SET @@global.wsrep_sst_method='junk';
SELECT @@global.wsrep_sst_method;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_sst_method=NULL;
SELECT @@global.wsrep_sst_method;
--echo
--echo # restore the initial value
SET @@global.wsrep_sst_method = @wsrep_sst_method_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_sst_receive_address;
--echo #
--echo # wsrep_sst_receive_address
--echo #
set @@global.wsrep_sst_receive_address='128.0.2.1';
set @@global.wsrep_sst_receive_address=AUTO;
set @@global.wsrep_sst_receive_address='AUTO';
set @@global.wsrep_sst_receive_address=NULL;
--Error 1232
SET @@global.wsrep_sst_receive_address = -1;
--echo # save the initial value
SET @wsrep_sst_receive_address_global_saved = @@global.wsrep_sst_receive_address;
set @@global.wsrep_sst_receive_address = @start_value;
--echo # default
SELECT @@global.wsrep_sst_receive_address;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_sst_receive_address;
SELECT @@global.wsrep_sst_receive_address;
--echo
--echo # valid values
SET @@global.wsrep_sst_receive_address=AUTO;
SELECT @@global.wsrep_sst_receive_address;
SET @@global.wsrep_sst_receive_address=default;
SELECT @@global.wsrep_sst_receive_address;
SET @@global.wsrep_sst_receive_address='192.168.2.254';
SELECT @@global.wsrep_sst_receive_address;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_sst_receive_address='127.0.0.1:4444';
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_sst_receive_address='127.0.0.1';
SELECT @@global.wsrep_sst_receive_address;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_sst_receive_address=NULL;
SELECT @@global.wsrep_sst_receive_address;
# Currently there is no strict checking performed for wsrep_sst_receive_address
# so following values jusr pass through.
SET @@global.wsrep_sst_receive_address='OFF';
SELECT @@global.wsrep_sst_receive_address;
SET @@global.wsrep_sst_receive_address=ON;
SELECT @@global.wsrep_sst_receive_address;
SET @@global.wsrep_sst_receive_address='';
SELECT @@global.wsrep_sst_receive_address;
SET @@global.wsrep_sst_receive_address='junk';
SELECT @@global.wsrep_sst_receive_address;
--echo
--echo # restore the initial value
SET @@global.wsrep_sst_receive_address = @wsrep_sst_receive_address_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_wsrep.inc
set @start_value = @@wsrep_start_position;
--echo #
--echo # wsrep_start_position
--echo #
--error 1231
set @@global.wsrep_start_position='foo:bar';
--error 1231
set @@global.wsrep_start_position=NULL;
--Error 1232
SET @@global.wsrep_start_position = -1;
--echo # save the initial value
SET @wsrep_start_position_global_saved = @@global.wsrep_start_position;
set @@global.wsrep_start_position = @start_value;
--echo # default
SELECT @@global.wsrep_start_position;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_start_position;
SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-1';
SELECT @@global.wsrep_start_position;
--echo
--echo # valid values
SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-2';
SELECT @@global.wsrep_start_position;
SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:100';
SELECT @@global.wsrep_start_position;
SET @@global.wsrep_start_position=default;
SELECT @@global.wsrep_start_position;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position='000000000000000-0000-0000-0000-000000000000:-1';
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position='12345678-1234-1234-12345-123456789012:100';
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position='12345678-1234-123-12345-123456789012:0';
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:_99999';
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:a';
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position='OFF';
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position=ON;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position='';
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position=NULL;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_start_position='junk';
--echo
--echo # restore the initial value
SET @@global.wsrep_start_position = @wsrep_start_position_global_saved;
--echo # End of test
--source include/galera_cluster.inc
--source include/have_innodb.inc
set @start_value = @@wsrep_provider;
set @@global.wsrep_provider=none;
--Error 1231
SET @@global.wsrep_provider = -1;
set @@global.wsrep_provider = @start_value;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment