[MDEV-16452] Split TIME and DATETIME handling in Item_func_between, in_temporal, cmp_item_internal Created: 2018-06-09  Updated: 2018-06-09  Resolved: 2018-06-09

Status: Closed
Project: MariaDB Server
Component/s: Data types
Fix Version/s: 10.4.0

Type: Task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-4912 Data type plugin API version 1 Closed

 Description   

These methods:

longlong Item_func_between::val_int_cmp_temporal()
char *in_temporal::get_value_internal()
void cmp_item_temporal::store_value_internal()

use val_temporal_packed(field_type()) internally.
This is not friendly to new data types, e.g. it won't work for a new implementation for TIMESTAMP (needed for MDEV-15654) which transfers TIMESTAMP data inside the server using my_time_t representation rather than MYSQL_TIME representation.

This task is to remove Item::val_temporal_packed() and split implementations of the mentioned methods into separate methods for TIME and DATETIME:

longlong Item_func_between::val_int_cmp_time()
longlong Item_func_between::val_int_cmp_datetime()
uchar *in_datetime::get_value()
uchar *in_time::get_value()
void cmp_item_datetime::store_value()
void cmp_item_time::store_value()

These methods will use val_time_packed() and val_datetime_packed() directly.


Generated at Thu Feb 08 08:29:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.