mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
a3099a3b4a
Also increase user name up to 128. The work was started by Rucha Deodhar <rucha.deodhar@mariadb.com>, contains audit plugin fixes by Alexey Botchkov <holyfoot@askmonty.org>.
37 lines
2.1 KiB
Text
37 lines
2.1 KiB
Text
# switching from mysql.global_priv to mysql.user
|
|
set global sql_mode="";
|
|
set local sql_mode="";
|
|
alter table mysql.user modify User char(16) binary not null default '';
|
|
alter table mysql.db modify User char(16) binary not null default '';
|
|
alter table mysql.tables_priv modify User char(16) binary not null default '';
|
|
alter table mysql.columns_priv modify User char(16) binary not null default '';
|
|
alter table mysql.procs_priv modify User char(16) binary not null default '';
|
|
alter table mysql.proc modify definer char(77) collate utf8_bin not null default '';
|
|
alter table mysql.event modify definer char(77) collate utf8_bin not null default '';
|
|
flush privileges;
|
|
select user();
|
|
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
|
def user() 253 272 14 N 1 39 8
|
|
user()
|
|
root@localhost
|
|
create user a17aaaaaaaaaaaaa0@localhost;
|
|
ERROR HY000: String 'a17aaaaaaaaaaaaa0' is too long for user name (should be no longer than 16)
|
|
grant usage on *.* to a17aaaaaaaaaaaaa0@lodalhost;
|
|
ERROR HY000: String 'a17aaaaaaaaaaaaa0' is too long for user name (should be no longer than 16)
|
|
drop user a17aaaaaaaaaaaaa0@lodalhost;
|
|
ERROR HY000: String 'a17aaaaaaaaaaaaa0' is too long for user name (should be no longer than 16)
|
|
alter table mysql.user modify User char(128) binary not null default '';
|
|
alter table mysql.db modify User char(128) binary not null default '';
|
|
alter table mysql.tables_priv modify User char(128) binary not null default '';
|
|
alter table mysql.columns_priv modify User char(128) binary not null default '';
|
|
alter table mysql.procs_priv modify User char(128) binary not null default '';
|
|
alter table mysql.proc modify definer varchar(384) collate utf8_bin not null default '';
|
|
alter table mysql.event modify definer varchar(384) collate utf8_bin not null default '';
|
|
flush privileges;
|
|
select user();
|
|
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
|
def user() 253 384 14 N 1 39 8
|
|
user()
|
|
root@localhost
|
|
set global sql_mode=default;
|
|
# switching back from mysql.user to mysql.global_priv
|