mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge bk-internal:/home/bk/mysql-5.0
into mysql.com:/data0/mysqldev/my/mysql-5.0 configure.in: Auto merged sql/sql_lex.cc: Auto merged sql/sql_parse.cc: Auto merged
This commit is contained in:
@@ -304,18 +304,7 @@ static char *get_text(LEX *lex)
|
||||
found_escape=1;
|
||||
if (lex->ptr == lex->end_of_query)
|
||||
return 0;
|
||||
#ifdef USE_MB
|
||||
int l;
|
||||
if (use_mb(cs) &&
|
||||
(l = my_ismbchar(cs,
|
||||
(const char *)lex->ptr,
|
||||
(const char *)lex->end_of_query))) {
|
||||
lex->ptr += l;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
yySkip();
|
||||
yySkip();
|
||||
}
|
||||
else if (c == sep)
|
||||
{
|
||||
@@ -344,9 +333,6 @@ static char *get_text(LEX *lex)
|
||||
{
|
||||
uchar *to;
|
||||
|
||||
/* Re-use found_escape for tracking state of escapes */
|
||||
found_escape= 0;
|
||||
|
||||
for (to=start ; str != end ; str++)
|
||||
{
|
||||
#ifdef USE_MB
|
||||
@@ -360,8 +346,7 @@ static char *get_text(LEX *lex)
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (!found_escape &&
|
||||
!(lex->thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) &&
|
||||
if (!(lex->thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) &&
|
||||
*str == '\\' && str+1 != end)
|
||||
{
|
||||
switch(*++str) {
|
||||
@@ -388,20 +373,14 @@ static char *get_text(LEX *lex)
|
||||
*to++= '\\'; // remember prefix for wildcard
|
||||
/* Fall through */
|
||||
default:
|
||||
found_escape= 1;
|
||||
str--;
|
||||
*to++= *str;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (!found_escape && *str == sep)
|
||||
{
|
||||
found_escape= 1;
|
||||
}
|
||||
else if (*str == sep)
|
||||
*to++= *str++; // Two ' or "
|
||||
else
|
||||
{
|
||||
*to++ = *str;
|
||||
found_escape= 0;
|
||||
}
|
||||
}
|
||||
*to=0;
|
||||
lex->yytoklen=(uint) (to-start);
|
||||
|
Reference in New Issue
Block a user