1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-27448 MTR returns success (zero) upon invalid option

I change from `exit;` to `exit(1);` on a function `usage()`.
When we try to run mtr with a wrong option, a function `usage()` is called with the wrong option as its argument. In this case, because the function call `exit` in a first if statement, we get exit status 0.
This commit is contained in:
Shunpoco
2022-04-11 22:43:02 +09:00
committed by Daniel Black
parent 833f4486cf
commit 767d8d8335

View File

@ -5726,7 +5726,7 @@ sub usage ($) {
{ {
print STDERR "$message\n"; print STDERR "$message\n";
print STDERR "For full list of options, use $0 --help\n"; print STDERR "For full list of options, use $0 --help\n";
exit; exit(1);
} }
local $"= ','; # for @DEFAULT_SUITES below local $"= ','; # for @DEFAULT_SUITES below