diff options
author | Aleksey Midenkov <midenok@gmail.com> | 2019-12-02 11:48:37 +0300 |
---|---|---|
committer | Aleksey Midenkov <midenok@gmail.com> | 2019-12-02 11:48:37 +0300 |
commit | db32d9457edbcb23b45f433cfcdfc5d86232bbb0 (patch) | |
tree | 873491a1f4398b9dcebc37597f4b116066466e7d /sql/table.h | |
parent | a7cf0db3d866d92ca54d4ba5f15f3cc3f8b48d31 (diff) | |
download | mariadb-git-db32d9457edbcb23b45f433cfcdfc5d86232bbb0.tar.gz |
MDEV-18929 2nd execution of SP does not detect ER_VERS_NOT_VERSIONED
Don't do skip_setup_conds() unless all errors are checked.
Fixes following errors:
ER_PERIOD_NOT_FOUND
ER_VERS_QUERY_IN_PARTITION
ER_VERS_ENGINE_UNSUPPORTED
ER_VERS_NOT_VERSIONED
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/table.h b/sql/table.h index 86e30034449..11ede736127 100644 --- a/sql/table.h +++ b/sql/table.h @@ -1871,6 +1871,7 @@ public: struct vers_select_conds_t { vers_system_time_t type; + vers_system_time_t orig_type; bool used:1; bool delete_history:1; Vers_history_point start; @@ -1879,6 +1880,7 @@ struct vers_select_conds_t void empty() { type= SYSTEM_TIME_UNSPECIFIED; + orig_type= SYSTEM_TIME_UNSPECIFIED; used= false; delete_history= false; start.empty(); @@ -1890,6 +1892,7 @@ struct vers_select_conds_t Vers_history_point _end= Vers_history_point()) { type= _type; + orig_type= _type; used= false; delete_history= (type == SYSTEM_TIME_HISTORY || type == SYSTEM_TIME_BEFORE); @@ -1905,6 +1908,10 @@ struct vers_select_conds_t { return type != SYSTEM_TIME_UNSPECIFIED; } + bool was_set() const + { + return orig_type != SYSTEM_TIME_UNSPECIFIED; + } bool resolve_units(THD *thd); bool eq(const vers_select_conds_t &conds) const; }; |