mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Fixed some errors & warnings when running mariadb-upgrade on MySQL instance
- Moved view checks after privilege tables are fixed. This is to avoid warnings about wrongly defined mysql.proc when checking views. - Don't use stat tables before they have been fixed. - Don't run mysql_fix_view() if 'FOR MYSQL' is used if the view is already a MariaDB view. - Added 'FOR UPGRADE' as an option for 'REPAIR VIEW' to be able to detect if the REPAIR command comes from mariadb_upgrade. In this case we get a warning, instead of an error, if a definer of a view does not exists.
This commit is contained in:
@@ -2301,7 +2301,7 @@ int view_repair(THD *thd, TABLE_LIST *view, HA_CHECK_OPT *check_opt)
|
||||
bool swap_alg= (check_opt->sql_flags & TT_FROM_MYSQL);
|
||||
bool wrong_checksum= view_checksum(thd, view) != HA_ADMIN_OK;
|
||||
int ret;
|
||||
if (wrong_checksum || swap_alg || (!view->mariadb_version))
|
||||
if (wrong_checksum || !view->mariadb_version)
|
||||
{
|
||||
ret= mariadb_fix_view(thd, view, wrong_checksum, swap_alg);
|
||||
DBUG_RETURN(ret);
|
||||
|
Reference in New Issue
Block a user