1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-16884 Remove tests for field_type() in Item_cache_temporal

This commit is contained in:
Alexander Barkov
2018-08-02 17:49:28 +04:00
parent c7115428ed
commit 8ecc75373f
4 changed files with 44 additions and 38 deletions

View File

@ -5800,7 +5800,7 @@ Item *Field_temporal::get_equal_const_item_datetime(THD *thd,
case ANY_SUBST:
if (!is_temporal_type_with_date(const_item->field_type()))
{
Datetime dt(thd, const_item, TIME_FUZZY_DATES | TIME_INVALID_DATES);
Datetime dt(thd, const_item, Datetime::comparison_flags_for_get_date());
if (!dt.is_valid_datetime())
return NULL;
return new (thd->mem_root)
@ -6633,7 +6633,7 @@ Item *Field_newdate::get_equal_const_item(THD *thd, const Context &ctx,
if (!is_temporal_type_with_date(const_item->field_type()))
{
// Get the value of const_item with conversion from TIME to DATETIME
Datetime dt(thd, const_item, TIME_FUZZY_DATES | TIME_INVALID_DATES);
Datetime dt(thd, const_item, Datetime::comparison_flags_for_get_date());
if (!dt.is_valid_datetime())
return NULL;
/*