summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorBjorn Munch <bjorn.munch@oracle.com>2010-08-10 12:13:58 +0200
committerBjorn Munch <bjorn.munch@oracle.com>2010-08-10 12:13:58 +0200
commit3ca814b76065c8c251128fc4d187f60d90cec679 (patch)
treeefc0dbd46d368ae0610e007610662df90b1c73c3 /client
parent992f49c0c47241f51588c74d0f018f6140a6ff1b (diff)
downloadmariadb-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.cc10
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: