Commit 7f1777af authored by Eugene Kosov's avatar Eugene Kosov

SQL: DELETE HISTORY error message in prepared statements [#387]

parent 098a1d7d
......@@ -942,10 +942,15 @@ l
select_lex->leaf_tables, FALSE,
DELETE_ACL, SELECT_ACL, TRUE))
DBUG_RETURN(TRUE);
if (table_list->vers_conditions &&
select_lex->vers_setup_conds(thd, table_list, conds))
if (table_list->vers_conditions)
{
DBUG_RETURN(TRUE);
if (table_list->is_view())
{
my_error(ER_VERS_TRUNCATE_VIEW, MYF(0));
DBUG_RETURN(true);
}
if (select_lex->vers_setup_conds(thd, table_list, conds))
DBUG_RETURN(true);
}
if ((wild_num && setup_wild(thd, table_list, field_list, NULL, wild_num)) ||
setup_fields(thd, Ref_ptr_array(),
......
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