• unknown's avatar
    Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions · f64483cb
    unknown authored
    - Honor unsigned_flag in the corresponding functions
    - Use compare_int_signed_unsigned()/compare_int_unsigned_signed() instead of explicit comparison in GREATEST() and LEAST()
    
    
    mysql-test/r/case.result:
      Added test case for bug #20924
    mysql-test/r/func_if.result:
      Added test case for bug #20924
    mysql-test/r/func_test.result:
      Added test case for bug #20924
    mysql-test/r/user_var.result:
      Added test case for bug #20924
    mysql-test/t/case.test:
      Added test case for bug #20924
    mysql-test/t/func_if.test:
      Added test case for bug #20924
    mysql-test/t/func_test.test:
      Added test case for bug #20924
    mysql-test/t/user_var.test:
      Added test case for bug #20924
    sql/item_cmpfunc.cc:
      Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions
      
      - Moved some code out of Arg_comparator to external functions to be reused in Item_func_min_max
      - Fixed IFNULL(), IF(), CASE() and COALESCE()
    sql/item_cmpfunc.h:
      Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions
      
      - Moved some code out of Arg_comparator to external functions to be reused in Item_func_min_max
    sql/item_func.cc:
      Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions
      
      Fixed LEAST(), GREATEST() and "SET @A=..." parts
    sql/item_func.h:
      Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions
      
      Fixed "SET @A=..." part
    sql/sql_class.h:
      Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions
      
      Fixed "SET @A=..." part
    f64483cb
func_if.result 2.83 KB