1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

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

This commit is contained in:
Eugene Kosov
2017-12-22 14:31:04 +03:00
parent 098a1d7ddb
commit 7f1777af88

View File

@ -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(),