mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Minor modifications
- Simplified test cases in wsrep.variables - Fixed a condition in wsrep_check_opts.cc - Fixed an "unbound variable" in wsrep_sst_rsync
This commit is contained in:
@ -1,7 +0,0 @@
|
||||
* '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;
|
||||
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= OFF;
|
||||
SET GLOBAL wsrep_provider=none;
|
||||
#
|
||||
# MDEV#5790: SHOW GLOBAL STATUS LIKE does not show the correct list of
|
||||
# variables when using "_"
|
||||
#
|
||||
CALL mtr.add_suppression("WSREP: Could not open saved state file for reading.*");
|
||||
SHOW GLOBAL STATUS LIKE 'wsrep%';
|
||||
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_oool #
|
||||
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_cert_deps_distance #
|
||||
wsrep_cert_index_size #
|
||||
wsrep_cert_interval #
|
||||
wsrep_incoming_addresses #
|
||||
wsrep_cluster_conf_id #
|
||||
wsrep_cluster_size #
|
||||
wsrep_cluster_state_uuid #
|
||||
wsrep_cluster_status #
|
||||
wsrep_commit_oooe #
|
||||
wsrep_commit_oool #
|
||||
wsrep_commit_window #
|
||||
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_cached_downto #
|
||||
wsrep_local_cert_failures #
|
||||
wsrep_local_commits #
|
||||
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_vendor #
|
||||
wsrep_provider_version #
|
||||
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 #
|
||||
|
||||
SHOW GLOBAL STATUS LIKE 'wsrep_%';
|
||||
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_oool #
|
||||
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_cert_deps_distance #
|
||||
wsrep_cert_index_size #
|
||||
wsrep_cert_interval #
|
||||
wsrep_incoming_addresses #
|
||||
wsrep_cluster_conf_id #
|
||||
wsrep_cluster_size #
|
||||
wsrep_cluster_state_uuid #
|
||||
wsrep_cluster_status #
|
||||
wsrep_commit_oooe #
|
||||
wsrep_commit_oool #
|
||||
wsrep_commit_window #
|
||||
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_cached_downto #
|
||||
wsrep_local_cert_failures #
|
||||
wsrep_local_commits #
|
||||
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_vendor #
|
||||
wsrep_provider_version #
|
||||
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 #
|
||||
SHOW GLOBAL STATUS LIKE 'wsrep_local_state_comment';
|
||||
Variable_name Value
|
||||
@ -124,7 +122,6 @@ wsrep_local_state_comment #
|
||||
# Should show nothing.
|
||||
SHOW STATUS LIKE 'x';
|
||||
Variable_name Value
|
||||
SET GLOBAL wsrep_provider=none;
|
||||
#
|
||||
# MDEV#6079: xtrabackup SST failing with maria-10.0-galera
|
||||
#
|
||||
@ -136,13 +133,11 @@ wsrep_local_state_uuid #
|
||||
SHOW STATUS LIKE 'wsrep_last_committed';
|
||||
Variable_name Value
|
||||
wsrep_last_committed #
|
||||
SET GLOBAL wsrep_provider=none;
|
||||
|
||||
#
|
||||
# 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("WSREP: Failed to get provider options");
|
||||
SELECT @@global.wsrep_provider;
|
||||
@@global.wsrep_provider
|
||||
libgalera_smm.so
|
||||
@ -151,36 +146,6 @@ SELECT @@global.wsrep_slave_threads;
|
||||
1
|
||||
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
|
||||
|
||||
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://
|
||||
SHOW STATUS LIKE 'threads_connected';
|
||||
Variable_name Value
|
||||
@ -192,13 +157,13 @@ wsrep_thread_count 2
|
||||
SET @wsrep_slave_threads_saved= @@global.wsrep_slave_threads;
|
||||
SET GLOBAL wsrep_slave_threads= 10;
|
||||
# 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';
|
||||
Variable_name Value
|
||||
Threads_connected 1
|
||||
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
|
||||
#
|
||||
|
@ -1,6 +1,7 @@
|
||||
--source include/have_wsrep.inc
|
||||
--source include/have_symlink.inc
|
||||
--source include/not_windows.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
|
||||
|
@ -1,20 +1,11 @@
|
||||
--source include/have_wsrep.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
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--echo
|
||||
--echo # MDEV#5534: mysql_tzinfo_to_sql generates wrong query
|
||||
--echo #
|
||||
--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
|
||||
SELECT @@session.wsrep_replicate_myisam;
|
||||
SELECT @@global.wsrep_replicate_myisam;
|
||||
@ -25,19 +16,12 @@ SET GLOBAL wsrep_replicate_myisam= ON;
|
||||
|
||||
# Reset it back.
|
||||
SET GLOBAL wsrep_replicate_myisam= OFF;
|
||||
SET GLOBAL wsrep_provider=none;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV#5790: SHOW GLOBAL STATUS LIKE does not show the correct list of
|
||||
--echo # variables when using "_"
|
||||
--echo #
|
||||
|
||||
CALL mtr.add_suppression("WSREP: Could not open saved state file for reading.*");
|
||||
|
||||
--disable_query_log
|
||||
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
|
||||
--enable_query_log
|
||||
|
||||
--replace_column 2 #
|
||||
SHOW GLOBAL STATUS LIKE 'wsrep%';
|
||||
|
||||
@ -51,17 +35,10 @@ SHOW GLOBAL STATUS LIKE 'wsrep_local_state_comment';
|
||||
--echo # Should show nothing.
|
||||
SHOW STATUS LIKE 'x';
|
||||
|
||||
# Reset it back.
|
||||
SET GLOBAL wsrep_provider=none;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV#6079: xtrabackup SST failing with maria-10.0-galera
|
||||
--echo #
|
||||
|
||||
--disable_query_log
|
||||
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
|
||||
--enable_query_log
|
||||
|
||||
# The following 2 variables are used in innobackupex during xtrabackup-based
|
||||
# SST.
|
||||
--echo
|
||||
@ -71,19 +48,11 @@ SHOW STATUS LIKE 'wsrep_local_state_uuid';
|
||||
--replace_column 2 #
|
||||
SHOW STATUS LIKE 'wsrep_last_committed';
|
||||
|
||||
# Reset it back.
|
||||
SET GLOBAL wsrep_provider=none;
|
||||
|
||||
--echo
|
||||
--echo #
|
||||
--echo # MDEV#6206: wsrep_slave_threads subtracts from max_connections
|
||||
--echo #
|
||||
call mtr.add_suppression("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/
|
||||
SELECT @@global.wsrep_provider;
|
||||
@ -93,41 +62,15 @@ SHOW STATUS LIKE 'threads_connected';
|
||||
SHOW STATUS LIKE 'wsrep_thread_count';
|
||||
--echo
|
||||
|
||||
--disable_query_log
|
||||
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
|
||||
--enable_query_log
|
||||
|
||||
--replace_regex /.*libgalera_smm.*/libgalera_smm.so/
|
||||
SELECT @@global.wsrep_provider;
|
||||
SELECT @@global.wsrep_cluster_address;
|
||||
SHOW STATUS LIKE 'threads_connected';
|
||||
SHOW STATUS LIKE 'wsrep_thread_count';
|
||||
--echo
|
||||
|
||||
--echo # Setting wsrep_cluster_address triggers the creation of
|
||||
--echo # applier/rollbacker threads.
|
||||
SET GLOBAL wsrep_cluster_address= 'gcomm://';
|
||||
--echo # Wait for applier threads to get created.
|
||||
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 GLOBAL wsrep_slave_threads= 10;
|
||||
--echo # Wait for applier threads to get created.
|
||||
sleep 5;
|
||||
SHOW STATUS LIKE 'wsrep_thread_count';
|
||||
SHOW STATUS LIKE 'threads_connected';
|
||||
|
||||
# reset (for mtr internal checks)
|
||||
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 # MDEV#6411: Setting set @@global.wsrep_sst_auth=NULL causes crash
|
||||
|
@ -259,7 +259,7 @@ then
|
||||
|
||||
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"
|
||||
else
|
||||
SILENT=""
|
||||
|
@ -37,64 +37,64 @@ int wsrep_check_opts()
|
||||
" innodb_autoinc_lock_mode = 2.");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (locked_in_memory)
|
||||
if (locked_in_memory)
|
||||
{
|
||||
WSREP_ERROR("Memory locking is not supported (locked_in_memory=ON)");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!strcasecmp(wsrep_sst_method, "mysqldump"))
|
||||
{
|
||||
if (!strcasecmp(my_bind_addr_str, "127.0.0.1") ||
|
||||
!strcasecmp(my_bind_addr_str, "localhost"))
|
||||
{
|
||||
WSREP_ERROR("Memory locking is not supported (locked_in_memory=ON)");
|
||||
WSREP_ERROR("wsrep_sst_method is set to 'mysqldump' yet "
|
||||
"mysqld bind_address is set to '%s', which makes it "
|
||||
"impossible to receive state transfer from another "
|
||||
"node, since mysqld won't accept such connections. "
|
||||
"If you wish to use mysqldump state transfer method, "
|
||||
"set bind_address to allow mysql client connections "
|
||||
"from other cluster members (e.g. 0.0.0.0).",
|
||||
my_bind_addr_str);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!strcasecmp(wsrep_sst_method, "mysqldump"))
|
||||
}
|
||||
else
|
||||
{
|
||||
// non-mysqldump SST requires wsrep_cluster_address on startup
|
||||
if (!wsrep_cluster_address || !wsrep_cluster_address[0])
|
||||
{
|
||||
if (!strcasecmp(my_bind_addr_str, "127.0.0.1") ||
|
||||
!strcasecmp(my_bind_addr_str, "localhost"))
|
||||
{
|
||||
WSREP_ERROR("wsrep_sst_method is set to 'mysqldump' yet "
|
||||
"mysqld bind_address is set to '%s', which makes it "
|
||||
"impossible to receive state transfer from another "
|
||||
"node, since mysqld won't accept such connections. "
|
||||
"If you wish to use mysqldump state transfer method, "
|
||||
"set bind_address to allow mysql client connections "
|
||||
"from other cluster members (e.g. 0.0.0.0).",
|
||||
my_bind_addr_str);
|
||||
return 1;
|
||||
}
|
||||
WSREP_ERROR ("%s SST method requires wsrep_cluster_address to be "
|
||||
"configured on startup.", wsrep_sst_method);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
}
|
||||
|
||||
if (strcasecmp(wsrep_sst_receive_address, "AUTO"))
|
||||
{
|
||||
if (!strncasecmp(wsrep_sst_receive_address, STRING_WITH_LEN("127.0.0.1")) ||
|
||||
!strncasecmp(wsrep_sst_receive_address, STRING_WITH_LEN("localhost")))
|
||||
{
|
||||
// non-mysqldump SST requires wsrep_cluster_address on startup
|
||||
if (!wsrep_cluster_address || !wsrep_cluster_address[0])
|
||||
{
|
||||
WSREP_ERROR ("%s SST method requires wsrep_cluster_address to be "
|
||||
"configured on startup.", wsrep_sst_method);
|
||||
return 1;
|
||||
}
|
||||
WSREP_WARN("wsrep_sst_receive_address is set to '%s' which "
|
||||
"makes it impossible for another host to reach this "
|
||||
"one. Please set it to the address which this node "
|
||||
"can be connected at by other cluster members.",
|
||||
wsrep_sst_receive_address);
|
||||
}
|
||||
}
|
||||
|
||||
if (strcasecmp(wsrep_sst_receive_address, "AUTO"))
|
||||
if (strcasecmp(wsrep_provider, "NONE"))
|
||||
{
|
||||
if (global_system_variables.binlog_format != BINLOG_FORMAT_ROW)
|
||||
{
|
||||
if (!strncasecmp(wsrep_sst_receive_address, STRING_WITH_LEN("127.0.0.1")) ||
|
||||
!strncasecmp(wsrep_sst_receive_address, STRING_WITH_LEN("localhost")))
|
||||
{
|
||||
WSREP_WARN("wsrep_sst_receive_address is set to '%s' which "
|
||||
"makes it impossible for another host to reach this "
|
||||
"one. Please set it to the address which this node "
|
||||
"can be connected at by other cluster members.",
|
||||
wsrep_sst_receive_address);
|
||||
}
|
||||
}
|
||||
WSREP_ERROR("Only binlog_format = 'ROW' is currently supported. "
|
||||
"Configured value: '%s'. Please adjust your "
|
||||
"configuration.",
|
||||
binlog_format_names[global_system_variables.binlog_format]);
|
||||
|
||||
if (strcasecmp(wsrep_provider, "NONE"))
|
||||
{
|
||||
if (global_system_variables.binlog_format != BINLOG_FORMAT_ROW)
|
||||
{
|
||||
WSREP_ERROR("Only binlog_format = 'ROW' is currently supported. "
|
||||
"Configured value: '%s'. Please adjust your "
|
||||
"configuration.",
|
||||
binlog_format_names[global_system_variables.binlog_format]);
|
||||
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user