• Sergei Petrunia's avatar
    MDEV-29152: Assertion failed ... upon TO_CHAR with wrong argument · feaeb27b
    Sergei Petrunia authored
    Item_func_tochar::check_arguments() didn't check if its arguments
    each had one column. Failing to make this check and proceeding would
    eventually cause either an assertion failure or the execution would
    reach "MY_ASSERT_UNREACHABLE();" which would produce a crash with
    a misleading stack trace.
    
    * Fixed Item_func_tochar::check_arguments() to do the required check.
    
    * Also fixed MY_ASSERT_UNREACHABLE() to terminate the program. Just
    "executing" __builtin_unreachable() used to cause "undefined results",
    which in my experience was a crash with corrupted stack trace.
    feaeb27b
func_to_char.result 19.6 KB