#At file:///home/bm136801/my/commps-51/ based on revid:bjorn.munch@stripped
2956 Bjorn Munch 2010-11-29
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
modified:
client/mysqltest.cc
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc 2010-11-17 15:05:52 +0000
+++ b/client/mysqltest.cc 2010-11-29 11:06:37 +0000
@@ -7638,6 +7638,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)
Attachment: [text/bzr-bundle] bzr/bjorn.munch@oracle.com-20101129110637-3033x9v0p0qr1eme.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-mtr branch (bjorn.munch:2956) Bug#58511 | Bjorn Munch | 29 Nov |