1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-27 05:41:41 +03:00
Files
mariadb/mysql-test/suite/galera/include/galera_wsrep_recover.inc
sjaakola c439fdc953 MDEV-15540
The error log redirection for wsrep_recover run does not work in old version.
For the wsrep_recovery run, error logging is supposed to go into:
mysql-test/suite/galera/include/galera_wsrep_recover.inc
In old version, this works only partially, 4 first lines of error messages after mysql startup
do go into the galera_wsrep_recover.log, but after that the default error log file is enforced
and remaining error logging goes into the default error log file.

In this patch this problem is fixed by passing --log-error option in mysql startup

This fix was tested with galera_gcache_recover test, which is currently in disabled state.
Note that the test does not pass even after this fix, as there are further more issues
in later test phases.
2018-03-11 16:50:37 +02:00

24 lines
1.1 KiB
PHP

--echo Performing --wsrep-recover ...
--exec $MYSQLD --defaults-group-suffix=.$galera_wsrep_recover_server_id --defaults-file=$MYSQLTEST_VARDIR/my.cnf --log-error=$MYSQL_TMP_DIR/galera_wsrep_recover.log --innodb --wsrep-recover > $MYSQL_TMP_DIR/galera_wsrep_recover.log 2>&1
--perl
use strict;
my $wsrep_start_position_str = "grep 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'";
my $wsrep_start_position = `grep 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'`;
chomp($wsrep_start_position);
die if $wsrep_start_position eq '';
open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/galera_wsrep_start_position.inc") or die;
print FILE "--let \$galera_wsrep_start_position = $wsrep_start_position\n";
close FILE;
EOF
--source $MYSQL_TMP_DIR/galera_wsrep_start_position.inc
if ($galera_wsrep_start_position == '') {
--die "Could not obtain wsrep_start_position."
}
--remove_file $MYSQL_TMP_DIR/galera_wsrep_start_position.inc