Commit c768af75 authored by Nirbhay Choubey's avatar Nirbhay Choubey

Minor modifications

- Simplified test cases in wsrep.variables
- Fixed a condition in wsrep_check_opts.cc
- Fixed an "unbound variable" in wsrep_sst_rsync
parent 7474e7ba
* 'wsrep' suite is designated for tests which do not require a multi-node
galera cluster.
* As these tests are specific to wsrep-related functionalities, they must skip
on server built without wsrep patch (vanilla). (-DWITH_WSREP=OFF)
See : include/have_wsrep.inc, include/have_wsrep_enabled.inc, not_wsrep.inc
...@@ -11,112 +11,110 @@ SET SESSION wsrep_replicate_myisam= ON; ...@@ -11,112 +11,110 @@ SET SESSION wsrep_replicate_myisam= ON;
ERROR HY000: Variable 'wsrep_replicate_myisam' is a GLOBAL variable and should be set with SET GLOBAL ERROR HY000: Variable 'wsrep_replicate_myisam' is a GLOBAL variable and should be set with SET GLOBAL
SET GLOBAL wsrep_replicate_myisam= ON; SET GLOBAL wsrep_replicate_myisam= ON;
SET GLOBAL wsrep_replicate_myisam= OFF; SET GLOBAL wsrep_replicate_myisam= OFF;
SET GLOBAL wsrep_provider=none;
# #
# MDEV#5790: SHOW GLOBAL STATUS LIKE does not show the correct list of # MDEV#5790: SHOW GLOBAL STATUS LIKE does not show the correct list of
# variables when using "_" # variables when using "_"
# #
CALL mtr.add_suppression("WSREP: Could not open saved state file for reading.*");
SHOW GLOBAL STATUS LIKE 'wsrep%'; SHOW GLOBAL STATUS LIKE 'wsrep%';
Variable_name Value Variable_name Value
wsrep_local_state_uuid #
wsrep_protocol_version #
wsrep_last_committed #
wsrep_replicated #
wsrep_replicated_bytes #
wsrep_repl_keys #
wsrep_repl_keys_bytes #
wsrep_repl_data_bytes #
wsrep_repl_other_bytes #
wsrep_received #
wsrep_received_bytes #
wsrep_local_commits #
wsrep_local_cert_failures #
wsrep_local_replays #
wsrep_local_send_queue #
wsrep_local_send_queue_avg #
wsrep_local_recv_queue #
wsrep_local_recv_queue_avg #
wsrep_local_cached_downto #
wsrep_flow_control_paused_ns #
wsrep_flow_control_paused #
wsrep_flow_control_sent #
wsrep_flow_control_recv #
wsrep_cert_deps_distance #
wsrep_apply_oooe # wsrep_apply_oooe #
wsrep_apply_oool # wsrep_apply_oool #
wsrep_apply_window # wsrep_apply_window #
wsrep_commit_oooe #
wsrep_commit_oool #
wsrep_commit_window #
wsrep_local_state #
wsrep_local_state_comment #
wsrep_cert_index_size #
wsrep_causal_reads # wsrep_causal_reads #
wsrep_cert_deps_distance #
wsrep_cert_index_size #
wsrep_cert_interval # wsrep_cert_interval #
wsrep_incoming_addresses #
wsrep_cluster_conf_id # wsrep_cluster_conf_id #
wsrep_cluster_size # wsrep_cluster_size #
wsrep_cluster_state_uuid # wsrep_cluster_state_uuid #
wsrep_cluster_status # wsrep_cluster_status #
wsrep_commit_oooe #
wsrep_commit_oool #
wsrep_commit_window #
wsrep_connected # wsrep_connected #
wsrep_flow_control_paused #
wsrep_flow_control_paused_ns #
wsrep_flow_control_recv #
wsrep_flow_control_sent #
wsrep_incoming_addresses #
wsrep_last_committed #
wsrep_local_bf_aborts # wsrep_local_bf_aborts #
wsrep_local_cached_downto #
wsrep_local_cert_failures #
wsrep_local_commits #
wsrep_local_index # wsrep_local_index #
wsrep_local_recv_queue #
wsrep_local_recv_queue_avg #
wsrep_local_replays #
wsrep_local_send_queue #
wsrep_local_send_queue_avg #
wsrep_local_state #
wsrep_local_state_comment #
wsrep_local_state_uuid #
wsrep_protocol_version #
wsrep_provider_name # wsrep_provider_name #
wsrep_provider_vendor # wsrep_provider_vendor #
wsrep_provider_version # wsrep_provider_version #
wsrep_ready # wsrep_ready #
wsrep_received #
wsrep_received_bytes #
wsrep_repl_data_bytes #
wsrep_repl_keys #
wsrep_repl_keys_bytes #
wsrep_repl_other_bytes #
wsrep_replicated #
wsrep_replicated_bytes #
wsrep_thread_count # wsrep_thread_count #
SHOW GLOBAL STATUS LIKE 'wsrep_%'; SHOW GLOBAL STATUS LIKE 'wsrep_%';
Variable_name Value Variable_name Value
wsrep_local_state_uuid #
wsrep_protocol_version #
wsrep_last_committed #
wsrep_replicated #
wsrep_replicated_bytes #
wsrep_repl_keys #
wsrep_repl_keys_bytes #
wsrep_repl_data_bytes #
wsrep_repl_other_bytes #
wsrep_received #
wsrep_received_bytes #
wsrep_local_commits #
wsrep_local_cert_failures #
wsrep_local_replays #
wsrep_local_send_queue #
wsrep_local_send_queue_avg #
wsrep_local_recv_queue #
wsrep_local_recv_queue_avg #
wsrep_local_cached_downto #
wsrep_flow_control_paused_ns #
wsrep_flow_control_paused #
wsrep_flow_control_sent #
wsrep_flow_control_recv #
wsrep_cert_deps_distance #
wsrep_apply_oooe # wsrep_apply_oooe #
wsrep_apply_oool # wsrep_apply_oool #
wsrep_apply_window # wsrep_apply_window #
wsrep_commit_oooe #
wsrep_commit_oool #
wsrep_commit_window #
wsrep_local_state #
wsrep_local_state_comment #
wsrep_cert_index_size #
wsrep_causal_reads # wsrep_causal_reads #
wsrep_cert_deps_distance #
wsrep_cert_index_size #
wsrep_cert_interval # wsrep_cert_interval #
wsrep_incoming_addresses #
wsrep_cluster_conf_id # wsrep_cluster_conf_id #
wsrep_cluster_size # wsrep_cluster_size #
wsrep_cluster_state_uuid # wsrep_cluster_state_uuid #
wsrep_cluster_status # wsrep_cluster_status #
wsrep_commit_oooe #
wsrep_commit_oool #
wsrep_commit_window #
wsrep_connected # wsrep_connected #
wsrep_flow_control_paused #
wsrep_flow_control_paused_ns #
wsrep_flow_control_recv #
wsrep_flow_control_sent #
wsrep_incoming_addresses #
wsrep_last_committed #
wsrep_local_bf_aborts # wsrep_local_bf_aborts #
wsrep_local_cached_downto #
wsrep_local_cert_failures #
wsrep_local_commits #
wsrep_local_index # wsrep_local_index #
wsrep_local_recv_queue #
wsrep_local_recv_queue_avg #
wsrep_local_replays #
wsrep_local_send_queue #
wsrep_local_send_queue_avg #
wsrep_local_state #
wsrep_local_state_comment #
wsrep_local_state_uuid #
wsrep_protocol_version #
wsrep_provider_name # wsrep_provider_name #
wsrep_provider_vendor # wsrep_provider_vendor #
wsrep_provider_version # wsrep_provider_version #
wsrep_ready # wsrep_ready #
wsrep_received #
wsrep_received_bytes #
wsrep_repl_data_bytes #
wsrep_repl_keys #
wsrep_repl_keys_bytes #
wsrep_repl_other_bytes #
wsrep_replicated #
wsrep_replicated_bytes #
wsrep_thread_count # wsrep_thread_count #
SHOW GLOBAL STATUS LIKE 'wsrep_local_state_comment'; SHOW GLOBAL STATUS LIKE 'wsrep_local_state_comment';
Variable_name Value Variable_name Value
...@@ -124,7 +122,6 @@ wsrep_local_state_comment # ...@@ -124,7 +122,6 @@ wsrep_local_state_comment #
# Should show nothing. # Should show nothing.
SHOW STATUS LIKE 'x'; SHOW STATUS LIKE 'x';
Variable_name Value Variable_name Value
SET GLOBAL wsrep_provider=none;
# #
# MDEV#6079: xtrabackup SST failing with maria-10.0-galera # MDEV#6079: xtrabackup SST failing with maria-10.0-galera
# #
...@@ -136,13 +133,11 @@ wsrep_local_state_uuid # ...@@ -136,13 +133,11 @@ wsrep_local_state_uuid #
SHOW STATUS LIKE 'wsrep_last_committed'; SHOW STATUS LIKE 'wsrep_last_committed';
Variable_name Value Variable_name Value
wsrep_last_committed # wsrep_last_committed #
SET GLOBAL wsrep_provider=none;
# #
# MDEV#6206: wsrep_slave_threads subtracts from max_connections # MDEV#6206: wsrep_slave_threads subtracts from max_connections
# #
call mtr.add_suppression("safe_mutex: Found wrong usage of mutex 'LOCK_wsrep_slave_threads' and 'LOCK_global_system_variables'"); call mtr.add_suppression("safe_mutex: Found wrong usage of mutex 'LOCK_wsrep_slave_threads' and 'LOCK_global_system_variables'");
call mtr.add_suppression("WSREP: Failed to get provider options");
SELECT @@global.wsrep_provider; SELECT @@global.wsrep_provider;
@@global.wsrep_provider @@global.wsrep_provider
libgalera_smm.so libgalera_smm.so
...@@ -151,36 +146,6 @@ SELECT @@global.wsrep_slave_threads; ...@@ -151,36 +146,6 @@ SELECT @@global.wsrep_slave_threads;
1 1
SELECT @@global.wsrep_cluster_address; SELECT @@global.wsrep_cluster_address;
@@global.wsrep_cluster_address @@global.wsrep_cluster_address
NULL
SHOW STATUS LIKE 'threads_connected';
Variable_name Value
Threads_connected 1
SHOW STATUS LIKE 'wsrep_thread_count';
Variable_name Value
wsrep_thread_count 0
SELECT @@global.wsrep_provider;
@@global.wsrep_provider
libgalera_smm.so
SELECT @@global.wsrep_cluster_address;
@@global.wsrep_cluster_address
NULL
SHOW STATUS LIKE 'threads_connected';
Variable_name Value
Threads_connected 1
SHOW STATUS LIKE 'wsrep_thread_count';
Variable_name Value
wsrep_thread_count 0
# Setting wsrep_cluster_address triggers the creation of
# applier/rollbacker threads.
SET GLOBAL wsrep_cluster_address= 'gcomm://';
# Wait for applier threads to get created.
SELECT @@global.wsrep_provider;
@@global.wsrep_provider
libgalera_smm.so
SELECT @@global.wsrep_cluster_address;
@@global.wsrep_cluster_address
gcomm:// gcomm://
SHOW STATUS LIKE 'threads_connected'; SHOW STATUS LIKE 'threads_connected';
Variable_name Value Variable_name Value
...@@ -192,13 +157,13 @@ wsrep_thread_count 2 ...@@ -192,13 +157,13 @@ wsrep_thread_count 2
SET @wsrep_slave_threads_saved= @@global.wsrep_slave_threads; SET @wsrep_slave_threads_saved= @@global.wsrep_slave_threads;
SET GLOBAL wsrep_slave_threads= 10; SET GLOBAL wsrep_slave_threads= 10;
# Wait for applier threads to get created. # Wait for applier threads to get created.
SHOW STATUS LIKE 'wsrep_thread_count';
Variable_name Value
wsrep_thread_count 11
SHOW STATUS LIKE 'threads_connected'; SHOW STATUS LIKE 'threads_connected';
Variable_name Value Variable_name Value
Threads_connected 1 Threads_connected 1
SET GLOBAL wsrep_slave_threads= @wsrep_slave_threads_saved; SET GLOBAL wsrep_slave_threads= @wsrep_slave_threads_saved;
SET GLOBAL wsrep_provider= none;
SET GLOBAL wsrep_cluster_address= '';
SET GLOBAL wsrep_provider_options= '';
# #
# MDEV#6411: Setting set @@global.wsrep_sst_auth=NULL causes crash # MDEV#6411: Setting set @@global.wsrep_sst_auth=NULL causes crash
# #
......
--source include/have_wsrep.inc --source include/have_wsrep.inc
--source include/have_symlink.inc --source include/have_symlink.inc
--source include/not_windows.inc --source include/not_windows.inc
--source include/have_innodb.inc
--echo # --echo #
--echo # MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above --echo # MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
......
--source include/have_wsrep.inc --source include/have_wsrep.inc
--source include/have_innodb.inc
# Set galera's base_port so that test can run in parallel with other galera
# tests.
--disable_query_log
eval SET GLOBAL wsrep_provider_options='base_port=$GALERA_BASE_PORT';
--enable_query_log
--echo --echo
--echo # MDEV#5534: mysql_tzinfo_to_sql generates wrong query --echo # MDEV#5534: mysql_tzinfo_to_sql generates wrong query
--echo # --echo #
--echo # Testing wsrep_replicate_myisam variable. --echo # Testing wsrep_replicate_myisam variable.
--disable_query_log
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
--enable_query_log
--error ER_INCORRECT_GLOBAL_LOCAL_VAR --error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_replicate_myisam; SELECT @@session.wsrep_replicate_myisam;
SELECT @@global.wsrep_replicate_myisam; SELECT @@global.wsrep_replicate_myisam;
...@@ -25,19 +16,12 @@ SET GLOBAL wsrep_replicate_myisam= ON; ...@@ -25,19 +16,12 @@ SET GLOBAL wsrep_replicate_myisam= ON;
# Reset it back. # Reset it back.
SET GLOBAL wsrep_replicate_myisam= OFF; SET GLOBAL wsrep_replicate_myisam= OFF;
SET GLOBAL wsrep_provider=none;
--echo # --echo #
--echo # MDEV#5790: SHOW GLOBAL STATUS LIKE does not show the correct list of --echo # MDEV#5790: SHOW GLOBAL STATUS LIKE does not show the correct list of
--echo # variables when using "_" --echo # variables when using "_"
--echo # --echo #
CALL mtr.add_suppression("WSREP: Could not open saved state file for reading.*");
--disable_query_log
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
--enable_query_log
--replace_column 2 # --replace_column 2 #
SHOW GLOBAL STATUS LIKE 'wsrep%'; SHOW GLOBAL STATUS LIKE 'wsrep%';
...@@ -51,17 +35,10 @@ SHOW GLOBAL STATUS LIKE 'wsrep_local_state_comment'; ...@@ -51,17 +35,10 @@ SHOW GLOBAL STATUS LIKE 'wsrep_local_state_comment';
--echo # Should show nothing. --echo # Should show nothing.
SHOW STATUS LIKE 'x'; SHOW STATUS LIKE 'x';
# Reset it back.
SET GLOBAL wsrep_provider=none;
--echo # --echo #
--echo # MDEV#6079: xtrabackup SST failing with maria-10.0-galera --echo # MDEV#6079: xtrabackup SST failing with maria-10.0-galera
--echo # --echo #
--disable_query_log
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
--enable_query_log
# The following 2 variables are used in innobackupex during xtrabackup-based # The following 2 variables are used in innobackupex during xtrabackup-based
# SST. # SST.
--echo --echo
...@@ -71,19 +48,11 @@ SHOW STATUS LIKE 'wsrep_local_state_uuid'; ...@@ -71,19 +48,11 @@ SHOW STATUS LIKE 'wsrep_local_state_uuid';
--replace_column 2 # --replace_column 2 #
SHOW STATUS LIKE 'wsrep_last_committed'; SHOW STATUS LIKE 'wsrep_last_committed';
# Reset it back.
SET GLOBAL wsrep_provider=none;
--echo --echo
--echo # --echo #
--echo # MDEV#6206: wsrep_slave_threads subtracts from max_connections --echo # MDEV#6206: wsrep_slave_threads subtracts from max_connections
--echo # --echo #
call mtr.add_suppression("safe_mutex: Found wrong usage of mutex 'LOCK_wsrep_slave_threads' and 'LOCK_global_system_variables'"); call mtr.add_suppression("safe_mutex: Found wrong usage of mutex 'LOCK_wsrep_slave_threads' and 'LOCK_global_system_variables'");
call mtr.add_suppression("WSREP: Failed to get provider options");
--disable_query_log
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
--enable_query_log
--replace_regex /.*libgalera_smm.*/libgalera_smm.so/ --replace_regex /.*libgalera_smm.*/libgalera_smm.so/
SELECT @@global.wsrep_provider; SELECT @@global.wsrep_provider;
...@@ -93,41 +62,15 @@ SHOW STATUS LIKE 'threads_connected'; ...@@ -93,41 +62,15 @@ SHOW STATUS LIKE 'threads_connected';
SHOW STATUS LIKE 'wsrep_thread_count'; SHOW STATUS LIKE 'wsrep_thread_count';
--echo --echo
--disable_query_log
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
--enable_query_log
--replace_regex /.*libgalera_smm.*/libgalera_smm.so/
SELECT @@global.wsrep_provider;
SELECT @@global.wsrep_cluster_address;
SHOW STATUS LIKE 'threads_connected';
SHOW STATUS LIKE 'wsrep_thread_count';
--echo
--echo # Setting wsrep_cluster_address triggers the creation of
--echo # applier/rollbacker threads.
SET GLOBAL wsrep_cluster_address= 'gcomm://';
--echo # Wait for applier threads to get created.
sleep 3;
--replace_regex /.*libgalera_smm.*/libgalera_smm.so/
SELECT @@global.wsrep_provider;
SELECT @@global.wsrep_cluster_address;
SHOW STATUS LIKE 'threads_connected';
SHOW STATUS LIKE 'wsrep_thread_count';
--echo
SET @wsrep_slave_threads_saved= @@global.wsrep_slave_threads; SET @wsrep_slave_threads_saved= @@global.wsrep_slave_threads;
SET GLOBAL wsrep_slave_threads= 10; SET GLOBAL wsrep_slave_threads= 10;
--echo # Wait for applier threads to get created. --echo # Wait for applier threads to get created.
sleep 5; sleep 5;
SHOW STATUS LIKE 'wsrep_thread_count';
SHOW STATUS LIKE 'threads_connected'; SHOW STATUS LIKE 'threads_connected';
# reset (for mtr internal checks) # reset (for mtr internal checks)
SET GLOBAL wsrep_slave_threads= @wsrep_slave_threads_saved; SET GLOBAL wsrep_slave_threads= @wsrep_slave_threads_saved;
SET GLOBAL wsrep_provider= none;
SET GLOBAL wsrep_cluster_address= '';
SET GLOBAL wsrep_provider_options= '';
--echo # --echo #
--echo # MDEV#6411: Setting set @@global.wsrep_sst_auth=NULL causes crash --echo # MDEV#6411: Setting set @@global.wsrep_sst_auth=NULL causes crash
......
...@@ -259,7 +259,7 @@ then ...@@ -259,7 +259,7 @@ then
RSYNC_CONF="$WSREP_SST_OPT_DATA/$MODULE.conf" RSYNC_CONF="$WSREP_SST_OPT_DATA/$MODULE.conf"
if [ -n "$MYSQL_TMP_DIR" ] ; then if [ -n "${MYSQL_TMP_DIR:-}" ] ; then
SILENT="log file = $MYSQL_TMP_DIR/rsynd.log" SILENT="log file = $MYSQL_TMP_DIR/rsynd.log"
else else
SILENT="" SILENT=""
......
...@@ -37,6 +37,7 @@ int wsrep_check_opts() ...@@ -37,6 +37,7 @@ int wsrep_check_opts()
" innodb_autoinc_lock_mode = 2."); " innodb_autoinc_lock_mode = 2.");
return 1; return 1;
} }
}
if (locked_in_memory) if (locked_in_memory)
{ {
...@@ -96,7 +97,6 @@ int wsrep_check_opts() ...@@ -96,7 +97,6 @@ int wsrep_check_opts()
return 1; return 1;
} }
} }
}
return 0; return 0;
} }
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