summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-10-30 16:32:00 +0200
committerunknown <monty@hundin.mysql.fi>2001-10-30 16:32:00 +0200
commitfed395c75224ee11c1cd53fc24285e8575c6bec8 (patch)
tree8575335176adacc443f7fcba07bfc869a4076406 /sql
parentbbd8831471d6c26f8bb23f05258882c1111a3c72 (diff)
parent7b1cfb6353ee805326a22d8c9e71953b7ea8ed54 (diff)
downloadmariadb-git-fed395c75224ee11c1cd53fc24285e8575c6bec8.tar.gz
Merge work:/home/bk/mysql into hundin.mysql.fi:/my/bk/mysql
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_lex.cc25
1 files changed, 23 insertions, 2 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 5c63fa32293..7c3b933bbd7 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -601,8 +601,29 @@ int yylex(void *arg)
case STATE_USER_VARIABLE_DELIMITER:
lex->tok_start=lex->ptr; // Skipp first `
- while ((c=yyGet()) && state_map[c] != STATE_USER_VARIABLE_DELIMITER &&
- c != (uchar) NAMES_SEP_CHAR) ;
+#ifdef USE_MB
+ if (use_mb(default_charset_info))
+ {
+ while ((c=yyGet()) && state_map[c] != STATE_USER_VARIABLE_DELIMITER &&
+ c != (uchar) NAMES_SEP_CHAR)
+ {
+ if (my_ismbhead(default_charset_info, c))
+ {
+ int l;
+ if ((l = my_ismbchar(default_charset_info,
+ (const char *)lex->ptr-1,
+ (const char *)lex->end_of_query)) == 0)
+ break;
+ lex->ptr += l-1;
+ }
+ }
+ }
+ else
+#endif
+ {
+ while ((c=yyGet()) && state_map[c] != STATE_USER_VARIABLE_DELIMITER &&
+ c != (uchar) NAMES_SEP_CHAR) ;
+ }
yylval->lex_str=get_token(lex,yyLength());
if (state_map[c] == STATE_USER_VARIABLE_DELIMITER)
yySkip(); // Skipp end `