mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-6535 Ordering of mysql_upgrade tasks is not optimal
first update system tables, then the rest
This commit is contained in:
@ -1,11 +1,6 @@
|
||||
Run mysql_upgrade once
|
||||
Phase 1/3: Fixing table and database names
|
||||
Phase 2/3: Checking and upgrading tables
|
||||
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
mysql
|
||||
mysql.column_stats OK
|
||||
mysql.columns_priv OK
|
||||
@ -35,20 +30,21 @@ mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
Phase 2/3: Fixing table and database names
|
||||
Phase 3/3: Checking and upgrading tables
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
performance_schema
|
||||
test
|
||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
||||
OK
|
||||
Run it again - should say already completed
|
||||
This installation of MySQL is already upgraded to VERSION, use --force if you still need to run mysql_upgrade
|
||||
Force should run it regardless of wether it's been run before
|
||||
Phase 1/3: Fixing table and database names
|
||||
Phase 2/3: Checking and upgrading tables
|
||||
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
mysql
|
||||
mysql.column_stats OK
|
||||
mysql.columns_priv OK
|
||||
@ -78,20 +74,21 @@ mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
Phase 2/3: Fixing table and database names
|
||||
Phase 3/3: Checking and upgrading tables
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
performance_schema
|
||||
test
|
||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
||||
OK
|
||||
CREATE USER mysqltest1@'%' IDENTIFIED by 'sakila';
|
||||
GRANT ALL ON *.* TO mysqltest1@'%';
|
||||
Run mysql_upgrade with password protected account
|
||||
Phase 1/3: Fixing table and database names
|
||||
Phase 2/3: Checking and upgrading tables
|
||||
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
mysql
|
||||
mysql.column_stats OK
|
||||
mysql.columns_priv OK
|
||||
@ -121,9 +118,15 @@ mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
Phase 2/3: Fixing table and database names
|
||||
Phase 3/3: Checking and upgrading tables
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
performance_schema
|
||||
test
|
||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
||||
OK
|
||||
DROP USER mysqltest1@'%';
|
||||
Version check failed. Got the following error when calling the 'mysql' command line client
|
||||
@ -133,13 +136,8 @@ Run mysql_upgrade with a non existing server socket
|
||||
mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host' (errno) when trying to connect
|
||||
FATAL ERROR: Upgrade failed
|
||||
set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE';
|
||||
Phase 1/3: Fixing table and database names
|
||||
Phase 2/3: Checking and upgrading tables
|
||||
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
mysql
|
||||
mysql.column_stats OK
|
||||
mysql.columns_priv OK
|
||||
@ -169,9 +167,15 @@ mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
Phase 2/3: Fixing table and database names
|
||||
Phase 3/3: Checking and upgrading tables
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
performance_schema
|
||||
test
|
||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
||||
OK
|
||||
set GLOBAL sql_mode=default;
|
||||
#
|
||||
@ -182,13 +186,8 @@ CREATE PROCEDURE testproc() BEGIN END;
|
||||
UPDATE mysql.proc SET character_set_client = NULL WHERE name LIKE 'testproc';
|
||||
UPDATE mysql.proc SET collation_connection = NULL WHERE name LIKE 'testproc';
|
||||
UPDATE mysql.proc SET db_collation = NULL WHERE name LIKE 'testproc';
|
||||
Phase 1/3: Fixing table and database names
|
||||
Phase 2/3: Checking and upgrading tables
|
||||
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
mysql
|
||||
mysql.column_stats OK
|
||||
mysql.columns_priv OK
|
||||
@ -218,9 +217,15 @@ mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
Phase 2/3: Fixing table and database names
|
||||
Phase 3/3: Checking and upgrading tables
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
performance_schema
|
||||
test
|
||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
||||
OK
|
||||
CALL testproc();
|
||||
DROP PROCEDURE testproc;
|
||||
@ -234,13 +239,8 @@ WARNING: NULL values of the 'db_collation' column ('mysql.proc' table) have been
|
||||
GRANT USAGE ON *.* TO 'user3'@'%';
|
||||
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
|
||||
Run mysql_upgrade with all privileges on a user
|
||||
Phase 1/3: Fixing table and database names
|
||||
Phase 2/3: Checking and upgrading tables
|
||||
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
mysql
|
||||
mysql.column_stats OK
|
||||
mysql.columns_priv OK
|
||||
@ -270,9 +270,15 @@ mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
Phase 2/3: Fixing table and database names
|
||||
Phase 3/3: Checking and upgrading tables
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
performance_schema
|
||||
test
|
||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
||||
OK
|
||||
SHOW GRANTS FOR 'user3'@'%';
|
||||
Grants for user3@%
|
||||
@ -280,22 +286,9 @@ GRANT USAGE ON *.* TO 'user3'@'%'
|
||||
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%'
|
||||
DROP USER 'user3'@'%';
|
||||
End of 5.1 tests
|
||||
The --upgrade-system-tables option was used, databases won't be touched.
|
||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
||||
OK
|
||||
#
|
||||
# Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION
|
||||
# SKIP-WRITE-BINLOG
|
||||
#
|
||||
# Droping the previously created mysql_upgrade_info file..
|
||||
# Running mysql_upgrade with --skip-write-binlog..
|
||||
Phase 1/3: Fixing table and database names
|
||||
Phase 2/3: Checking and upgrading tables
|
||||
The --upgrade-system-tables option was used, user tables won't be touched.
|
||||
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
mysql
|
||||
mysql.column_stats OK
|
||||
mysql.columns_priv OK
|
||||
@ -325,9 +318,53 @@ mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
OK
|
||||
#
|
||||
# Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION
|
||||
# SKIP-WRITE-BINLOG
|
||||
#
|
||||
# Droping the previously created mysql_upgrade_info file..
|
||||
# Running mysql_upgrade with --skip-write-binlog..
|
||||
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||
Processing databases
|
||||
mysql
|
||||
mysql.column_stats OK
|
||||
mysql.columns_priv OK
|
||||
mysql.db OK
|
||||
mysql.event OK
|
||||
mysql.func OK
|
||||
mysql.gtid_slave_pos OK
|
||||
mysql.help_category OK
|
||||
mysql.help_keyword OK
|
||||
mysql.help_relation OK
|
||||
mysql.help_topic OK
|
||||
mysql.host OK
|
||||
mysql.index_stats OK
|
||||
mysql.innodb_index_stats OK
|
||||
mysql.innodb_table_stats OK
|
||||
mysql.plugin OK
|
||||
mysql.proc OK
|
||||
mysql.procs_priv OK
|
||||
mysql.proxies_priv OK
|
||||
mysql.roles_mapping OK
|
||||
mysql.servers OK
|
||||
mysql.table_stats OK
|
||||
mysql.tables_priv OK
|
||||
mysql.time_zone OK
|
||||
mysql.time_zone_leap_second OK
|
||||
mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
Phase 2/3: Fixing table and database names
|
||||
Phase 3/3: Checking and upgrading tables
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
performance_schema
|
||||
test
|
||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
||||
OK
|
||||
#
|
||||
# MDEV-4332 Increase username length from 16 characters
|
||||
@ -341,13 +378,8 @@ GRANT INSERT ON mysql.user TO very_long_user_name_number_2;
|
||||
GRANT UPDATE (User) ON mysql.db TO very_long_user_name_number_1;
|
||||
GRANT UPDATE (User) ON mysql.db TO very_long_user_name_number_2;
|
||||
CREATE PROCEDURE test.pr() BEGIN END;
|
||||
Phase 1/3: Fixing table and database names
|
||||
Phase 2/3: Checking and upgrading tables
|
||||
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
mysql
|
||||
mysql.column_stats OK
|
||||
mysql.columns_priv OK
|
||||
@ -377,9 +409,15 @@ mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
Phase 2/3: Fixing table and database names
|
||||
Phase 3/3: Checking and upgrading tables
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
performance_schema
|
||||
test
|
||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
||||
OK
|
||||
SELECT definer FROM mysql.proc WHERE db = 'test' AND name = 'pr';
|
||||
definer
|
||||
|
Reference in New Issue
Block a user