MDEV-18275 Live upgrade from 5.5 does not work: InnoDB stat tables are used before creation

let mysql_upgrade to work even when innodb_index_stats or
innodb_table_stats are missing.

(mysql_upgrade knows to ignore "unknown table" errors)
This commit is contained in:
Sergei Golubchik 2019-03-13 12:42:42 +01:00
commit 23a7693a68
3 changed files with 33 additions and 29 deletions

View file

@ -624,3 +624,9 @@ connection default;
drop user user3@localhost;
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;
drop view mysql.user_bak;
drop table mysql.innodb_index_stats, mysql.innodb_table_stats;
# mysql_upgrade --force --silent 2>&1
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;
# End of 10.4 tests

View file

@ -269,3 +269,17 @@ connection default;
drop user user3@localhost;
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;
#
# MDEV-18275 Live upgrade from 5.5 does not work: InnoDB stat tables are used before creation
#
--source include/switch_to_mysql_user.inc
drop view mysql.user_bak;
drop table mysql.innodb_index_stats, mysql.innodb_table_stats;
--echo # mysql_upgrade --force --silent 2>&1
--exec $MYSQL_UPGRADE --force --silent 2>&1
--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;
--echo # End of 10.4 tests