• evgen@moonbone.local's avatar
    Bug#28208: Wrong result of a non-const STRING function with a const DATETIME · fbb23326
    evgen@moonbone.local authored
    function.
    
    A wrong  condition was used to check that the
    Arg_comparator::can_compare_as_dates() function calculated the value of the
    string constant. When comparing a non-const STRING function with a constant
    DATETIME function it leads to saving an arbitrary value as a cached value of
    the DATETIME function.
    
    Now the Arg_comparator::set_cmp_func() function initializes the const_value
    variable to the impossible DATETIME value (-1) and this const_value is
    cached only if it was changed by the Arg_comparator::can_compare_as_dates()
    function.
    fbb23326
item_cmpfunc.cc 120 KB