1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-29463 mysqlimport occasionally fails to fail in main.mysqldump

don't invoke atexit handlers if other threads are still running,
OpenSSL doesn't like concurrent cleanup (and who does?)
This commit is contained in:
Sergei Golubchik
2022-10-06 00:45:47 +02:00
parent 648bedf0e5
commit 8e6a64194b

View File

@@ -570,15 +570,18 @@ static void safe_exit(int error, MYSQL *mysql)
if (mysql)
mysql_close(mysql);
if (error)
sf_leaking_memory= 1; /* dirty exit, some threads are still running */
else
if (counter)
{
mysql_library_end();
free_defaults(argv_to_free);
my_free(opt_password);
my_end(my_end_arg); /* clean exit */
/* dirty exit. some threads are running,
memory is not freed, openssl not deinitialized */
DBUG_ASSERT(error);
_exit(error);
}
mysql_library_end();
free_defaults(argv_to_free);
my_free(opt_password);
my_end(my_end_arg); /* clean exit */
exit(error);
}