Commit f6d0d309 authored by Aleksey Midenkov's avatar Aleksey Midenkov

MDEV-19814 Assertion `update->n_fields < ulint(table->n_cols + table->n_v_cols)' on DELETE HISTORY

Turn off versioned_write for DELETE HISTORY.
parent 1a73444d
......@@ -106,5 +106,17 @@ call pr;
call pr;
drop procedure pr;
drop table t1;
#
# MDEV-19814 Assertion `update->n_fields < ulint(table->n_cols + table->n_v_cols)' on DELETE HISTORY
#
create or replace table t1 (
f varchar(1),
row_start SYS_TYPE as row start,
row_end SYS_TYPE as row end,
period for system_time (row_start, row_end))
with system versioning;
insert into t1 (f) values ('a'), ('b'), ('c'), ('d'), ('e'), ('f'), ('g'), ('h');
delete from t1;
delete history from t1;
drop database test;
create database test;
......@@ -117,5 +117,19 @@ call pr;
drop procedure pr;
drop table t1;
--echo #
--echo # MDEV-19814 Assertion `update->n_fields < ulint(table->n_cols + table->n_v_cols)' on DELETE HISTORY
--echo #
--replace_result $sys_datatype_expl SYS_TYPE
eval create or replace table t1 (
f varchar(1),
row_start $sys_datatype_expl as row start,
row_end $sys_datatype_expl as row end,
period for system_time (row_start, row_end))
with system versioning;
insert into t1 (f) values ('a'), ('b'), ('c'), ('d'), ('e'), ('f'), ('g'), ('h');
delete from t1;
delete history from t1;
drop database test;
create database test;
......@@ -354,7 +354,10 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
select_lex->item_list, &conds,
&delete_while_scanning))
DBUG_RETURN(TRUE);
if (delete_history)
table->vers_write= false;
if (with_select)
(void) result->prepare(select_lex->item_list, NULL);
......
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