summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorBjorn Munch <bjorn.munch@oracle.com>2010-12-09 14:43:42 +0100
committerBjorn Munch <bjorn.munch@oracle.com>2010-12-09 14:43:42 +0100
commit100882710733dc355805e22234c56914ad86add2 (patch)
treedff195bfe63f843e3237f4de52b219bffcc3f117 /client
parente70cb01d085dd25ce3cf4e8ad2ace3e9d295f7fb (diff)
downloadmariadb-git-100882710733dc355805e22234c56914ad86add2.tar.gz
Bug #58511 mysqltest doesn't always run statements in ps mode
mysqltest checks if the stmt is one that should be run in ps mode, but regexp doesn't match if preceeded by /* */ comment. Fix: match function will jump over /*..*/ if found at start
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index f7a90dfb8d4..9772aa7303d 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -7640,6 +7640,16 @@ void init_re(void)
int match_re(my_regex_t *re, char *str)
{
+ while (my_isspace(charset_info, *str))
+ str++;
+ if (str[0] == '/' && str[1] == '*')
+ {
+ char *comm_end= strstr (str, "*/");
+ if (! comm_end)
+ die("Statement is unterminated comment");
+ str= comm_end + 2;
+ }
+
int err= my_regexec(re, str, (size_t)0, NULL, 0);
if (err == 0)