Commit bff782d0 authored by Bjorn Munch's avatar Bjorn Munch

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
parent 83e7edde
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment