1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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 `
This commit is contained in:
Bjorn Munch
2010-08-10 12:13:58 +02:00
parent f3f5e04a36
commit 788b4e404b
3 changed files with 21 additions and 2 deletions

View File

@ -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: