summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorLuis Soares <luis.soares@sun.com>2010-07-01 17:03:40 +0100
committerLuis Soares <luis.soares@sun.com>2010-07-01 17:03:40 +0100
commite5142047589835a8eb9587656f5ff40d8389c487 (patch)
treefa95fa11d8c28ca4b493855da4f108ea7d565e4d /sql
parentcd65555912e37574356bffb0678fbda466a8fb3a (diff)
downloadmariadb-git-e5142047589835a8eb9587656f5ff40d8389c487.tar.gz
BUG#54925: Assertion `query_arg && mysql_bin_log.is_open()' on
DROP TEMP TABLE Cset: alfranio.correia@sun.com-20100420091043-4i6ouzozb34hvzhb introduced a change that made drop temporary table to be always logged if current statement log format was set to row. This is fine. However, logging operations, for a "DROP TABLE" statement in mysql_rm_table_part2, are not protected by first checking if the mysql_bin_log is open before proceeding to the actual logging. They only check the dont_log_query variable. This was actually uncovered by the aforementioned cset and not introduced by it. We fix this by extending the condition used in the "if" that wraps logging operations in mysql_rm_table_part2.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_table.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index b3213638c4d..cd400b47db1 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -2202,7 +2202,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
if (some_tables_deleted || tmp_table_deleted || !error)
{
query_cache_invalidate3(thd, tables, 0);
- if (!dont_log_query)
+ if (!dont_log_query && mysql_bin_log.is_open())
{
if (!thd->is_current_stmt_binlog_format_row() ||
(non_temp_tables_count > 0 && !tmp_table_deleted))