summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy10
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index f98e4a708da..30c7da220a6 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -7507,7 +7507,8 @@ user:
$$->host.str= (char *) "%";
$$->host.length= 1;
- if (check_string_length(&$$->user, ER(ER_USERNAME), USERNAME_LENGTH))
+ if (check_string_length(system_charset_info, &$$->user,
+ ER(ER_USERNAME), USERNAME_LENGTH))
YYABORT;
}
| ident_or_text '@' ident_or_text
@@ -7517,9 +7518,10 @@ user:
YYABORT;
$$->user = $1; $$->host=$3;
- if (check_string_length(&$$->user, ER(ER_USERNAME), USERNAME_LENGTH) ||
- check_string_length(&$$->host, ER(ER_HOSTNAME),
- HOSTNAME_LENGTH))
+ if (check_string_length(system_charset_info, &$$->user,
+ ER(ER_USERNAME), USERNAME_LENGTH) ||
+ check_string_length(&my_charset_latin1, &$$->host,
+ ER(ER_HOSTNAME), HOSTNAME_LENGTH))
YYABORT;
}
| CURRENT_USER optional_braces