diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_delete.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index f4cad88124f..202478eb586 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -372,6 +372,16 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, &delete_while_scanning)) DBUG_RETURN(TRUE); + if (table_list->has_period()) + { + if (!table_list->period_conditions.start.item->const_item() + || !table_list->period_conditions.end.item->const_item()) + { + my_error(ER_NOT_CONSTANT_EXPRESSION, MYF(0), "FOR PORTION OF"); + DBUG_RETURN(true); + } + } + if (delete_history) table->vers_write= false; |