--- sql_lex.cc 2004-12-19 02:25:07.000000000 +0900 +++ sql_lex.cc.FIX 2005-01-31 14:08:53.000000000 +0900 @@ -226,6 +226,8 @@ (l = my_ismbchar(default_charset_info, (const char *)lex->ptr-1, (const char *)lex->end_of_query))) { + if (yyGet() != '\\') yyUnget(); + else found_escape=1; lex->ptr += l-1; continue; } @@ -271,11 +273,16 @@ (l = my_ismbchar(default_charset_info, (const char *)str, (const char *)end))) { while (l--) + { + if (*str == '\\') goto get_text_exit1; *to++ = *str++; + } str--; continue; } #endif + + get_text_exit1: if (*str == '\\' && str+1 != end) { switch(*++str) {