From 0076dce2c89248b6c0252ec4385879194f9aadbf Mon Sep 17 00:00:00 2001 From: Aleksey Midenkov Date: Fri, 22 Nov 2019 14:29:03 +0300 Subject: 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 --- sql/table.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sql/table.h') 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; } -- cgit v1.2.1