From 767d8d8335f9d45efb86c77a9efa0b42aff1eb27 Mon Sep 17 00:00:00 2001 From: Shunpoco Date: Mon, 11 Apr 2022 22:43:02 +0900 Subject: 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. --- mysql-test/mysql-test-run.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index bbe5df4c57a..29a706a311a 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -5726,7 +5726,7 @@ sub usage ($) { { print STDERR "$message\n"; print STDERR "For full list of options, use $0 --help\n"; - exit; + exit(1); } local $"= ','; # for @DEFAULT_SUITES below -- cgit v1.2.1