Skip to content

Commit 622891c

Browse files
committed
mariadb_fix_view to allow fixing of view->mariadb_version
Reverts the wrong_checksum part of 29721d7
1 parent 8a827d5 commit 622891c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

sql/sql_view.cc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ int mariadb_fix_view(THD *thd, TABLE_LIST *view, bool wrong_checksum,
818818
LEX_STRING dir, file, path;
819819
DBUG_ENTER("mariadb_fix_view");
820820

821-
if (view->mariadb_version)
821+
if (!wrong_checksum && view->mariadb_version)
822822
DBUG_RETURN(HA_ADMIN_OK);
823823

824824
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)
20732073
int view_repair(THD *thd, TABLE_LIST *view, HA_CHECK_OPT *check_opt)
20742074
{
20752075
DBUG_ENTER("view_repair");
2076-
bool swap_alg=
2077-
((check_opt->sql_flags & TT_FROM_MYSQL) &&
2078-
(!view->mariadb_version));
2076+
bool swap_alg= (check_opt->sql_flags & TT_FROM_MYSQL);
20792077
bool wrong_checksum= view_checksum(thd, view);
20802078
int ret;
2081-
if (wrong_checksum || swap_alg)
2079+
if (wrong_checksum || swap_alg || (!view->mariadb_version))
20822080
{
20832081
ret= mariadb_fix_view(thd, view, wrong_checksum, swap_alg);
20842082
DBUG_RETURN(ret);

0 commit comments

Comments
 (0)