Fixed a warning in mtr script.

Updated wsrep.variables test.
This commit is contained in:
Nirbhay Choubey 2014-06-10 18:31:07 -04:00
parent 1410785e8a
commit 93cc06b20c
3 changed files with 20 additions and 8 deletions

View file

@ -2406,7 +2406,7 @@ sub environment_setup {
$ENV{'WSREP_PROVIDER'}= $file_wsrep_provider;
}
if ($ENV{'WSREP_PROVIDER'} ne "") {
if ((defined $ENV{'WSREP_PROVIDER'}) && ($ENV{'WSREP_PROVIDER'} ne "")) {
mtr_verbose("WSREP_PROVIDER set to $ENV{'WSREP_PROVIDER'}");
} else {
mtr_verbose("WSREP_PROVIDER isn't available");

View file

@ -19,13 +19,13 @@ call mtr.add_suppression("safe_mutex: Found wrong usage of mutex 'LOCK_wsrep_sla
call mtr.add_suppression("WSREP: Failed to get provider options");
SELECT @@global.wsrep_provider;
@@global.wsrep_provider
none
libgalera_smm.so
SELECT @@global.wsrep_slave_threads;
@@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
@ -33,10 +33,9 @@ SHOW STATUS LIKE 'wsrep_thread_count';
Variable_name Value
wsrep_thread_count 0
SET GLOBAL wsrep_provider= '/usr/lib/galera/libgalera_smm.so';
SELECT @@global.wsrep_provider;
@@global.wsrep_provider
/usr/lib/galera/libgalera_smm.so
libgalera_smm.so
SELECT @@global.wsrep_cluster_address;
@@global.wsrep_cluster_address
NULL
@ -53,7 +52,7 @@ SET GLOBAL wsrep_cluster_address= 'gcomm://';
# Wait for applier threads to get created.
SELECT @@global.wsrep_provider;
@@global.wsrep_provider
/usr/lib/galera/libgalera_smm.so
libgalera_smm.so
SELECT @@global.wsrep_cluster_address;
@@global.wsrep_cluster_address
gcomm://
@ -74,6 +73,7 @@ SHOW STATUS LIKE 'wsrep_thread_count';
Variable_name Value
wsrep_thread_count 11
SET GLOBAL wsrep_slave_threads= @wsrep_slave_threads_saved;
SET GLOBAL wsrep_provider= none;
SET GLOBAL wsrep_cluster_address= '';
SET GLOBAL wsrep_provider= 'none';
SET GLOBAL wsrep_provider_options= '';
# End of test.

View file

@ -5,6 +5,10 @@
--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;
@ -22,6 +26,7 @@ SET GLOBAL wsrep_replicate_myisam= OFF;
--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");
--replace_regex /.*libgalera_smm.*/libgalera_smm.so/
SELECT @@global.wsrep_provider;
SELECT @@global.wsrep_slave_threads;
SELECT @@global.wsrep_cluster_address;
@ -29,7 +34,11 @@ 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';
@ -41,6 +50,8 @@ SHOW STATUS LIKE 'wsrep_thread_count';
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';
@ -56,8 +67,9 @@ SHOW STATUS LIKE 'wsrep_thread_count';
# 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= 'none';
SET GLOBAL wsrep_provider_options= '';
--echo # End of test.