summaryrefslogtreecommitdiff
path: root/sql/table.h
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2019-11-22 14:29:03 +0300
committerAleksey Midenkov <midenok@gmail.com>2019-11-22 14:29:03 +0300
commit0076dce2c89248b6c0252ec4385879194f9aadbf (patch)
tree1774fb25fcbe854aee956841ab28298029b548f6 /sql/table.h
parenta14544260c33dcdb057d2f62c4aab33cb09ebcb1 (diff)
downloadmariadb-git-0076dce2c89248b6c0252ec4385879194f9aadbf.tar.gz
MDEV-18727 improve DML operation of System Versioning
MDEV-18957 UPDATE with LIMIT clause is wrong for versioned partitioned tables UPDATE, DELETE: replace linear search of current/historical records with vers_setup_conds(). Additional DML cases in view.test
Diffstat (limited to 'sql/table.h')
-rw-r--r--sql/table.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/table.h b/sql/table.h
index bec0fdd10ba..1dda70ae0da 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -1863,6 +1863,7 @@ struct vers_select_conds_t
{
vers_system_time_t type;
bool used:1;
+ bool delete_history:1;
Vers_history_point start;
Vers_history_point end;
@@ -1870,6 +1871,7 @@ struct vers_select_conds_t
{
type= SYSTEM_TIME_UNSPECIFIED;
used= false;
+ delete_history= false;
start.empty();
end.empty();
}
@@ -1880,6 +1882,8 @@ struct vers_select_conds_t
{
type= _type;
used= false;
+ delete_history= (type == SYSTEM_TIME_HISTORY ||
+ type == SYSTEM_TIME_BEFORE);
start= _start;
end= _end;
}