mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -1542,6 +1542,13 @@ public:
|
||||
Time(int *warn, bool neg, ulonglong hour, uint minute, const Sec6 &second);
|
||||
Time() { time_type= MYSQL_TIMESTAMP_NONE; }
|
||||
Time(const Native &native);
|
||||
Time(THD *thd, const MYSQL_TIME *ltime, const Options opt)
|
||||
{
|
||||
*(static_cast<MYSQL_TIME*>(this))= *ltime;
|
||||
DBUG_ASSERT(is_valid_temporal());
|
||||
int warn= 0;
|
||||
valid_MYSQL_TIME_to_valid_value(thd, &warn, opt);
|
||||
}
|
||||
Time(Item *item)
|
||||
:Time(current_thd, item)
|
||||
{ }
|
||||
|
Reference in New Issue
Block a user