diff options
author | Daniel Black <grooverdan@users.sourceforge.net> | 2015-04-13 22:58:45 +1000 |
---|---|---|
committer | Daniel Black <grooverdan@users.sourceforge.net> | 2015-04-13 22:58:45 +1000 |
commit | 622891c6e17b714d92534cb46bf0d573fa4e3ba1 (patch) | |
tree | 8e67884391e3fb2735df0b20015eab36edb2ad8a /sql | |
parent | 8a827d530a67d40332668d31683a45f583974935 (diff) | |
download | mariadb-git-622891c6e17b714d92534cb46bf0d573fa4e3ba1.tar.gz |
mariadb_fix_view to allow fixing of view->mariadb_version
Reverts the wrong_checksum part of
29721d7d5f85fe323d70f1856aa1e5294e14074a
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_view.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 46998c215da..da7ab7c79bc 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -818,7 +818,7 @@ int mariadb_fix_view(THD *thd, TABLE_LIST *view, bool wrong_checksum, LEX_STRING dir, file, path; DBUG_ENTER("mariadb_fix_view"); - if (view->mariadb_version) + if (!wrong_checksum && view->mariadb_version) DBUG_RETURN(HA_ADMIN_OK); 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) int view_repair(THD *thd, TABLE_LIST *view, HA_CHECK_OPT *check_opt) { DBUG_ENTER("view_repair"); - bool swap_alg= - ((check_opt->sql_flags & TT_FROM_MYSQL) && - (!view->mariadb_version)); + bool swap_alg= (check_opt->sql_flags & TT_FROM_MYSQL); bool wrong_checksum= view_checksum(thd, view); 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); DBUG_RETURN(ret); |