diff options
author | unknown <serg@mysql.com> | 2006-05-24 12:19:39 +0200 |
---|---|---|
committer | unknown <serg@mysql.com> | 2006-05-24 12:19:39 +0200 |
commit | e1227d2bd1dea7b8d7d3ff47b7fba8e6ef11cb05 (patch) | |
tree | ae37ce3eae0361d04d39fabe357f78ed1f6a7996 /sql/sql_lex.cc | |
parent | 1d5999dc6d8e5d86b0681d41580f2430cbdf3441 (diff) | |
parent | f02b0d8afd0aaf881b6a823d05ebd0f7fa0c1af3 (diff) | |
download | mariadb-git-e1227d2bd1dea7b8d7d3ff47b7fba8e6ef11cb05.tar.gz |
Merge mysql.com:/data0/mysqldev/my/mysql-4.1.16a-release
into mysql.com:/data0/mysqldev/my/mysql-5.0.17c-release
tests/mysql_client_test.c:
Auto merged
configure.in:
merged
sql/sql_lex.cc:
merged
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 22ec8241367..970b992d05e 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -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); |