Skip to content

Commit c0743e4

Browse files
committed
Merge 10.3 into 10.4
2 parents 4c7a743 + 00a254c commit c0743e4

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

mysql-test/suite/versioning/r/truncate.result

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,5 +142,16 @@ with system versioning;
142142
insert into t1 (f) values ('a'), ('b'), ('c'), ('d'), ('e'), ('f'), ('g'), ('h');
143143
delete from t1;
144144
delete history from t1;
145+
drop table t1;
146+
#
147+
# MDEV-20186 Wrong result or Assertion on INSERT after DELETE HISTORY
148+
#
149+
create or replace table t1 (a int check (a > 0)) with system versioning;
150+
delete history from t1;
151+
insert into t1 values (1);
152+
select * from t1;
153+
a
154+
1
155+
drop table t1;
145156
drop database test;
146157
create database test;

mysql-test/suite/versioning/t/truncate.test

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,16 @@ with system versioning;
158158
insert into t1 (f) values ('a'), ('b'), ('c'), ('d'), ('e'), ('f'), ('g'), ('h');
159159
delete from t1;
160160
delete history from t1;
161+
drop table t1;
162+
163+
--echo #
164+
--echo # MDEV-20186 Wrong result or Assertion on INSERT after DELETE HISTORY
165+
--echo #
166+
create or replace table t1 (a int check (a > 0)) with system versioning;
167+
delete history from t1;
168+
insert into t1 values (1);
169+
select * from t1;
170+
drop table t1;
161171

162172
drop database test;
163173
create database test;

sql/table.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5064,6 +5064,7 @@ void TABLE::init(THD *thd, TABLE_LIST *tl)
50645064
range_rowid_filter_cost_info= NULL;
50655065
update_handler= NULL;
50665066
check_unique_buf= NULL;
5067+
vers_write= s->versioned;
50675068
#ifdef HAVE_REPLICATION
50685069
/* used in RBR Triggers */
50695070
master_had_triggers= 0;

0 commit comments

Comments
 (0)