MDEV-8630 Datetime value dropped in "INSERT ... SELECT ... ON DUPLICATE KEY"
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.
Showing
Please register or sign in to comment