summaryrefslogtreecommitdiff
path: root/client/mysqltest.cc
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
commit4b1d6118e8388743c1ca856b165e9350be43e24a (patch)
tree2ce4218720dfc02b78a53b754346e828f77244ff /client/mysqltest.cc
parentf563a012cebf217f32710b6d07f6b1ea58431146 (diff)
parente59b1980e6fbd9c8321bf83943784035bb335b74 (diff)
downloadmariadb-git-4b1d6118e8388743c1ca856b165e9350be43e24a.tar.gz
merge 55178,55413,56383
Diffstat (limited to 'client/mysqltest.cc')
-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: