• MySQL Build Team's avatar
    Backport into build-200911241145-5.1.40sp1 · 6d26367b
    MySQL Build Team authored
    > ------------------------------------------------------------
    > revno: 3148.9.6
    > revision-id: martin.hansson@sun.com-20091102122407-krzh4h0i052lbwr5
    > parent: davi.arnaut@sun.com-20091102112236-k3myix2xy8miyv4s
    > committer: Martin Hansson <martin.hansson@sun.com>
    > branch nick: 5.1bt
    > timestamp: Mon 2009-11-02 13:24:07 +0100
    > message:
    >   Bug#47925: regression of range optimizer and date comparison in 5.1.39!
    >   
    >   When a query was using a DATE or DATETIME value formatted
    >   using any other separator characters beside hyphen '-', a
    >   query with a greater-or-equal '>=' condition matching only
    >   the greatest value in an indexed column, the result was
    >   empty if index range scan was employed.
    >   
    >   The range optimizer got a new feature between 5.1.38 and
    >   5.1.39 that changes a greater-or-equal condition to a
    >   greater-than if the value matching that in the query was not
    >   present in the table. But the value comparison function
    >   compared the dates as strings instead of dates.
    >   
    >   The bug was fixed by splitting the function
    >   get_date_from_str in two: One part that parses and does
    >   error checking. This function is now visible outside the
    >   module. The old get_date_from_str now calls the new
    >   function.
    6d26367b
time.cc 27.5 KB