Commit c316933e authored by unknown's avatar unknown

additional 'after merge' fix

parent c1e264a5
......@@ -567,7 +567,7 @@ void get_default_definer(THD *thd, LEX_USER *definer);
LEX_USER *create_default_definer(THD *thd);
LEX_USER *create_definer(THD *thd, LEX_STRING *user_name, LEX_STRING *host_name);
LEX_USER *get_current_user(THD *thd, LEX_USER *user);
bool check_string_length(CHARSET_INFO *cs, LEX_STRING *str,
bool check_string_length(LEX_STRING *str,
const char *err_msg, uint max_length);
enum enum_mysql_completiontype {
......
......@@ -7565,7 +7565,6 @@ LEX_USER *get_current_user(THD *thd, LEX_USER *user)
SYNOPSIS
check_string_length()
cs string charset
str string to be checked
err_msg error message to be displayed if the string is too long
max_length max length
......@@ -7575,13 +7574,13 @@ LEX_USER *get_current_user(THD *thd, LEX_USER *user)
TRUE the passed string is longer than max_length
*/
bool check_string_length(CHARSET_INFO *cs, LEX_STRING *str,
const char *err_msg, uint max_length)
bool check_string_length(LEX_STRING *str, const char *err_msg,
uint max_length)
{
if (cs->cset->charpos(cs, str->str, str->str + str->length,
max_length) >= str->length)
return FALSE;
if (str->length <= max_length)
return FALSE;
my_error(ER_WRONG_STRING_LENGTH, MYF(0), str->str, err_msg, max_length);
return TRUE;
}
......@@ -7523,7 +7523,7 @@ user:
$$->host.str= (char *) "%";
$$->host.length= 1;
if (check_string_length(system_charset_info, &$$->user,
if (check_string_length(&$$->user,
ER(ER_USERNAME), USERNAME_LENGTH))
YYABORT;
}
......@@ -7534,9 +7534,9 @@ user:
YYABORT;
$$->user = $1; $$->host=$3;
if (check_string_length(system_charset_info, &$$->user,
if (check_string_length(&$$->user,
ER(ER_USERNAME), USERNAME_LENGTH) ||
check_string_length(&my_charset_latin1, &$$->host,
check_string_length(&$$->host,
ER(ER_HOSTNAME), HOSTNAME_LENGTH))
YYABORT;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment