[MDEV-8896] Dead code in stored_field_cmp_to_item() Created: 2015-10-05  Updated: 2015-10-05  Resolved: 2015-10-05

Status: Closed
Project: MariaDB Server
Component/s: Optimizer
Affects Version/s: 10.1
Fix Version/s: 10.1.8

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

Sprint: 10.1.8-4

 Description   

int stored_field_cmp_to_item(THD *thd, Field *field, Item *item)
{
  if (field->cmp_type() == TIME_RESULT)
  {
    ..
    return my_time_compare(&field_time, item_time_cmp);
  }
  if (res_type == STRING_RESULT)
  {
    ...
    if (field_type == MYSQL_TYPE_DATE || field_type == MYSQL_TYPE_DATETIME ||
        field_type == MYSQL_TYPE_TIMESTAMP)
    {
      // This code is dead, because all temporal types are handled
      //in the first branch for TIME_RESULT
       ...
       return my_time_compare(&field_time, &item_time);
    }
    ..
  }
}


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