summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorBjorn Munch <bjorn.munch@oracle.com>2010-09-10 09:58:26 +0200
committerBjorn Munch <bjorn.munch@oracle.com>2010-09-10 09:58:26 +0200
commit223112ad427bb7a0af1f8b19bf32f409b792ed13 (patch)
tree2ce4218720dfc02b78a53b754346e828f77244ff /client
parentda7646b64c7e76930e05c0235c724872416ba1dc (diff)
parent7749cd8fd807683e2466b257d48f3850a6fb48c5 (diff)
downloadmariadb-git-223112ad427bb7a0af1f8b19bf32f409b792ed13.tar.gz
merge 55178,55413,56383
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 07eb66bc2b8..936719523ef 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: