Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-8896

Dead code in stored_field_cmp_to_item()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.1
    • Fix Version/s: 10.1.8
    • Component/s: Optimizer
    • 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);
          }
          ..
        }
      }
      

        Gliffy Diagrams

          Attachments

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                bar Alexander Barkov
                Reporter:
                bar Alexander Barkov
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Agile