-
Alexander Barkov authored
Item_func_coalesce::fix_length_and_dec() calls Item_func::count_string_result_length()) which called agg_arg_charsets() with wrong flags, so the collation derivation of the COALESCE result was not properly set to DERIVATION_COERCIBLE. It erroneously stayed DERIVATION_NUMERIC. So GREATEST() misinterpreted the argument as a number rather that a string and did not calculate its own length properly.
d87bc55b