Commit c1da5685 authored by Daniel Black's avatar Daniel Black

MDEV-33726 Moving from MariaDB 10.5 to 10.6 mysql_upgrade

.. is not updating some system tables

Some schema changes from MDEV-24312 master_host has 60 character limit, increase to 255 bytes
failed to happen in the upgrade for tables in the mysql schema:
* mysql.global_priv
* mysql.procs_priv
* mysql.proxies_priv
* mysql.roles_mapping
parent 17e59ed3
......@@ -151,7 +151,7 @@ columns_priv CREATE TABLE `columns_priv` (
show create table procs_priv;
Table Create Table
procs_priv CREATE TABLE `procs_priv` (
`Host` char(60) NOT NULL DEFAULT '',
`Host` char(255) NOT NULL DEFAULT '',
`Db` char(64) NOT NULL DEFAULT '',
`User` char(128) NOT NULL DEFAULT '',
`Routine_name` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '',
......
......@@ -131,7 +131,7 @@ columns_priv CREATE TABLE `columns_priv` (
show create table procs_priv;
Table Create Table
procs_priv CREATE TABLE `procs_priv` (
`Host` char(60) NOT NULL DEFAULT '',
`Host` char(255) NOT NULL DEFAULT '',
`Db` char(64) NOT NULL DEFAULT '',
`User` char(128) NOT NULL DEFAULT '',
`Routine_name` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '',
......
......@@ -152,7 +152,7 @@ columns_priv CREATE TABLE `columns_priv` (
show create table procs_priv;
Table Create Table
procs_priv CREATE TABLE `procs_priv` (
`Host` char(60) NOT NULL DEFAULT '',
`Host` char(255) NOT NULL DEFAULT '',
`Db` char(64) NOT NULL DEFAULT '',
`User` char(128) NOT NULL DEFAULT '',
`Routine_name` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '',
......
......@@ -762,19 +762,22 @@ if @have_innodb then
end if //
DELIMITER ;
# MDEV-4332 longer user names
# MDEV-4332 longer user names, extended by MDEV-24312 to longer again.
alter table user modify User char(128) binary not null default '';
alter table db modify User char(128) binary not null default '';
alter table tables_priv modify User char(128) binary not null default '';
alter table columns_priv modify User char(128) binary not null default '';
alter table procs_priv modify User char(128) binary not null default '';
alter table procs_priv modify User char(128) binary not null default '', modify Host char(255) binary DEFAULT '';
alter table proc modify definer varchar(384) collate utf8mb3_bin not null default '';
alter table proxies_priv modify User char(128) COLLATE utf8mb3_bin not null default '';
alter table proxies_priv modify User char(128) COLLATE utf8mb3_bin not null default '', modify Host char(255) binary DEFAULT '';
alter table proxies_priv modify Proxied_user char(128) COLLATE utf8mb3_bin not null default '';
alter table proxies_priv modify Grantor varchar(384) COLLATE utf8mb3_bin not null default '';
alter table servers modify Username char(128) not null default '';
alter table procs_priv modify Grantor varchar(384) COLLATE utf8mb3_bin not null default '';
alter table tables_priv modify Grantor varchar(384) COLLATE utf8mb3_bin not null default '';
# MDEV-33726 longer names from MDEV-24312 extension
alter table if exists global_priv modify Host char(255) binary DEFAULT '', modify User char(128) binary not null default '';
alter table if exists roles_mapping modify Host char(255) binary not null DEFAULT '', modify User char(128) binary not null default '';
# Activate the new, possible modified privilege tables
# This should not be needed, but gives us some extra testing that the above
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment