From 65074b23c29c3a08450eea9f795cbdbf61cea47d Mon Sep 17 00:00:00 2001
From: Bjorn Munch <Bjorn.Munch@sun.com>
Date: Wed, 4 Mar 2009 12:12:57 +0100
Subject: [PATCH] Bug #42986 MTR2 should not allow 0 as a value for --parallel
 Add sanity check that $opt_parallel > 0

---
 mysql-test/mysql-test-run.pl | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index d440994034..f20bcf5245 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -1075,6 +1075,14 @@ sub command_line_setup {
     $opt_shutdown_timeout= 0; # Kill processes instead of nice shutdown
   }
 
+  # --------------------------------------------------------------------------
+  # Check parallel value
+  # --------------------------------------------------------------------------
+  if ($opt_parallel < 1)
+  {
+    mtr_error("0 or negative parallel value makes no sense, use positive number");
+  }
+
   # --------------------------------------------------------------------------
   # Record flag
   # --------------------------------------------------------------------------
-- 
2.30.9