Item_cache_temporal::Item_cache_temporal(THD *thd,
                                         enum_field_types field_type_arg):
  Item_cache_int(thd, field_type_arg)
{
  if (mysql_type_to_time_type(Item_cache_temporal::field_type()) ==
                              MYSQL_TIMESTAMP_ERROR)
    set_handler_by_field_type(MYSQL_TYPE_DATETIME);
}
Item_cache_temporal::Item_cache_temporal(THD *thd,
                                         enum_field_types field_type_arg):
  Item_cache_int(thd, field_type_arg)
{
  if (mysql_type_to_time_type(Item_cache_temporal::field_type()) ==
                              MYSQL_TIMESTAMP_ERROR)
    set_handler_by_field_type(MYSQL_TYPE_DATETIME);
}