1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Merge mysql.com:/data0/mysqldev/my/mysql-4.1.16a-release

into  mysql.com:/data0/mysqldev/my/mysql-5.0.17c-release
This commit is contained in:
serg@mysql.com
2006-05-24 12:19:39 +02:00
5 changed files with 23 additions and 37 deletions

View File

@@ -302,18 +302,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)
{
@@ -342,9 +331,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
@@ -358,8 +344,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) {
@@ -386,20 +371,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);