-
unknown authored
precision > 0 && scale <= precision'. A sign of a resulting item of the IFNULL function was not updated and the maximal length of this result was calculated improperly. Correct algorithm was copy&pasted from the IF function implementation. sql/item_cmpfunc.cc: Fixed bug #31471. The Item_func_ifnull::fix_length_and_dec method has been modified to update the Item_func_ifnull::unsigned_flag field and to take this field into account when calculating the Item_func_ifnull::max_length value. (See Item_func_if::fix_length_and_dec for reference). mysql-test/t/null.test: Added test case for bug #31471. mysql-test/r/null.result: Added test case for bug #31471. mysql-test/r/create.result: Update test case after the bugfix of bug #31471.
c866f801