1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

MDEV-375 Server crashes in THD::print_aborted_warning with log_warnings > 3

Don't use ER(xxx) in THD::close_connection(), when current_thd is already reset to NULL.
Prefer ER_THD() or ER_DEFAULT() instead.
This commit is contained in:
Sergei Golubchik
2012-07-31 18:32:46 +02:00
parent 9705ad5e33
commit 42ea25d4c5
3 changed files with 35 additions and 1 deletions

View File

@@ -3028,7 +3028,7 @@ public:
if (global_system_variables.log_warnings > threshold)
{
Security_context *sctx= &main_security_ctx;
sql_print_warning(ER(ER_NEW_ABORTING_CONNECTION),
sql_print_warning(ER_THD(this, ER_NEW_ABORTING_CONNECTION),
thread_id, (db ? db : "unconnected"),
sctx->user ? sctx->user : "unauthenticated",
sctx->host_or_ip, reason);