1
0
mirror of https://github.com/MariaDB/server.git synced 2025-06-10 14:42:05 +03:00

Improved error messages and added another path to the version check utility

This commit is contained in:
Julius Goryavsky 2019-07-09 16:54:08 +02:00
parent 06ad00a478
commit aa96e56c55
2 changed files with 15 additions and 5 deletions

View File

@ -123,8 +123,8 @@ sub find_bin {
} }
# Wsrep version check utility: # Wsrep version check utility:
$wsrep_check_version= $wsrep_check_version=
my_find_bin($bindir, "lib/My/SafeProcess", "wsrep_check_version", my_find_bin($bindir, ["lib/My/SafeProcess", "My/SafeProcess"],
NOT_REQUIRED); "wsrep_check_version", NOT_REQUIRED);
} }

View File

@ -401,9 +401,19 @@ sub check_wsrep_version() {
} }
sub wsrep_version_message() { sub wsrep_version_message() {
my $output= `$My::SafeProcess::wsrep_check_version -p`; if ($My::SafeProcess::wsrep_check_version ne "") {
$output =~ s/\s+\z//; my $output= `$My::SafeProcess::wsrep_check_version -p`;
return "Wsrep provider version mismatch (".$output.")"; if (($? >> 8) == 0) {
$output =~ s/\s+\z//;
return "Wsrep provider version mismatch (".$output.")";
}
else {
return "Galera library does not contain a version symbol";
}
}
else {
return "Unable to find a wsrep version check utility";
}
} }
sub which($) { return `sh -c "command -v $_[0]"` } sub which($) { return `sh -c "command -v $_[0]"` }