Commit 1015196e authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: TABLE_LIST::view_check_option

don't prepare for checking view's CHECK OPTION, if
there is no CHECK OPTION in the first place.
parent e84f5356
......@@ -4628,9 +4628,11 @@ void TABLE_LIST::cleanup_items()
int TABLE_LIST::view_check_option(THD *thd, bool ignore_failure)
{
if (check_option)
{
Counting_error_handler ceh;
thd->push_internal_handler(&ceh);
bool res= check_option && check_option->val_int() == 0;
bool res= check_option->val_int() == 0;
thd->pop_internal_handler();
if (ceh.errors)
return(VIEW_CHECK_ERROR);
......@@ -4648,6 +4650,7 @@ int TABLE_LIST::view_check_option(THD *thd, bool ignore_failure)
main_view->view_name.str);
return(VIEW_CHECK_ERROR);
}
}
return(VIEW_CHECK_OK);
}
......
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