diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-11-22 22:21:37 +0200 |
---|---|---|
committer | Aleksey Midenkov <midenok@gmail.com> | 2017-11-27 15:07:33 +0300 |
commit | 03fbfeef660b4799f73ed610182aa5dcbb3c2ec5 (patch) | |
tree | 42c4bcf69253eb5e7816ed8a0efd9ae55739a8f0 /storage/innobase/data | |
parent | 0cdc1164dc9274775740c911ca362e6ac7f3eac1 (diff) | |
download | mariadb-git-03fbfeef660b4799f73ed610182aa5dcbb3c2ec5.tar.gz |
Identify system-versioned columns in the InnoDB dictionary
Both bits DATA_VERSIONED will be set in prtype if the column
is system-versioned. The bits will be 0 for normal unversioned
columns. For the special columns identifying the logical start
and end times of versions, only one bit will be set:
DATA_VERS_START or DATA_VERS_END.
create_table_info_t::create_table_def(),
prepare_inplace_alter_table_dict(): Set prtype |= DATA_VERSIONED
for system-versioned columns.
dfield_t::is_version_historical_end(): Determine if a data tuple
field is_version_end() and contains a timestamp in the past
(not TRX_ID_MAX).
dtype_t, dict_col_t: Add the accessors
is_versioned(), is_version_start(), is_version_end().
trx_id_max_bytes[]: The bit pattern of TRX_ID_MAX, for use with
memcmp().
Diffstat (limited to 'storage/innobase/data')
-rw-r--r-- | storage/innobase/data/data0data.cc | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/storage/innobase/data/data0data.cc b/storage/innobase/data/data0data.cc index fbdb409dbc5..6601edfec9d 100644 --- a/storage/innobase/data/data0data.cc +++ b/storage/innobase/data/data0data.cc @@ -861,17 +861,3 @@ dfield_t::clone(mem_heap_t* heap) const return(obj); } - -/** Assuming field is sys_trx_end checks whether its value is not SYS_TRX_MAX. -@param dfield field to check -@return true for historical rows and false otherwise*/ -bool -dfield_is_historical_sys_trx_end(const dfield_t* dfield) -{ - static const trx_id_t MAX = TRX_ID_MAX; - ut_ad(dfield); - ut_ad(dfield->type.prtype & DATA_VERS_END); - const byte* data = static_cast<const byte*>(dfield_get_data(dfield)); - ut_ad(dfield_get_len(dfield) == 8); - return(memcmp(data, &MAX, 8)); -} |