Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FB8-47 : Increase max user name length to 80 #937

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/mysql/components/services/psi_thread_bits.h
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ typedef void (*get_thread_event_id_v1_t)(unsigned long long *thread_internal_id,
unsigned long long *event_id);

/* Duplicate definitions to avoid dependency on mysql_com.h */
#define PSI_USERNAME_LENGTH (32 * 3)
#define PSI_USERNAME_LENGTH (80 * 3)
satya-bodapati marked this conversation as resolved.
Show resolved Hide resolved
#define PSI_NAME_LEN (64 * 3)
#define PSI_HOSTNAME_LENGTH (60)

Expand Down
2 changes: 1 addition & 1 deletion include/mysql/plugin_auth.h.pp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
unsigned int user_name_length;
const char *auth_string;
unsigned long auth_string_length;
char authenticated_as[96 + 1];
char authenticated_as[240 + 1];
satya-bodapati marked this conversation as resolved.
Show resolved Hide resolved
char external_user[512];
int password_used;
const char *host_or_ip;
Expand Down
2 changes: 1 addition & 1 deletion include/mysql/plugin_auth_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#define MYSQL_PLUGIN_AUTH_COMMON_INCLUDED

/** the max allowed length for a user name */
#define MYSQL_USERNAME_LENGTH 96
#define MYSQL_USERNAME_LENGTH 240
satya-bodapati marked this conversation as resolved.
Show resolved Hide resolved

/**
return values of the plugin authenticate_user() method.
Expand Down
2 changes: 1 addition & 1 deletion include/mysql/psi/psi_abi_thread_v1.h.pp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
unsigned long m_processlist_id;
unsigned long long m_thread_os_id;
void *m_user_data;
char m_username[(32 * 3)];
char m_username[(80 * 3)];
satya-bodapati marked this conversation as resolved.
Show resolved Hide resolved
size_t m_username_length;
char m_hostname[(60)];
size_t m_hostname_length;
Expand Down
4 changes: 2 additions & 2 deletions include/mysql_com.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
#define PARTITION_EXPR_CHAR_LEN \
2048 /**< Maximum expression length in chars \
*/
#define USERNAME_CHAR_LENGTH 32
#define USERNAME_CHAR_LENGTH_STR "32"
#define USERNAME_CHAR_LENGTH 80
#define USERNAME_CHAR_LENGTH_STR "80"
#ifndef NAME_LEN
#define NAME_LEN (NAME_CHAR_LEN * SYSTEM_CHARSET_MBMAXLEN)
#endif
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/r/create.result
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`ID` bigint(21) unsigned NOT NULL DEFAULT '0',
`USER` varchar(32) NOT NULL DEFAULT '',
`USER` varchar(80) NOT NULL DEFAULT '',
`HOST` varchar(64) NOT NULL DEFAULT '',
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) NOT NULL DEFAULT '',
Expand All @@ -1172,7 +1172,7 @@ show create table t1;
Table Create Table
t1 CREATE TEMPORARY TABLE `t1` (
`ID` bigint(21) unsigned NOT NULL DEFAULT '0',
`USER` varchar(32) NOT NULL DEFAULT '',
`USER` varchar(80) NOT NULL DEFAULT '',
`HOST` varchar(64) NOT NULL DEFAULT '',
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) NOT NULL DEFAULT '',
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/r/dd_is_compatibility_cs.result
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`ID` bigint(21) unsigned NOT NULL DEFAULT '0',
`USER` varchar(32) NOT NULL DEFAULT '',
`USER` varchar(80) NOT NULL DEFAULT '',
`HOST` varchar(64) NOT NULL DEFAULT '',
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) NOT NULL DEFAULT '',
Expand Down
258 changes: 0 additions & 258 deletions mysql-test/r/dd_schema_definition_after_upgrade_debug.result

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions mysql-test/r/dd_upgrade_test.result
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ SHOW CREATE TABLE mysql.user;
Table Create Table
user CREATE TABLE `user` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Select_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Insert_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
`Update_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
Expand Down Expand Up @@ -550,7 +550,7 @@ threads CREATE TABLE `threads` (
`NAME` varchar(128) NOT NULL,
`TYPE` varchar(10) NOT NULL,
`PROCESSLIST_ID` bigint(20) unsigned DEFAULT NULL,
`PROCESSLIST_USER` varchar(32) DEFAULT NULL,
`PROCESSLIST_USER` varchar(80) DEFAULT NULL,
`PROCESSLIST_HOST` varchar(60) DEFAULT NULL,
`PROCESSLIST_DB` varchar(64) DEFAULT NULL,
`PROCESSLIST_COMMAND` varchar(16) DEFAULT NULL,
Expand Down
1 change: 1 addition & 0 deletions mysql-test/r/dictionary_tablespace.result
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ call mtr.add_suppression("table is missing or has an incorrect definition");
call mtr.add_suppression("ACL DDLs will not work unless mysql_upgrade is executed");
call mtr.add_suppression(".* Native table .* has the wrong structure");
call mtr.add_suppression("Column count of mysql.* is wrong");
call mtr.add_suppression("Cannot load from mysql.* The table is probably corrupted!");
call mtr.add_suppression("The privilege system failed to initialize correctly.*");
call mtr.add_suppression(".*Missing system table mysql.global_grants.*");
call mtr.add_suppression("ACL table mysql.[a-z_]* missing. Some operations may fail.");
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/r/func_system.result
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`database()` varchar(34) CHARACTER SET utf8 DEFAULT NULL,
`user()` varchar(93) CHARACTER SET utf8 NOT NULL DEFAULT '',
`user()` varchar(141) CHARACTER SET utf8 NOT NULL DEFAULT '',
`version` char(60) DEFAULT NULL
) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
drop table t1;
Expand Down
Loading