summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2020-08-22 15:22:20 +0400
committerAlexander Barkov <bar@mariadb.com>2020-08-22 15:22:20 +0400
commit2e5d86f49e7ee538806fba68dc8c960d6acdd483 (patch)
treeaec0e6903f5decc8c3cdd70111d845ca43e3120e /sql/item.h
parentae33ebe5b32a82629a40e51c8d6c6611842fbd03 (diff)
downloadmariadb-git-2e5d86f49e7ee538806fba68dc8c960d6acdd483.tar.gz
MDEV-23537 Comparison with temporal columns is slow in MariaDB
Implementing methods: - Field::val_time_packed() - Field::val_datetime_packed() - Item_field::val_datetime_packed(THD *thd); - Item_field::val_time_packed(THD *thd); to give a faster access to temporal packed longlong representation of a Field, which is used in temporal Arg_comparator's to DATE, TIME, DATETIME data types. The same idea is used in MySQL-5.6+. This improves performance.
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item.h b/sql/item.h
index aced2ec5f0d..95ca06ac211 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -3418,6 +3418,8 @@ public:
longlong val_int_endpoint(bool left_endp, bool *incl_endp);
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate);
bool get_date_result(THD *thd, MYSQL_TIME *ltime,date_mode_t fuzzydate);
+ longlong val_datetime_packed(THD *thd);
+ longlong val_time_packed(THD *thd);
bool is_null() { return field->is_null(); }
void update_null_value();
void update_table_bitmaps()