From: Date: August 24 2005 9:44pm Subject: bk commit into 5.0 tree (dlenev:1.1918) BUG#12280 List-Archive: http://lists.mysql.com/internals/28777 X-Bug: 12280 Message-Id: <20050824194451.7D70222F0FD@brandersnatch.localdomain> Below is the list of changes that have just been committed into a local 5.0 repository of dlenev. When dlenev does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.1918 05/08/24 23:44:42 dlenev@stripped +1 -0 Correction of fix for bug #12280 "Triggers: crash if flush tables". We should not assume that "thd" argument of reload_acl_and_cache() is non-zero. Failure to do so will cause server to crash when one sends SIGHUP to it. sql/sql_parse.cc 1.474 05/08/24 23:44:33 dlenev@stripped +2 -2 reload_acl_and_cache(): When we call this function from SIGHUP handler we pass 0 as "thd" argument to it. So we should not assume that thd is non-zero in it. # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: dlenev # Host: brandersnatch.localdomain # Root: /home/dlenev/src/mysql-5.0.12 --- 1.473/sql/sql_parse.cc 2005-08-24 03:43:16 +04:00 +++ 1.474/sql/sql_parse.cc 2005-08-24 23:44:33 +04:00 @@ -6517,7 +6517,7 @@ SYNOPSIS reload_acl_and_cache() - thd Thread handler + thd Thread handler (can be NULL!) options What should be reset/reloaded (tables, privileges, slave...) tables Tables to flush (if any) @@ -6539,7 +6539,7 @@ select_errors=0; /* Write if more errors */ bool tmp_write_to_binlog= 1; - if (thd->in_sub_stmt) + if (thd && thd->in_sub_stmt) { my_error(ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0), "FLUSH"); return 1;