summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorunknown <serg@mysql.com>2006-05-24 14:37:18 +0200
committerunknown <serg@mysql.com>2006-05-24 14:37:18 +0200
commit723eed2401533b5ef2f0ba5cea5c79c2a958b944 (patch)
tree97a5037a420d7ee0a901d89aed222ad6327661ae /sql/sql_lex.cc
parent4cf24a5160129c6f8d292417e81539f2faf6b2c8 (diff)
parent6355f74e4d35d457771fe45f8f5331a3174226a4 (diff)
downloadmariadb-git-723eed2401533b5ef2f0ba5cea5c79c2a958b944.tar.gz
Merge mysql.com:/data0/mysqldev/my/mysql-5.0.22-release
into mysql.com:/data0/mysqldev/my/mysql-5.1-release extra/comp_err.c: Auto merged mysql-test/r/ctype_sjis.result: Auto merged sql/sql_lex.cc: Auto merged sql/sql_parse.cc: Auto merged tests/mysql_client_test.c: Auto merged configure.in: merged
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc31
1 files changed, 5 insertions, 26 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 562224201e7..02711ed8f48 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -319,18 +319,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)
{
@@ -360,9 +349,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
@@ -376,8 +362,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) {
@@ -404,20 +389,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);