From f3bc2406b0258d128b4f8f0ae21640e80a518f18 Mon Sep 17 00:00:00 2001 From: Magne Mahre Date: Thu, 10 Dec 2009 10:32:23 +0100 Subject: [PATCH] Bug #46495 Crash in reload_acl_and_cache on SIGHUP An assert in reload_acl_and_cache didn't account for the case when the function is called with a NULL thd. A null thd is used whenever the function is called from the SIGHUP signal handler. Backported from 6.0-codebase (revid: 2617.69.35) --- sql/sql_parse.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 7ea5c81c52b..cafc70dc2ee 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -6568,7 +6568,7 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables, } #endif /*HAVE_QUERY_CACHE*/ - DBUG_ASSERT(thd->locked_tables_mode || !thd->mdl_context.has_locks()); + DBUG_ASSERT(!thd || thd->locked_tables_mode || !thd->mdl_context.has_locks()); /* Note that if REFRESH_READ_LOCK bit is set then REFRESH_TABLES is set too