File: support_alternative_mysqld_implementation.patch

package info (click to toggle)
mysql-connector-python 2.1.6-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 12,968 kB
  • ctags: 4,120
  • sloc: python: 23,410; ansic: 2,621; makefile: 27; cpp: 1
file content (25 lines) | stat: -rw-r--r-- 1,147 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- a/tests/mysqld.py
+++ b/tests/mysqld.py
@@ -186,11 +186,11 @@ class MySQLServerBase(object):
             if self._sbindir:
                 break
             for afile in files:
-                if (afile == EXEC_MYSQLD and
+                if (afile == EXEC_MYSQLD and 'bin' in root and
                         os.access(os.path.join(root, afile), 0)):
                     self._sbindir = root
                     files_to_find.remove(EXEC_MYSQLD)
-                elif (afile == EXEC_MYSQL and
+                elif (afile == EXEC_MYSQL and 'bin' in root and
                         os.access(os.path.join(root, afile), 0)):
                     self._bindir = root
                     files_to_find.remove(EXEC_MYSQL)
@@ -289,7 +289,7 @@ class MySQLServerBase(object):
 
         prc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=DEVNULL)
         verstr = str(prc.communicate()[0])
-        matches = re.match(r'.*Ver (\d)\.(\d).(\d{1,2}).*', verstr)
+        matches = re.match(r'.*Ver (\d{1,2})\.(\d).(\d{1,2}).*', verstr)
         if matches:
             return tuple([int(v) for v in matches.groups()])
         else: