• unknown's avatar
    Fix bug #14093 Query takes a lot of time when date format is not valid · bb841518
    unknown authored
    Invalid date like 2000-02-32 wasn't converted to int, which lead to not
    using index and comparison with field as astring, which results in slow
    query execution.
    
    convert_constatn_item() and get_mm_leaf() now forces MODE_INVALID_DATES to
    allow such conversion.
    
    
    sql/item.h:
      Fix bug #14093 Query takes a lot of time when date format is not valid
      To Item_int_with_ref added method real_item() which returns ref.
    sql/item_cmpfunc.cc:
       Fix bug #14093 Query takes a lot of time when date format is not valid
      convert_constant_item() now allows conversion of invalid dates like 2000-01-32 to int to make it possible to use index when comparing fields with such dates.
    sql/opt_range.cc:
       Fix bug #14093 Query takes a lot of time when date format is not valid
      get_mm_leaf() modified so it allows index usage for comparing fields with invalid dates like 2000-01-32.
    mysql-test/r/select.result:
      Test case for bug#14093 Query takes a lot of time when date format is not valid
    mysql-test/t/select.test:
      Test case for bug#14093 Query takes a lot of time when date format is not valid
    bb841518
select.test 142 KB