• Alexey Botchkov's avatar
    Backport fix for MDEV-29352 to 10.3-10.5 · f5e4e154
    Alexey Botchkov authored
    The fix for MDEV-29352 was pushed to 10.6+ but the code causing the
    bug is old and the bug is unlikely to be a recent regression in 10.6.
    So, we apply the fix also to older versions, 10.3-10.5.
    
    The original commit message:
    
    MDEV-29352 SIGSEGV's in strlen and unknown location on optimized builds at SHUTDOWN
    
    When the UDF creation frails to write the newly created UDF into
    the related system table, the UDF is still created in memory.
    
    However, as it is now, the related DLL is unloaded in this case right
    in the mysql_create_function. And failure happens when the UDF handle
    is freed and tries to unload the respective DLL which is still unloaded.
    f5e4e154
sql_udf.cc 19.4 KB