Commit 622891c6 authored by Daniel Black's avatar Daniel Black

mariadb_fix_view to allow fixing of view->mariadb_version

Reverts the wrong_checksum part of
29721d7d
parent 8a827d53
...@@ -818,7 +818,7 @@ int mariadb_fix_view(THD *thd, TABLE_LIST *view, bool wrong_checksum, ...@@ -818,7 +818,7 @@ int mariadb_fix_view(THD *thd, TABLE_LIST *view, bool wrong_checksum,
LEX_STRING dir, file, path; LEX_STRING dir, file, path;
DBUG_ENTER("mariadb_fix_view"); DBUG_ENTER("mariadb_fix_view");
if (view->mariadb_version) if (!wrong_checksum && view->mariadb_version)
DBUG_RETURN(HA_ADMIN_OK); DBUG_RETURN(HA_ADMIN_OK);
make_view_filename(&dir, dir_buff, sizeof(dir_buff), make_view_filename(&dir, dir_buff, sizeof(dir_buff),
...@@ -2073,12 +2073,10 @@ int view_check(THD *thd, TABLE_LIST *view, HA_CHECK_OPT *check_opt) ...@@ -2073,12 +2073,10 @@ int view_check(THD *thd, TABLE_LIST *view, HA_CHECK_OPT *check_opt)
int view_repair(THD *thd, TABLE_LIST *view, HA_CHECK_OPT *check_opt) int view_repair(THD *thd, TABLE_LIST *view, HA_CHECK_OPT *check_opt)
{ {
DBUG_ENTER("view_repair"); DBUG_ENTER("view_repair");
bool swap_alg= bool swap_alg= (check_opt->sql_flags & TT_FROM_MYSQL);
((check_opt->sql_flags & TT_FROM_MYSQL) &&
(!view->mariadb_version));
bool wrong_checksum= view_checksum(thd, view); bool wrong_checksum= view_checksum(thd, view);
int ret; int ret;
if (wrong_checksum || swap_alg) if (wrong_checksum || swap_alg || (!view->mariadb_version))
{ {
ret= mariadb_fix_view(thd, view, wrong_checksum, swap_alg); ret= mariadb_fix_view(thd, view, wrong_checksum, swap_alg);
DBUG_RETURN(ret); DBUG_RETURN(ret);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment