diff options
author | Alexander Barkov <bar@mariadb.com> | 2018-04-23 17:03:25 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2018-04-23 17:03:25 +0400 |
commit | 8fce4065e542ad64438d45f60421241dd383815f (patch) | |
tree | 38b9dd7d75bee4ffc1734b0de77fcdafee08a97b /sql/field.h | |
parent | 14f84d207177f5cf626377fb760a296a9fceb10d (diff) | |
download | mariadb-git-8fce4065e542ad64438d45f60421241dd383815f.tar.gz |
"AS OF" clean in Type_handler
This patch does the following:
1. Makes Field_vers_trx_id::type_handler() return
&type_handler_vers_trx_id rather than &type_handler_longlong.
Fixes Item_func::convert_const_compared_to_int_field() to
test field_item->type_handler() against &type_handler_vers_trx_id,
instead of testing field_item->vers_trx_id().
2. Removes VERS_TRX_ID related code from
Type_handler_hybrid_field_type::aggregate_for_comparison(),
because "BIGINT UNSIGNED GENERATED ALWAYS AS ROW {START|END}"
columns behave just like a BIGINT in a regular comparison,
i.e. when not inside AS OF.
3. Removes
- Type_handler_hybrid_field_type::m_vers_trx_id;
- Type_handler_hybrid_field_type::m_flags;
because a "BIGINT UNSIGNED GENERATED ALWAYS AS ROW {START|END}"
behaves like a regular BIGINT column when in UNION.
4. Removes Field::vers_trx_id(), Item::vers_trx_id(), Item::field_flags()
They are not needed anymore. See N1.
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/sql/field.h b/sql/field.h index ed8a11806da..6fb5c0c0f37 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1461,11 +1461,6 @@ public: return flags & VERS_UPDATE_UNVERSIONED_FLAG; } - virtual bool vers_trx_id() const - { - return false; - } - /* Validate a non-null field value stored in the given record according to the current thread settings, e.g. sql_mode. @@ -2313,8 +2308,7 @@ public: unsigned_arg), cached(0) {} - enum_field_types real_type() const { return MYSQL_TYPE_LONGLONG; } - enum_field_types type() const { return MYSQL_TYPE_LONGLONG;} + const Type_handler *type_handler() const { return &type_handler_vers_trx_id; } uint size_of() const { return sizeof(*this); } bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate, ulonglong trx_id); bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate) @@ -2341,10 +2335,6 @@ public: } /* cmp_type() cannot be TIME_RESULT, because we want to compare this field against integers. But in all other cases we treat it as TIME_RESULT! */ - bool vers_trx_id() const - { - return true; - } }; |