diff options
author | Bjorn Munch <bjorn.munch@oracle.com> | 2010-08-10 12:13:58 +0200 |
---|---|---|
committer | Bjorn Munch <bjorn.munch@oracle.com> | 2010-08-10 12:13:58 +0200 |
commit | 3ca814b76065c8c251128fc4d187f60d90cec679 (patch) | |
tree | efc0dbd46d368ae0610e007610662df90b1c73c3 /client | |
parent | 992f49c0c47241f51588c74d0f018f6140a6ff1b (diff) | |
download | mariadb-git-3ca814b76065c8c251128fc4d187f60d90cec679.tar.gz |
Bug #55413 mysqltest gives parse error for lines matching "^let.*\\.*;$"
Allow escaped quotes also in statements not starting with --
But will not support single unescaped ' or `
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc index d7a302912b4..d8c921e8f18 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -5507,6 +5507,8 @@ int read_line(char *buf, int size) char c, UNINIT_VAR(last_quote); char *p= buf, *buf_end= buf + size - 1; int skip_char= 0; + my_bool have_slash= FALSE; + enum {R_NORMAL, R_Q, R_SLASH_IN_Q, R_COMMENT, R_LINE_START} state= R_LINE_START; DBUG_ENTER("read_line"); @@ -5578,9 +5580,13 @@ int read_line(char *buf, int size) } else if (c == '\'' || c == '"' || c == '`') { - last_quote= c; - state= R_Q; + if (! have_slash) + { + last_quote= c; + state= R_Q; + } } + have_slash= (c == '\\'); break; case R_COMMENT: |