File tree Expand file tree Collapse file tree 1 file changed +27
-3
lines changed
mysql-test/suite/galera_3nodes/t Expand file tree Collapse file tree 1 file changed +27
-3
lines changed Original file line number Diff line number Diff line change 29
29
--source include/wait_condition.inc
30
30
31
31
--echo Starting garbd ...
32
- --let $gp1 = `SELECT SUBSTR(@@wsrep_provider_options, LOCATE('base_port =', @@wsrep_provider_options) + LENGTH('base_port = '))`
33
- --let $galera_port_1 = `SELECT SUBSTR('$gp1', 1, LOCATE(';', '$gp1') - 1)`
34
- --exec `dirname $WSREP_PROVIDER`/../../bin/garb/garbd --address "gcomm://127.0.0.1:$galera_port_1" --group my_wsrep_cluster --options 'base_port=$galera_port_3' > $MYSQL_TMP_DIR/garbd.log 2>&1 &
32
+ --perl
33
+ use strict;
34
+ use File::Basename;
35
+ my $provider_dirname = dirname($ENV{WSREP_PROVIDER});
36
+ # Array of possible garbd executable paths to be checked
37
+ # base is $provider_dirname
38
+ my @garbd_executable_search = (
39
+ # WSREP_PROVIDER is set in galera repository
40
+ ${provider_dirname}."/garb/garbd",
41
+ # MariaDB (PR #1147)
42
+ ${provider_dirname}."/../../bin/garb/garbd"
43
+ );
44
+ my $garbd_executable = '';
45
+ foreach my $garbd (@garbd_executable_search) {
46
+ if (-f $garbd) {
47
+ $garbd_executable= $garbd;
48
+ }
49
+ }
50
+ if ($garbd_executable eq '') {
51
+ die("Didn't locate garbd\n");
52
+ }
53
+ die unless open(FILE, ">$ENV{MYSQLTEST_VARDIR}/tmp/garbd.inc");
54
+ print FILE "--exec $garbd_executable --address \"gcomm://127.0.0.1:\$NODE_GALERAPORT_1\" --group my_wsrep_cluster --options 'base_port=\$NODE_GALERAPORT_3' > \$MYSQL_TMP_DIR/garbd.log 2>&1 &\n";
55
+ close(FILE);
56
+ EOF
57
+ --source $MYSQLTEST_VARDIR/tmp/garbd.inc
58
+ --remove_file $MYSQLTEST_VARDIR/tmp/garbd.inc
35
59
36
60
--sleep 5
37
61
You can’t perform that action at this time.
0 commit comments