MDEV-5010: InnoDB errors appearing in logs with upgrade from 10.0.0 to 10.0.4.
MDEV-5010: InnoDB errors appearing in logs with upgrade from 10.0.0 to 10.0.4.

Analysis: In earlier MySQL 5.6 versions this table innodb_index_stats  used to have a foreign key referencing to innodb_table_stats. However, in newer MySQL 5.6 versions this foreign key is removed and if you upgrade, your innodb_table_stats is created by the earlier mariadb version, thus a newer version will complain that the table is incorrectly defined.

Added drop foreign key on mysql_system_tables_fix.sql to be executed on mysql_upgrade.

ollie314/server,natsys/mariadb_10.2,flynn1973/mariadb-aix,ollie314/server,natsys/mariadb_10.2,natsys/mariadb_10.2,ollie314/server,davidl-zend/zenddbi,davidl-zend/zenddbi,flynn1973/mariadb-aix,natsys/mariadb_10.2,davidl-zend/zenddbi,ollie314/server,ollie314/server,natsys/mariadb_10.2,ollie314/server,natsys/mariadb_10.2,davidl-zend/zenddbi,davidl-zend/zenddbi,natsys/mariadb_10.2,flynn1973/mariadb-aix,davidl-zend/zenddbi,ollie314/server,natsys/mariadb_10.2,natsys/mariadb_10.2,flynn1973/mariadb-aix,flynn1973/mariadb-aix,flynn1973/mariadb-aix,flynn1973/mariadb-aix,davidl-zend/zenddbi,davidl-zend/zenddbi,flynn1973/mariadb-aix,davidl-zend/zenddbi,ollie314/server,natsys/mariadb_10.2,flynn1973/mariadb-aix,ollie314/server,flynn1973/mariadb-aix,ollie314/server,ollie314/server,natsys/mariadb_10.2,davidl-zend/zenddbi,davidl-zend/zenddbi,flynn1973/mariadb-aix