summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagne Mahre <magne.mahre@sun.com>2009-12-10 10:32:23 +0100
committerMagne Mahre <magne.mahre@sun.com>2009-12-10 10:32:23 +0100
commitf3bc2406b0258d128b4f8f0ae21640e80a518f18 (patch)
tree167b79dccdf29c52e2b762ecfbeea37c6e0a571b
parentf12936728885621bad57e0c21e2c0b35447742d2 (diff)
downloadmariadb-git-f3bc2406b0258d128b4f8f0ae21640e80a518f18.tar.gz
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)
-rw-r--r--sql/sql_parse.cc2
1 files changed, 1 insertions, 1 deletions
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