summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorunknown <kent@mysql.com>2006-05-26 18:31:25 +0200
committerunknown <kent@mysql.com>2006-05-26 18:31:25 +0200
commita3040aa74a48eaa140f22730ab4204c3a82eebbf (patch)
tree33026eaa7ed6a0e95564994ae44466d1c7e71626 /sql/sql_lex.cc
parentc12d80151a6010e8dbb7138af09675749516dc15 (diff)
parent80e7938736019853b1b66d5e4edaf36d9a7d522c (diff)
downloadmariadb-git-a3040aa74a48eaa140f22730ab4204c3a82eebbf.tar.gz
Merge mysql.com:/data0/mysqldev/my/mysql-4.1.20-release
into mysql.com:/data0/mysqldev/my/mysql-4.1 sql/sql_lex.cc: Auto merged
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc30
1 files changed, 5 insertions, 25 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 7348816ea27..29ea8ab2ae2 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -295,18 +295,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)
{
@@ -335,9 +324,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
@@ -351,7 +337,7 @@ static char *get_text(LEX *lex)
continue;
}
#endif
- if (!found_escape && *str == '\\' && str+1 != end)
+ if (*str == '\\' && str+1 != end)
{
switch(*++str) {
case 'n':
@@ -377,20 +363,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);