[MDEV-11839] move value caching from get_datetime_value to fix_fields time Created: 2017-01-19  Updated: 2018-03-14  Resolved: 2018-03-14

Status: Closed
Project: MariaDB Server
Component/s: Optimizer, Temporal Types
Fix Version/s: 10.2.14

Type: Task Priority: Major
Reporter: Sergei Golubchik Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Attachments: File get_datetime_value.diff    
Issue Links:
Blocks
blocks MDEV-15141 Check constraint validation on a date... Closed
Relates
relates to MDEV-9690 concurrent queries with virtual colum... Closed

 Description   

A followup for MDEV-9690.

Arg_comparator and other items were storing THD internally at fix_fields time and using it so that get_datetime_value could create an Item_cache_temporal at the first evaluation.

A correct fix for this bug is to move caching of temporal values from get_datetime_value to Arg_comparator::cache_converted_constant, where caches for non-temporal values are created at fix_fields time. This simplifies and unifies the code and further reduces the number of str_to_datetime calls.

work-in-progress patch is attached


Generated at Thu Feb 08 07:53:03 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.