diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 12af2efdaad..4522911eec9 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -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"); diff --git a/mysql-test/suite/wsrep/r/variables.result b/mysql-test/suite/wsrep/r/variables.result index ffa908ad359..bfa371da3a7 100644 --- a/mysql-test/suite/wsrep/r/variables.result +++ b/mysql-test/suite/wsrep/r/variables.result @@ -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. diff --git a/mysql-test/suite/wsrep/t/variables.test b/mysql-test/suite/wsrep/t/variables.test index a584d0b39f0..59d2aeccafd 100644 --- a/mysql-test/suite/wsrep/t/variables.test +++ b/mysql-test/suite/wsrep/t/variables.test @@ -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.