summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorunknown <gluh@mysql.com/gluh.(none)>2006-08-30 15:56:17 +0500
committerunknown <gluh@mysql.com/gluh.(none)>2006-08-30 15:56:17 +0500
commitddb9f8668fa10166e4ffb761dc54a25a007c5bfa (patch)
treebadf8f73c40042fa5b387f7c6af18f4e9f4f7696 /sql-common
parent2416a453eb21f56483865e42cbe568f0cf5a609e (diff)
downloadmariadb-git-ddb9f8668fa10166e4ffb761dc54a25a007c5bfa.tar.gz
Bug#20393 User name truncation in mysql client
Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte include/mysql_com.h: Bug#20393 User name truncation in mysql client Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte added new constants NAME_BYTE_LEN, USERNAME_BYTE_LENGTH, SYSTEM_CHARSET_MBMAXLEN mysql-test/r/ctype_utf8.result: Bug#20393 User name truncation in mysql client Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte test case mysql-test/t/ctype_utf8.test: Bug#20393 User name truncation in mysql client Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte test case sql-common/client.c: Bug#20393 User name truncation in mysql client Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte increased buffers for user name & db sql/sql_acl.cc: Bug#20393 User name truncation in mysql client Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte check that user name is not longer than USERNAME_LENGTH symbols sql/sql_parse.cc: Bug#20393 User name truncation in mysql client Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte increased buffers for user name & db sql/table.cc: Bug#20393 User name truncation in mysql client Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte check that db name is not longer than NAME_LEN symbols
Diffstat (limited to 'sql-common')
-rw-r--r--sql-common/client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index ff5f1ef150a..4d37b850bcb 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -1618,7 +1618,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
const char *passwd, const char *db,
uint port, const char *unix_socket,ulong client_flag)
{
- char buff[NAME_LEN+USERNAME_LENGTH+100];
+ char buff[NAME_BYTE_LEN+USERNAME_BYTE_LENGTH+100];
char *end,*host_info;
my_socket sock;
in_addr_t ip_addr;
@@ -2063,7 +2063,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
mysql->server_status, client_flag));
/* This needs to be changed as it's not useful with big packets */
if (user && user[0])
- strmake(end,user,USERNAME_LENGTH); /* Max user name */
+ strmake(end,user,USERNAME_BYTE_LENGTH); /* Max user name */
else
read_user_name((char*) end);
@@ -2093,7 +2093,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
/* Add database if needed */
if (db && (mysql->server_capabilities & CLIENT_CONNECT_WITH_DB))
{
- end= strmake(end, db, NAME_LEN) + 1;
+ end= strmake(end, db, NAME_BYTE_LEN) + 1;
mysql->db= my_strdup(db,MYF(MY_WME));
db= 0;
}