mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-11942 BLACKHOLE is no longer active in 10.1 by default, mysql_upgrade not handling the situation
fix the patch. add tests
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
set sql_mode="";
|
||||
Run mysql_upgrade once
|
||||
Phase 1/6: Checking and upgrading mysql database
|
||||
Phase 1/7: Checking and upgrading mysql database
|
||||
Processing databases
|
||||
mysql
|
||||
mysql.column_stats OK
|
||||
@ -31,10 +31,11 @@ mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
Phase 2/6: Fixing views
|
||||
Phase 3/6: Running 'mysql_fix_privilege_tables'
|
||||
Phase 4/6: Fixing table and database names
|
||||
Phase 5/6: Checking and upgrading tables
|
||||
Phase 2/7: Installing used storage engines... Skipped
|
||||
Phase 3/7: Fixing views
|
||||
Phase 4/7: Running 'mysql_fix_privilege_tables'
|
||||
Phase 5/7: Fixing table and database names
|
||||
Phase 6/7: Checking and upgrading tables
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
@ -42,12 +43,12 @@ mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
performance_schema
|
||||
test
|
||||
Phase 6/6: Running 'FLUSH PRIVILEGES'
|
||||
Phase 7/7: Running 'FLUSH PRIVILEGES'
|
||||
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 whether it has been run before
|
||||
Phase 1/6: Checking and upgrading mysql database
|
||||
Phase 1/7: Checking and upgrading mysql database
|
||||
Processing databases
|
||||
mysql
|
||||
mysql.column_stats OK
|
||||
@ -78,10 +79,11 @@ mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
Phase 2/6: Fixing views
|
||||
Phase 3/6: Running 'mysql_fix_privilege_tables'
|
||||
Phase 4/6: Fixing table and database names
|
||||
Phase 5/6: Checking and upgrading tables
|
||||
Phase 2/7: Installing used storage engines... Skipped
|
||||
Phase 3/7: Fixing views
|
||||
Phase 4/7: Running 'mysql_fix_privilege_tables'
|
||||
Phase 5/7: Fixing table and database names
|
||||
Phase 6/7: Checking and upgrading tables
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
@ -89,12 +91,12 @@ mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
performance_schema
|
||||
test
|
||||
Phase 6/6: Running 'FLUSH PRIVILEGES'
|
||||
Phase 7/7: Running 'FLUSH PRIVILEGES'
|
||||
OK
|
||||
CREATE USER mysqltest1@'%' IDENTIFIED by 'sakila';
|
||||
GRANT ALL ON *.* TO mysqltest1@'%';
|
||||
Run mysql_upgrade with password protected account
|
||||
Phase 1/6: Checking and upgrading mysql database
|
||||
Phase 1/7: Checking and upgrading mysql database
|
||||
Processing databases
|
||||
mysql
|
||||
mysql.column_stats OK
|
||||
@ -125,10 +127,11 @@ mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
Phase 2/6: Fixing views
|
||||
Phase 3/6: Running 'mysql_fix_privilege_tables'
|
||||
Phase 4/6: Fixing table and database names
|
||||
Phase 5/6: Checking and upgrading tables
|
||||
Phase 2/7: Installing used storage engines... Skipped
|
||||
Phase 3/7: Fixing views
|
||||
Phase 4/7: Running 'mysql_fix_privilege_tables'
|
||||
Phase 5/7: Fixing table and database names
|
||||
Phase 6/7: Checking and upgrading tables
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
@ -136,7 +139,7 @@ mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
performance_schema
|
||||
test
|
||||
Phase 6/6: Running 'FLUSH PRIVILEGES'
|
||||
Phase 7/7: Running 'FLUSH PRIVILEGES'
|
||||
OK
|
||||
DROP USER mysqltest1@'%';
|
||||
Version check failed. Got the following error when calling the 'mysql' command line client
|
||||
@ -146,7 +149,7 @@ 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/6: Checking and upgrading mysql database
|
||||
Phase 1/7: Checking and upgrading mysql database
|
||||
Processing databases
|
||||
mysql
|
||||
mysql.column_stats OK
|
||||
@ -177,10 +180,11 @@ mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
Phase 2/6: Fixing views
|
||||
Phase 3/6: Running 'mysql_fix_privilege_tables'
|
||||
Phase 4/6: Fixing table and database names
|
||||
Phase 5/6: Checking and upgrading tables
|
||||
Phase 2/7: Installing used storage engines... Skipped
|
||||
Phase 3/7: Fixing views
|
||||
Phase 4/7: Running 'mysql_fix_privilege_tables'
|
||||
Phase 5/7: Fixing table and database names
|
||||
Phase 6/7: Checking and upgrading tables
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
@ -188,7 +192,7 @@ mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
performance_schema
|
||||
test
|
||||
Phase 6/6: Running 'FLUSH PRIVILEGES'
|
||||
Phase 7/7: Running 'FLUSH PRIVILEGES'
|
||||
OK
|
||||
set GLOBAL sql_mode=default;
|
||||
#
|
||||
@ -199,7 +203,7 @@ 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/6: Checking and upgrading mysql database
|
||||
Phase 1/7: Checking and upgrading mysql database
|
||||
Processing databases
|
||||
mysql
|
||||
mysql.column_stats OK
|
||||
@ -230,10 +234,11 @@ mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
Phase 2/6: Fixing views
|
||||
Phase 3/6: Running 'mysql_fix_privilege_tables'
|
||||
Phase 4/6: Fixing table and database names
|
||||
Phase 5/6: Checking and upgrading tables
|
||||
Phase 2/7: Installing used storage engines... Skipped
|
||||
Phase 3/7: Fixing views
|
||||
Phase 4/7: Running 'mysql_fix_privilege_tables'
|
||||
Phase 5/7: Fixing table and database names
|
||||
Phase 6/7: Checking and upgrading tables
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
@ -241,7 +246,7 @@ mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
performance_schema
|
||||
test
|
||||
Phase 6/6: Running 'FLUSH PRIVILEGES'
|
||||
Phase 7/7: Running 'FLUSH PRIVILEGES'
|
||||
OK
|
||||
CALL testproc();
|
||||
DROP PROCEDURE testproc;
|
||||
@ -255,7 +260,7 @@ 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/6: Checking and upgrading mysql database
|
||||
Phase 1/7: Checking and upgrading mysql database
|
||||
Processing databases
|
||||
mysql
|
||||
mysql.column_stats OK
|
||||
@ -286,10 +291,11 @@ mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
Phase 2/6: Fixing views
|
||||
Phase 3/6: Running 'mysql_fix_privilege_tables'
|
||||
Phase 4/6: Fixing table and database names
|
||||
Phase 5/6: Checking and upgrading tables
|
||||
Phase 2/7: Installing used storage engines... Skipped
|
||||
Phase 3/7: Fixing views
|
||||
Phase 4/7: Running 'mysql_fix_privilege_tables'
|
||||
Phase 5/7: Fixing table and database names
|
||||
Phase 6/7: Checking and upgrading tables
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
@ -297,7 +303,7 @@ mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
performance_schema
|
||||
test
|
||||
Phase 6/6: Running 'FLUSH PRIVILEGES'
|
||||
Phase 7/7: Running 'FLUSH PRIVILEGES'
|
||||
OK
|
||||
SHOW GRANTS FOR 'user3'@'%';
|
||||
Grants for user3@%
|
||||
@ -306,7 +312,7 @@ GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%'
|
||||
DROP USER 'user3'@'%';
|
||||
End of 5.1 tests
|
||||
The --upgrade-system-tables option was used, user tables won't be touched.
|
||||
Phase 1/6: Checking and upgrading mysql database
|
||||
Phase 1/7: Checking and upgrading mysql database
|
||||
Processing databases
|
||||
mysql
|
||||
mysql.column_stats OK
|
||||
@ -337,11 +343,12 @@ mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
Phase 2/6: Fixing views... Skipped
|
||||
Phase 3/6: Running 'mysql_fix_privilege_tables'
|
||||
Phase 4/6: Fixing table and database names ... Skipped
|
||||
Phase 5/6: Checking and upgrading tables... Skipped
|
||||
Phase 6/6: Running 'FLUSH PRIVILEGES'
|
||||
Phase 2/7: Installing used storage engines... Skipped
|
||||
Phase 3/7: Fixing views... Skipped
|
||||
Phase 4/7: Running 'mysql_fix_privilege_tables'
|
||||
Phase 5/7: Fixing table and database names ... Skipped
|
||||
Phase 6/7: Checking and upgrading tables... Skipped
|
||||
Phase 7/7: Running 'FLUSH PRIVILEGES'
|
||||
OK
|
||||
#
|
||||
# Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION
|
||||
@ -349,7 +356,7 @@ OK
|
||||
#
|
||||
# Droping the previously created mysql_upgrade_info file..
|
||||
# Running mysql_upgrade with --skip-write-binlog..
|
||||
Phase 1/6: Checking and upgrading mysql database
|
||||
Phase 1/7: Checking and upgrading mysql database
|
||||
Processing databases
|
||||
mysql
|
||||
mysql.column_stats OK
|
||||
@ -380,10 +387,11 @@ mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
Phase 2/6: Fixing views
|
||||
Phase 3/6: Running 'mysql_fix_privilege_tables'
|
||||
Phase 4/6: Fixing table and database names
|
||||
Phase 5/6: Checking and upgrading tables
|
||||
Phase 2/7: Installing used storage engines... Skipped
|
||||
Phase 3/7: Fixing views
|
||||
Phase 4/7: Running 'mysql_fix_privilege_tables'
|
||||
Phase 5/7: Fixing table and database names
|
||||
Phase 6/7: Checking and upgrading tables
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
@ -391,7 +399,7 @@ mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
performance_schema
|
||||
test
|
||||
Phase 6/6: Running 'FLUSH PRIVILEGES'
|
||||
Phase 7/7: Running 'FLUSH PRIVILEGES'
|
||||
OK
|
||||
#
|
||||
# Bug #21489398: MYSQL_UPGRADE: FATAL ERROR: UPGRADE FAILED - IMPROVE ERROR
|
||||
@ -412,7 +420,7 @@ 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/6: Checking and upgrading mysql database
|
||||
Phase 1/7: Checking and upgrading mysql database
|
||||
Processing databases
|
||||
mysql
|
||||
mysql.column_stats OK
|
||||
@ -443,10 +451,11 @@ mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
Phase 2/6: Fixing views
|
||||
Phase 3/6: Running 'mysql_fix_privilege_tables'
|
||||
Phase 4/6: Fixing table and database names
|
||||
Phase 5/6: Checking and upgrading tables
|
||||
Phase 2/7: Installing used storage engines... Skipped
|
||||
Phase 3/7: Fixing views
|
||||
Phase 4/7: Running 'mysql_fix_privilege_tables'
|
||||
Phase 5/7: Fixing table and database names
|
||||
Phase 6/7: Checking and upgrading tables
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
@ -454,7 +463,7 @@ mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
performance_schema
|
||||
test
|
||||
Phase 6/6: Running 'FLUSH PRIVILEGES'
|
||||
Phase 7/7: Running 'FLUSH PRIVILEGES'
|
||||
OK
|
||||
SELECT definer FROM mysql.proc WHERE db = 'test' AND name = 'pr';
|
||||
definer
|
||||
@ -470,7 +479,7 @@ set sql_mode=default;
|
||||
create table test.t1(a int) engine=MyISAM;
|
||||
# Trying to enforce InnoDB for all tables
|
||||
SET GLOBAL enforce_storage_engine=InnoDB;
|
||||
Phase 1/6: Checking and upgrading mysql database
|
||||
Phase 1/7: Checking and upgrading mysql database
|
||||
Processing databases
|
||||
mysql
|
||||
mysql.column_stats OK
|
||||
@ -501,10 +510,11 @@ mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
Phase 2/6: Fixing views
|
||||
Phase 3/6: Running 'mysql_fix_privilege_tables'
|
||||
Phase 4/6: Fixing table and database names
|
||||
Phase 5/6: Checking and upgrading tables
|
||||
Phase 2/7: Installing used storage engines... Skipped
|
||||
Phase 3/7: Fixing views
|
||||
Phase 4/7: Running 'mysql_fix_privilege_tables'
|
||||
Phase 5/7: Fixing table and database names
|
||||
Phase 6/7: Checking and upgrading tables
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
@ -513,7 +523,7 @@ mtr.test_suppressions OK
|
||||
performance_schema
|
||||
test
|
||||
test.t1 OK
|
||||
Phase 6/6: Running 'FLUSH PRIVILEGES'
|
||||
Phase 7/7: Running 'FLUSH PRIVILEGES'
|
||||
OK
|
||||
# Should return 2
|
||||
SELECT count(*) FROM information_schema.tables where ENGINE="InnoDB";
|
||||
|
Reference in New Issue
Block a user