mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 10:31:54 +01:00
62 lines
1.6 KiB
Text
62 lines
1.6 KiB
Text
-- source include/mysql_upgrade_preparation.inc
|
|
-- source include/have_working_dns.inc
|
|
-- source include/have_innodb.inc
|
|
-- source include/have_partition.inc
|
|
let $MYSQLD_DATADIR= `select @@datadir`;
|
|
|
|
|
|
--echo #
|
|
--echo # MDEV-22057 REPLICATION MASTER ADMIN is missing in root account after upgrade
|
|
--echo #
|
|
|
|
--source include/switch_to_mysql_user.inc
|
|
DROP VIEW mysql.user_bak;
|
|
FLUSH PRIVILEGES;
|
|
|
|
CREATE USER user_all@localhost;
|
|
GRANT ALL PRIVILEGES ON *.* TO user_all@localhost WITH GRANT OPTION;
|
|
SHOW GRANTS FOR user_all@localhost;
|
|
|
|
CREATE USER user_super@localhost;
|
|
GRANT SUPER ON *.* TO user_super@localhost;
|
|
SHOW GRANTS FOR user_super@localhost;
|
|
|
|
CREATE USER user_super_replslave@localhost;
|
|
GRANT SUPER, REPLICATION SLAVE ON *.* TO user_super_replslave@localhost;
|
|
SHOW GRANTS FOR user_super_replslave@localhost;
|
|
|
|
|
|
--echo # mysql_upgrade --force --silent 2>&1
|
|
--exec $MYSQL_UPGRADE --force --silent 2>&1
|
|
--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
|
|
FLUSH PRIVILEGES;
|
|
|
|
--echo #
|
|
--echo # Should get ALL PRIVILEGES WITH GRANT OPTION
|
|
--echo #
|
|
SHOW GRANTS FOR user_all@localhost;
|
|
|
|
--echo #
|
|
--echo # Should automatically get all new 10.5.2 priveleges that were splitted from SUPER
|
|
--echo #
|
|
SHOW GRANTS FOR user_super@localhost;
|
|
|
|
--echo #
|
|
--echo # Should automatically get all new 10.5.2 priveleges that were splitted from SUPER, plus REPLICATION MASTER ADMIN
|
|
--echo #
|
|
SHOW GRANTS FOR user_super_replslave@localhost;
|
|
|
|
SELECT
|
|
json_value(Priv, '$.version_id'),
|
|
json_value(Priv, '$.access'),
|
|
user
|
|
FROM
|
|
mysql.global_priv
|
|
WHERE
|
|
host='localhost'
|
|
AND
|
|
user LIKE 'user_%';
|
|
|
|
DROP TABLE mysql.global_priv;
|
|
RENAME TABLE mysql.global_priv_bak TO mysql.global_priv;
|
|
FLUSH PRIVILEGES;
|