From 202243d59e4fafdf20d198485e94cb5920ce8741 Mon Sep 17 00:00:00 2001
From: Vladislav Vaintroub <wlad@mariadb.com>
Date: Mon, 26 Aug 2019 10:58:27 +0000
Subject: MTR : improve detection of handles.exe on Windows.

Depending on version, "handle.exe -?" can output either "Handle v4.0"
or "Nthandle v4.1"
---
 mysql-test/lib/My/Handles.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'mysql-test/lib')

diff --git a/mysql-test/lib/My/Handles.pm b/mysql-test/lib/My/Handles.pm
index 3c9513fec8f..c07e2edb09e 100644
--- a/mysql-test/lib/My/Handles.pm
+++ b/mysql-test/lib/My/Handles.pm
@@ -32,8 +32,8 @@ if (IS_WINDOWS){
   my $list= `handle.exe -? -accepteula 2>&1`;
   foreach my $line (split('\n', $list))
   {
-    $handle_exe= "$1.$2"
-      if ($line =~ /Handle v([0-9]*)\.([0-9]*)/);
+    $handle_exe= "$2.$3"
+      if ($line =~ /(Nth|H)andle v([0-9]*)\.([0-9]*)/);
   }
   if ($handle_exe){
     print "Found handle.exe version $handle_exe\n";
-- 
cgit v1.2.1