List:Commits« Previous MessageNext Message »
From:Magne Mahre Date:August 19 2009 1:16pm
Subject:bzr commit into mysql-5.4 branch (magne.mahre:2868) Bug#46495
View as plain text  
#At file:///data/z/mysql-next-bugfixing-46495/ based on revid:tor.didriksen@stripped

 2868 Magne Mahre	2009-08-19
      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.

    added:
      mysql-test/r/posix_misc.result
      mysql-test/t/posix_misc.test
    modified:
      sql/sql_parse.cc
=== added file 'mysql-test/r/posix_misc.result'
--- a/mysql-test/r/posix_misc.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/posix_misc.result	2009-08-19 13:14:50 +0000
@@ -0,0 +1,3 @@
+SELECT COUNT(*) AS col FROM DUAL WHERE 1=0;
+col
+0

=== added file 'mysql-test/t/posix_misc.test'
--- a/mysql-test/t/posix_misc.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/posix_misc.test	2009-08-19 13:14:50 +0000
@@ -0,0 +1,14 @@
+#
+# Tests that require POSIX signal handling capabilities
+#
+--source include/not_windows.inc
+
+#
+# Bug# 46495 - Crash in reload_acl_and_cache on SIGHUP
+#
+
+let $pidfile=`SELECT @@global.pid_file`;
+--exec kill -HUP `cat $pidfile`
+--sleep 2
+SELECT COUNT(*) AS col FROM DUAL WHERE 1=0;
+

=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	2009-08-18 09:38:19 +0000
+++ b/sql/sql_parse.cc	2009-08-19 13:14:50 +0000
@@ -6860,7 +6860,7 @@ bool reload_acl_and_cache(THD *thd, ulon
   }
 #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


Attachment: [text/bzr-bundle] bzr/magne.mahre@sun.com-20090819131450-4qyv08gfbjuf1p38.bundle
Thread
bzr commit into mysql-5.4 branch (magne.mahre:2868) Bug#46495Magne Mahre19 Aug