Loading include/mysql_com.h +1 −4 Original line number Diff line number Diff line Loading @@ -26,9 +26,6 @@ #define USERNAME_LENGTH 16 #define SERVER_VERSION_LENGTH 60 #define SQLSTATE_LENGTH 5 #define SYSTEM_CHARSET_MBMAXLEN 3 #define NAME_BYTE_LEN NAME_LEN*SYSTEM_CHARSET_MBMAXLEN #define USERNAME_BYTE_LENGTH USERNAME_LENGTH*SYSTEM_CHARSET_MBMAXLEN /* USER_HOST_BUFF_SIZE -- length of string buffer, that is enough to contain Loading @@ -36,7 +33,7 @@ MySQL standard format: user_name_part@host_name_part\0 */ #define USER_HOST_BUFF_SIZE HOSTNAME_LENGTH + USERNAME_BYTE_LENGTH + 2 #define USER_HOST_BUFF_SIZE HOSTNAME_LENGTH + USERNAME_LENGTH + 2 #define LOCAL_HOST "localhost" #define LOCAL_HOST_NAMEDPIPE "." Loading mysql-test/t/ctype_utf8.test +1 −1 Original line number Diff line number Diff line Loading @@ -1069,6 +1069,7 @@ explain select a from t1 group by a; select a from t1 group by a; drop table t1; # # Bug#20393: User name truncation in mysql client # Bug#21432: Database/Table name limited to 64 bytes, not chars, problems with multi-byte Loading Loading @@ -1096,7 +1097,6 @@ explain select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1; select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1; drop table t1; # End of 4.1 tests # Loading scripts/mysql_config.sh +8 −7 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ port='@MYSQL_TCP_PORT@' ldflags='@LDFLAGS@' # Create options # We intentionally add a space to the beginning of lib strings, simplifies replace later # We intentionally add a space to the beginning and end of lib strings, simplifies replace later libs=" $ldflags -L$pkglibdir -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@" libs="$libs @openssl_libs@ @STATIC_NSS_FLAGS@ " libs_r=" $ldflags -L$pkglibdir -lmysqlclient_r @ZLIB_DEPS@ @LIBS@ @openssl_libs@ " Loading @@ -111,8 +111,9 @@ include="-I$pkgincludedir" # and -xstrconst to make --cflags usable for Sun Forte C++ for remove in DDBUG_OFF DSAFEMALLOC USAFEMALLOC DSAFE_MUTEX \ DPEDANTIC_SAFEMALLOC DUNIV_MUST_NOT_INLINE DFORCE_INIT_OF_VARS \ DEXTRA_DEBUG DHAVE_purify 'O[0-9]' 'W[-A-Za-z]*' \ Xa xstrconst "xc99=none" DEXTRA_DEBUG DHAVE_purify O 'O[0-9]' 'xO[0-9]' 'W[-A-Za-z]*' \ Xa xstrconst "xc99=none" \ unroll2 ip mp restrict do # The first option we might strip will always have a space before it because # we set -I$pkgincludedir as the first option Loading @@ -121,7 +122,7 @@ done cflags=`echo "$cflags"|sed -e 's/ *\$//'` # Same for --libs(_r) for remove in lmtmalloc for remove in lmtmalloc static-libcxa i-static do # We know the strings starts with a space libs=`echo "$libs"|sed -e "s/ -$remove */ /g"` Loading sql-common/client.c +3 −3 Original line number Diff line number Diff line Loading @@ -1758,7 +1758,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_BYTE_LEN+USERNAME_BYTE_LENGTH+100]; char buff[NAME_LEN+USERNAME_LENGTH+100]; char *end,*host_info; my_socket sock; in_addr_t ip_addr; Loading Loading @@ -2217,7 +2217,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_BYTE_LENGTH); /* Max user name */ strmake(end,user,USERNAME_LENGTH); /* Max user name */ else read_user_name((char*) end); Loading Loading @@ -2247,7 +2247,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_BYTE_LEN) + 1; end= strmake(end, db, NAME_LEN) + 1; mysql->db= my_strdup(db,MYF(MY_WME)); db= 0; } Loading sql/mysql_priv.h +1 −1 Original line number Diff line number Diff line Loading @@ -578,7 +578,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 { Loading Loading
include/mysql_com.h +1 −4 Original line number Diff line number Diff line Loading @@ -26,9 +26,6 @@ #define USERNAME_LENGTH 16 #define SERVER_VERSION_LENGTH 60 #define SQLSTATE_LENGTH 5 #define SYSTEM_CHARSET_MBMAXLEN 3 #define NAME_BYTE_LEN NAME_LEN*SYSTEM_CHARSET_MBMAXLEN #define USERNAME_BYTE_LENGTH USERNAME_LENGTH*SYSTEM_CHARSET_MBMAXLEN /* USER_HOST_BUFF_SIZE -- length of string buffer, that is enough to contain Loading @@ -36,7 +33,7 @@ MySQL standard format: user_name_part@host_name_part\0 */ #define USER_HOST_BUFF_SIZE HOSTNAME_LENGTH + USERNAME_BYTE_LENGTH + 2 #define USER_HOST_BUFF_SIZE HOSTNAME_LENGTH + USERNAME_LENGTH + 2 #define LOCAL_HOST "localhost" #define LOCAL_HOST_NAMEDPIPE "." Loading
mysql-test/t/ctype_utf8.test +1 −1 Original line number Diff line number Diff line Loading @@ -1069,6 +1069,7 @@ explain select a from t1 group by a; select a from t1 group by a; drop table t1; # # Bug#20393: User name truncation in mysql client # Bug#21432: Database/Table name limited to 64 bytes, not chars, problems with multi-byte Loading Loading @@ -1096,7 +1097,6 @@ explain select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1; select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1; drop table t1; # End of 4.1 tests # Loading
scripts/mysql_config.sh +8 −7 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ port='@MYSQL_TCP_PORT@' ldflags='@LDFLAGS@' # Create options # We intentionally add a space to the beginning of lib strings, simplifies replace later # We intentionally add a space to the beginning and end of lib strings, simplifies replace later libs=" $ldflags -L$pkglibdir -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@" libs="$libs @openssl_libs@ @STATIC_NSS_FLAGS@ " libs_r=" $ldflags -L$pkglibdir -lmysqlclient_r @ZLIB_DEPS@ @LIBS@ @openssl_libs@ " Loading @@ -111,8 +111,9 @@ include="-I$pkgincludedir" # and -xstrconst to make --cflags usable for Sun Forte C++ for remove in DDBUG_OFF DSAFEMALLOC USAFEMALLOC DSAFE_MUTEX \ DPEDANTIC_SAFEMALLOC DUNIV_MUST_NOT_INLINE DFORCE_INIT_OF_VARS \ DEXTRA_DEBUG DHAVE_purify 'O[0-9]' 'W[-A-Za-z]*' \ Xa xstrconst "xc99=none" DEXTRA_DEBUG DHAVE_purify O 'O[0-9]' 'xO[0-9]' 'W[-A-Za-z]*' \ Xa xstrconst "xc99=none" \ unroll2 ip mp restrict do # The first option we might strip will always have a space before it because # we set -I$pkgincludedir as the first option Loading @@ -121,7 +122,7 @@ done cflags=`echo "$cflags"|sed -e 's/ *\$//'` # Same for --libs(_r) for remove in lmtmalloc for remove in lmtmalloc static-libcxa i-static do # We know the strings starts with a space libs=`echo "$libs"|sed -e "s/ -$remove */ /g"` Loading
sql-common/client.c +3 −3 Original line number Diff line number Diff line Loading @@ -1758,7 +1758,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_BYTE_LEN+USERNAME_BYTE_LENGTH+100]; char buff[NAME_LEN+USERNAME_LENGTH+100]; char *end,*host_info; my_socket sock; in_addr_t ip_addr; Loading Loading @@ -2217,7 +2217,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_BYTE_LENGTH); /* Max user name */ strmake(end,user,USERNAME_LENGTH); /* Max user name */ else read_user_name((char*) end); Loading Loading @@ -2247,7 +2247,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_BYTE_LEN) + 1; end= strmake(end, db, NAME_LEN) + 1; mysql->db= my_strdup(db,MYF(MY_WME)); db= 0; } Loading
sql/mysql_priv.h +1 −1 Original line number Diff line number Diff line Loading @@ -578,7 +578,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 { Loading