• unknown's avatar
    Bug#29555: Comparing time values as strings may lead to a wrong result. · 25e28d4d
    unknown authored
    Time values were compared as strings. This led to a wrong comparison
    result when comparing values one of which is under 100 hours and another is
    over 100 hours.
    
    Now when the Arg_comparator::set_cmp_func function sees that both items to
    compare are of the TIME type it sets the comparator to the
    Arg_comparator::compare_e_int or the Arg_comparator::compare_int_unsigned
    functions.
    
    
    sql/item_cmpfunc.cc:
      Bug#29555: Comparing time values as strings may lead to a wrong result.
      Now when the Arg_comparator::set_cmp_func function sees that both items to
      compare are of the TIME type it sets the comparator to the
      Arg_comparator::compare_e_int or the Arg_comparator::compare_int_unsigned
      functions.
    mysql-test/r/type_time.result:
      Added a test case for the bug#29555: Comparing time values as strings may
      lead to a wrong result.
    mysql-test/t/type_time.test:
      Added a test case for the bug#29555: Comparing time values as strings may
      lead to a wrong result.
    25e28d4d
item_cmpfunc.cc 122 KB