mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-19814 Assertion `update->n_fields < ulint(table->n_cols + table->n_v_cols)' on DELETE HISTORY
Turn off versioned_write for DELETE HISTORY.
This commit is contained in:
@ -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;
|
||||
|
@ -355,6 +355,9 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *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);
|
||||
|
||||
|
Reference in New Issue
Block a user