summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorunknown <serg@mysql.com>2006-05-24 14:22:36 +0200
committerunknown <serg@mysql.com>2006-05-24 14:22:36 +0200
commit6355f74e4d35d457771fe45f8f5331a3174226a4 (patch)
tree5161e5d5de5e25b888b1431d1b03c482421d17c3 /sql/sql_lex.cc
parent9972f4bf5d629f29ecce9b41cc7fb00181dab299 (diff)
parente1227d2bd1dea7b8d7d3ff47b7fba8e6ef11cb05 (diff)
downloadmariadb-git-6355f74e4d35d457771fe45f8f5331a3174226a4.tar.gz
Merge mysql.com:/data0/mysqldev/my/mysql-5.0.17c-release
into mysql.com:/data0/mysqldev/my/mysql-5.0.22-release scripts/mysqld_multi.sh: Auto merged sql/sql_lex.cc: Auto merged sql/sql_parse.cc: Auto merged tests/mysql_client_test.c: Auto merged configure.in: merged extra/comp_err.c: 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 2b31abd6a50..de9d8b4a209 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -307,18 +307,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)
{
@@ -347,9 +336,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
@@ -363,8 +349,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) {
@@ -391,20 +376,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);