diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/ctype_upgrade.result | 26 | ||||
-rw-r--r-- | mysql-test/r/log_tables_upgrade.result | 13 | ||||
-rw-r--r-- | mysql-test/r/mysql_upgrade-6984.result | 13 | ||||
-rw-r--r-- | mysql-test/r/mysql_upgrade.result | 130 | ||||
-rw-r--r-- | mysql-test/r/mysql_upgrade_no_innodb.result | 13 | ||||
-rw-r--r-- | mysql-test/r/mysql_upgrade_noengine.result | 297 | ||||
-rw-r--r-- | mysql-test/r/mysql_upgrade_ssl.result | 13 | ||||
-rw-r--r-- | mysql-test/r/mysql_upgrade_view.result | 39 | ||||
-rw-r--r-- | mysql-test/t/mysql_upgrade_noengine.test | 56 |
9 files changed, 486 insertions, 114 deletions
diff --git a/mysql-test/r/ctype_upgrade.result b/mysql-test/r/ctype_upgrade.result index b317be42d5c..53cb858035b 100644 --- a/mysql-test/r/ctype_upgrade.result +++ b/mysql-test/r/ctype_upgrade.result @@ -227,7 +227,7 @@ DROP TABLE mysql050614_xxx_croatian_ci; # Checking mysql_upgrade # # Running mysql_upgrade -Phase 1/6: Checking and upgrading mysql database +Phase 1/7: Checking and upgrading mysql database Processing databases mysql mysql.column_stats OK @@ -258,10 +258,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 @@ -280,11 +281,11 @@ test.maria050313_ucs2_croatian_ci_def OK test.maria050313_utf8_croatian_ci OK test.maria050533_xxx_croatian_ci OK test.maria100004_xxx_croatian_ci OK -Phase 6/6: Running 'FLUSH PRIVILEGES' +Phase 7/7: Running 'FLUSH PRIVILEGES' OK # Running mysql_upgrade for the second time # This should report OK for all tables -Phase 1/6: Checking and upgrading mysql database +Phase 1/7: Checking and upgrading mysql database Processing databases mysql mysql.column_stats OK @@ -315,10 +316,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 @@ -331,7 +333,7 @@ test.maria050313_utf8_croatian_ci OK test.maria050533_xxx_croatian_ci OK test.maria100004_xxx_croatian_ci OK test.mysql050614_xxx_croatian_ci OK -Phase 6/6: Running 'FLUSH PRIVILEGES' +Phase 7/7: Running 'FLUSH PRIVILEGES' OK SHOW CREATE TABLE maria050313_ucs2_croatian_ci_def; Table Create Table diff --git a/mysql-test/r/log_tables_upgrade.result b/mysql-test/r/log_tables_upgrade.result index 6cbb25bd1d4..a56d067c2cd 100644 --- a/mysql-test/r/log_tables_upgrade.result +++ b/mysql-test/r/log_tables_upgrade.result @@ -11,7 +11,7 @@ Table Op Msg_type Msg_text test.bug49823 repair status OK RENAME TABLE general_log TO renamed_general_log; RENAME TABLE test.bug49823 TO general_log; -Phase 1/6: Checking and upgrading mysql database +Phase 1/7: Checking and upgrading mysql database Processing databases mysql mysql.column_stats OK @@ -43,10 +43,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 @@ -54,7 +55,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 TABLE general_log; RENAME TABLE renamed_general_log TO general_log; diff --git a/mysql-test/r/mysql_upgrade-6984.result b/mysql-test/r/mysql_upgrade-6984.result index 6aea4806ddb..dacea61d094 100644 --- a/mysql-test/r/mysql_upgrade-6984.result +++ b/mysql-test/r/mysql_upgrade-6984.result @@ -1,5 +1,5 @@ update mysql.user set password=password("foo") where user='root'; -Phase 1/6: Checking and upgrading mysql database +Phase 1/7: Checking and upgrading mysql database Processing databases mysql mysql.column_stats OK @@ -42,10 +42,11 @@ error : Corrupt mysql.innodb_table_stats Error : Unknown storage engine 'InnoDB' error : Corrupt -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 @@ -53,7 +54,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 update mysql.user set password='' where user='root'; flush privileges; diff --git a/mysql-test/r/mysql_upgrade.result b/mysql-test/r/mysql_upgrade.result index d10e042729f..46725055952 100644 --- a/mysql-test/r/mysql_upgrade.result +++ b/mysql-test/r/mysql_upgrade.result @@ -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"; diff --git a/mysql-test/r/mysql_upgrade_no_innodb.result b/mysql-test/r/mysql_upgrade_no_innodb.result index acbca131587..6ad818278f8 100644 --- a/mysql-test/r/mysql_upgrade_no_innodb.result +++ b/mysql-test/r/mysql_upgrade_no_innodb.result @@ -1,5 +1,5 @@ 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 @@ -42,9 +42,10 @@ error : Corrupt mysql.innodb_table_stats Error : Unknown storage engine 'InnoDB' error : Corrupt -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 diff --git a/mysql-test/r/mysql_upgrade_noengine.result b/mysql-test/r/mysql_upgrade_noengine.result new file mode 100644 index 00000000000..09e705abb69 --- /dev/null +++ b/mysql-test/r/mysql_upgrade_noengine.result @@ -0,0 +1,297 @@ +install soname 'ha_blackhole'; +install soname 'ha_archive'; +create table t1 (a int) engine=blackhole; +create table t2 (a int) engine=archive; +select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test'; +table_catalog def +table_schema test +table_name t1 +table_type BASE TABLE +engine BLACKHOLE +row_format Fixed +table_rows 0 +data_length 0 +table_comment +table_catalog def +table_schema test +table_name t2 +table_type BASE TABLE +engine ARCHIVE +row_format Compressed +table_rows 0 +data_length 521 +table_comment +flush tables; +uninstall plugin blackhole; +uninstall plugin archive; +select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test'; +table_catalog def +table_schema test +table_name t1 +table_type BASE TABLE +engine BLACKHOLE +row_format NULL +table_rows NULL +data_length NULL +table_comment Unknown storage engine 'BLACKHOLE' +table_catalog def +table_schema test +table_name t2 +table_type BASE TABLE +engine ARCHIVE +row_format NULL +table_rows NULL +data_length NULL +table_comment Unknown storage engine 'ARCHIVE' +Warnings: +Level Warning +Code 1286 +Message Unknown storage engine 'BLACKHOLE' +Level Warning +Code 1286 +Message Unknown storage engine 'ARCHIVE' +Phase 1/7: Checking and upgrading mysql database +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/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 +mtr.global_suppressions OK +mtr.test_suppressions OK +performance_schema +test +test.t1 +Error : Unknown storage engine 'BLACKHOLE' +error : Corrupt +test.t2 +Error : Unknown storage engine 'ARCHIVE' +error : Corrupt + +Repairing tables +test.t1 +Error : Unknown storage engine 'BLACKHOLE' +error : Corrupt +test.t2 +Error : Unknown storage engine 'ARCHIVE' +error : Corrupt +Phase 7/7: Running 'FLUSH PRIVILEGES' +OK +select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test'; +table_catalog def +table_schema test +table_name t1 +table_type BASE TABLE +engine BLACKHOLE +row_format NULL +table_rows NULL +data_length NULL +table_comment Unknown storage engine 'BLACKHOLE' +table_catalog def +table_schema test +table_name t2 +table_type BASE TABLE +engine ARCHIVE +row_format NULL +table_rows NULL +data_length NULL +table_comment Unknown storage engine 'ARCHIVE' +Warnings: +Level Warning +Code 1286 +Message Unknown storage engine 'BLACKHOLE' +Level Warning +Code 1286 +Message Unknown storage engine 'ARCHIVE' +alter table mysql.user drop column default_role, drop column max_statement_time; +Phase 1/7: Checking and upgrading mysql database +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/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 +mtr.global_suppressions OK +mtr.test_suppressions OK +performance_schema +test +test.t1 +Error : Unknown storage engine 'BLACKHOLE' +error : Corrupt +test.t2 +Error : Unknown storage engine 'ARCHIVE' +error : Corrupt + +Repairing tables +test.t1 +Error : Unknown storage engine 'BLACKHOLE' +error : Corrupt +test.t2 +Error : Unknown storage engine 'ARCHIVE' +error : Corrupt +Phase 7/7: Running 'FLUSH PRIVILEGES' +OK +select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test'; +table_catalog def +table_schema test +table_name t1 +table_type BASE TABLE +engine BLACKHOLE +row_format NULL +table_rows NULL +data_length NULL +table_comment Unknown storage engine 'BLACKHOLE' +table_catalog def +table_schema test +table_name t2 +table_type BASE TABLE +engine ARCHIVE +row_format NULL +table_rows NULL +data_length NULL +table_comment Unknown storage engine 'ARCHIVE' +Warnings: +Level Warning +Code 1286 +Message Unknown storage engine 'BLACKHOLE' +Level Warning +Code 1286 +Message Unknown storage engine 'ARCHIVE' +alter table mysql.user drop column default_role, drop column max_statement_time; +Phase 1/7: Checking and upgrading mysql database +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 +Upgrading from a version before MariaDB-10.1 +Phase 2/7: Installing used storage engines +Checking for tables with unknown storage engine +installing plugin for 'blackhole' storage engine +installing plugin for 'archive' storage engine +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 +mtr.global_suppressions OK +mtr.test_suppressions OK +performance_schema +test +test.t1 OK +test.t2 OK +Phase 7/7: Running 'FLUSH PRIVILEGES' +OK +select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test'; +table_catalog def +table_schema test +table_name t1 +table_type BASE TABLE +engine BLACKHOLE +row_format Fixed +table_rows 0 +data_length 0 +table_comment +table_catalog def +table_schema test +table_name t2 +table_type BASE TABLE +engine ARCHIVE +row_format Compressed +table_rows 0 +data_length 521 +table_comment +drop table t1, t2; +uninstall plugin blackhole; +uninstall plugin archive; diff --git a/mysql-test/r/mysql_upgrade_ssl.result b/mysql-test/r/mysql_upgrade_ssl.result index e06d1bb1671..918a24ffc71 100644 --- a/mysql-test/r/mysql_upgrade_ssl.result +++ b/mysql-test/r/mysql_upgrade_ssl.result @@ -1,7 +1,7 @@ # # Bug#55672 mysql_upgrade dies with internal error # -Phase 1/6: Checking and upgrading mysql database +Phase 1/7: Checking and upgrading mysql database Processing databases mysql mysql.column_stats OK @@ -32,10 +32,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 @@ -43,5 +44,5 @@ mtr.global_suppressions OK mtr.test_suppressions OK performance_schema test -Phase 6/6: Running 'FLUSH PRIVILEGES' +Phase 7/7: Running 'FLUSH PRIVILEGES' OK diff --git a/mysql-test/r/mysql_upgrade_view.result b/mysql-test/r/mysql_upgrade_view.result index f43f42f97fd..dc31592566a 100644 --- a/mysql-test/r/mysql_upgrade_view.result +++ b/mysql-test/r/mysql_upgrade_view.result @@ -63,7 +63,7 @@ test.v2 check error Upgrade required. Please do "REPAIR VIEW `v2`" or dump/reloa check view v3 for upgrade; Table Op Msg_type Msg_text test.v3 check error Upgrade required. Please do "REPAIR VIEW `v3`" or dump/reload to fix it! -Phase 1/6: Checking and upgrading mysql database +Phase 1/7: Checking and upgrading mysql database Processing databases mysql mysql.column_stats OK @@ -106,14 +106,15 @@ error : Corrupt mysql.innodb_table_stats Error : Unknown storage engine 'InnoDB' error : Corrupt -Phase 2/6: Fixing views +Phase 2/7: Installing used storage engines... Skipped +Phase 3/7: Fixing views test.v1 OK test.v1badcheck OK test.v2 OK test.v3 OK -Phase 3/6: Running 'mysql_fix_privilege_tables' -Phase 4/6: Fixing table and database names -Phase 5/6: Checking and upgrading tables +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 @@ -123,7 +124,7 @@ performance_schema test test.kv OK test.t1 OK -Phase 6/6: Running 'FLUSH PRIVILEGES' +Phase 7/7: Running 'FLUSH PRIVILEGES' OK show create view v1; View Create View character_set_client collation_connection @@ -205,7 +206,7 @@ show create view v4; View Create View character_set_client collation_connection v4 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS select `t1`.`a` AS `a` from `t1` latin1 latin1_swedish_ci MySQL upgrade detected -Phase 1/6: Checking and upgrading mysql database +Phase 1/7: Checking and upgrading mysql database Processing databases mysql mysql.column_stats OK @@ -249,14 +250,15 @@ error : Corrupt mysql.innodb_table_stats Error : Unknown storage engine 'InnoDB' error : Corrupt -Phase 2/6: Fixing views from mysql +Phase 2/7: Installing used storage engines... Skipped +Phase 3/7: Fixing views from mysql test.v1 OK test.v2 OK test.v3 OK test.v4 OK -Phase 3/6: Running 'mysql_fix_privilege_tables' -Phase 4/6: Fixing table and database names -Phase 5/6: Checking and upgrading tables +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 @@ -266,7 +268,7 @@ performance_schema test test.kv OK test.t1 OK -Phase 6/6: Running 'FLUSH PRIVILEGES' +Phase 7/7: Running 'FLUSH PRIVILEGES' OK flush tables; show create view v1; @@ -323,7 +325,7 @@ rename table mysql.event to mysql.ev_bk; flush tables; The --upgrade-system-tables option was used, user tables won't be touched. MySQL upgrade detected -Phase 1/6: Checking and upgrading mysql database +Phase 1/7: Checking and upgrading mysql database Processing databases mysql mysql.column_stats OK @@ -367,14 +369,15 @@ error : Corrupt mysql.innodb_table_stats Error : Unknown storage engine 'InnoDB' error : Corrupt -Phase 2/6: Fixing views from mysql +Phase 2/7: Installing used storage engines... Skipped +Phase 3/7: Fixing views from mysql test.v1 OK test.v2 OK test.v3 OK -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 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 drop table mysql.event; rename table mysql.ev_bk to mysql.event; diff --git a/mysql-test/t/mysql_upgrade_noengine.test b/mysql-test/t/mysql_upgrade_noengine.test new file mode 100644 index 00000000000..bbc024788b0 --- /dev/null +++ b/mysql-test/t/mysql_upgrade_noengine.test @@ -0,0 +1,56 @@ +# +# MDEV-11942 BLACKHOLE is no longer active in 10.1 by default, mysql_upgrade not handling the situation +# +source include/have_innodb.inc; +source include/not_embedded.inc; + +if (!$HA_BLACKHOLE_SO) { + skip Need blackhole plugin; +} +if (!$HA_ARCHIVE_SO) { + skip Need Archive plugin; +} + +let $datadir= `select @@datadir`; + +install soname 'ha_blackhole'; +install soname 'ha_archive'; + +vertical_results; +create table t1 (a int) engine=blackhole; +create table t2 (a int) engine=archive; +select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test'; + +flush tables; +uninstall plugin blackhole; +uninstall plugin archive; +select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test'; + +# upgrade from 10.1 - engines aren't enabled +exec $MYSQL_UPGRADE 2>&1; +select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test'; + +# pretend it's an upgrade from 10.0 +alter table mysql.user drop column default_role, drop column max_statement_time; + +# but mysql_upgrade_info tells otherwise +remove_file $datadir/mysql_upgrade_info; +write_file $datadir/mysql_upgrade_info; +10.1.10-MariaDB +EOF + +# still upgrade from 10.1 +exec $MYSQL_UPGRADE 2>&1; +select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test'; + +alter table mysql.user drop column default_role, drop column max_statement_time; +remove_file $datadir/mysql_upgrade_info; + +# upgrade from 10.0 - engines are enabled +exec $MYSQL_UPGRADE 2>&1; +select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test'; + +drop table t1, t2; + +uninstall plugin blackhole; +uninstall plugin archive; |