• unknown's avatar
    Fix for bug #22026: Warning when using IF statement and large unsigned bigint · cecefeb8
    unknown authored
      
    We use INT_RESULT type if all arguments are of type INT for 'if', 'case', 
    'coalesce' functions regardless of arguments' unsigned flag, so sometimes we can
    exceed the INT bounds.
    
    
    mysql-test/r/select.result:
      Fix for bug #22026: Warning when using IF statement and large unsigned bigint
        - test result.
    mysql-test/t/select.test:
      Fix for bug #22026: Warning when using IF statement and large unsigned bigint
        - test case.
    sql/item_cmpfunc.cc:
      Fix for bug #22026: Warning when using IF statement and large unsigned bigint
        - take into account unsigned flags aggregating result types:                    
          return INT_RESULT only if two items with INT_RESULT type                      
          have equal unsigned_flags, otherwise return REAL_RESULT.
    cecefeb8
item_cmpfunc.cc 95.8 KB