1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00

after merge fix

This commit is contained in:
gluh@mysql.com/gluh.(none)
2006-09-07 18:09:49 +05:00
parent 76b97433c2
commit e2684ad5d7
9 changed files with 30 additions and 25 deletions

View File

@@ -1662,7 +1662,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
password. New clients send the size (1 byte) + string (not null
terminated, so also '\0' for empty string).
*/
char db_buff[NAME_LEN+1]; // buffer to store db in utf8
char db_buff[NAME_BYTE_LEN+1]; // buffer to store db in utf8
char *db= passwd;
uint passwd_len= thd->client_capabilities & CLIENT_SECURE_CONNECTION ?
*passwd++ : strlen(passwd);
@@ -7564,7 +7564,10 @@ LEX_USER *get_current_user(THD *thd, LEX_USER *user)
bool check_string_length(LEX_STRING *str, const char *err_msg,
uint max_length)
{
if (str->length <= max_length)
if (system_charset_info->cset->charpos(system_charset_info, str->str,
str->str + str->length, max_length) >=
str->length)
return FALSE;
my_error(ER_WRONG_STRING_LENGTH, MYF(0), str->str, err_msg, max_length);