Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
00a254cc
Commit
00a254cc
authored
5 years ago
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-20186 Wrong result or Assertion on INSERT after DELETE HISTORY
Fix reinitialize vers_write on table reopen.
parent
29df1003
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
0 deletions
+22
-0
mysql-test/suite/versioning/r/truncate.result
mysql-test/suite/versioning/r/truncate.result
+11
-0
mysql-test/suite/versioning/t/truncate.test
mysql-test/suite/versioning/t/truncate.test
+10
-0
sql/table.cc
sql/table.cc
+1
-0
No files found.
mysql-test/suite/versioning/r/truncate.result
View file @
00a254cc
...
...
@@ -118,5 +118,16 @@ with system versioning;
insert into t1 (f) values ('a'), ('b'), ('c'), ('d'), ('e'), ('f'), ('g'), ('h');
delete from t1;
delete history from t1;
drop table t1;
#
# MDEV-20186 Wrong result or Assertion on INSERT after DELETE HISTORY
#
create or replace table t1 (a int check (a > 0)) with system versioning;
delete history from t1;
insert into t1 values (1);
select * from t1;
a
1
drop table t1;
drop database test;
create database test;
This diff is collapsed.
Click to expand it.
mysql-test/suite/versioning/t/truncate.test
View file @
00a254cc
...
...
@@ -130,6 +130,16 @@ with system versioning;
insert
into
t1
(
f
)
values
(
'a'
),
(
'b'
),
(
'c'
),
(
'd'
),
(
'e'
),
(
'f'
),
(
'g'
),
(
'h'
);
delete
from
t1
;
delete
history
from
t1
;
drop
table
t1
;
--
echo
#
--
echo
# MDEV-20186 Wrong result or Assertion on INSERT after DELETE HISTORY
--
echo
#
create
or
replace
table
t1
(
a
int
check
(
a
>
0
))
with
system
versioning
;
delete
history
from
t1
;
insert
into
t1
values
(
1
);
select
*
from
t1
;
drop
table
t1
;
drop
database
test
;
create
database
test
;
This diff is collapsed.
Click to expand it.
sql/table.cc
View file @
00a254cc
...
...
@@ -4653,6 +4653,7 @@ void TABLE::init(THD *thd, TABLE_LIST *tl)
created
=
TRUE
;
cond_selectivity
=
1.0
;
cond_selectivity_sampling_explain
=
NULL
;
vers_write
=
s
->
versioned
;
#ifdef HAVE_REPLICATION
/* used in RBR Triggers */
master_had_triggers
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment