Commit 3061aa4e authored by Nirbhay Choubey's avatar Nirbhay Choubey

MDEV-6196 MTR: Do not hardcode path for libgalera_smm.so

Introduced an environment variable WSREP_PROVIDER to point
to the galera library.

Updated the tests.
parent 4515a6d3
...@@ -2393,6 +2393,22 @@ sub environment_setup { ...@@ -2393,6 +2393,22 @@ sub environment_setup {
$ENV{'NDB_EXAMPLES_OUTPUT'}= $path_ndb_testrun_log; $ENV{'NDB_EXAMPLES_OUTPUT'}= $path_ndb_testrun_log;
} }
# ----------------------------------------------------
# Setup env for wsrep
# ----------------------------------------------------
if (defined $ENV{'WSREP_PROVIDER'} )
{
# Nothing needs to be done! WSREP_PROVIDER env is already set and will be
# used.
} else {
my $file_wsrep_provider=
mtr_file_exists("/usr/lib/galera/libgalera_smm.so",
"/usr/lib64/galera/libgalera_smm.so");
$ENV{'WSREP_PROVIDER'}= $file_wsrep_provider;
}
mtr_verbose("WSREP_PROVIDER set to $ENV{'WSREP_PROVIDER'}");
# ---------------------------------------------------- # ----------------------------------------------------
# mysql clients # mysql clients
# ---------------------------------------------------- # ----------------------------------------------------
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
[mysqld.1] [mysqld.1]
binlog-format=row binlog-format=row
wsrep_provider=/usr/lib/galera/libgalera_smm.so wsrep_provider=@ENV.WSREP_PROVIDER
wsrep_cluster_address='gcomm://' wsrep_cluster_address='gcomm://'
[mysqld.2] [mysqld.2]
binlog-format=row binlog-format=row
wsrep_provider=/usr/lib/galera/libgalera_smm.so wsrep_provider=@ENV.WSREP_PROVIDER
wsrep_cluster_address='gcomm://127.0.0.1:4567' wsrep_cluster_address='gcomm://127.0.0.1:4567'
wsrep_provider_options='gmcast.listen_addr=tcp://127.0.0.1:4568' wsrep_provider_options='gmcast.listen_addr=tcp://127.0.0.1:4568'
......
--binlog-format=row --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-provider=/usr/lib/galera/libgalera_smm.so --wsrep-cluster-address=gcomm:// --wsrep-on=1 --log-bin --binlog-format=row --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep-on=1 --log-bin
--binlog-format=row --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-provider=/usr/lib/galera/libgalera_smm.so --wsrep-cluster-address=gcomm:// --thread_handling=pool-of-threads --binlog-format=row --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --thread_handling=pool-of-threads
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