diff options
Diffstat (limited to 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index 4ea5bc0e9f5..0c95dbc4b31 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -346,7 +346,7 @@ int ha_commit_trans(THD *thd, THD_TRANS* trans) bool transaction_commited= 0; /* Update the binary log if we have cached some queries */ - if (trans == &thd->transaction.all && mysql_bin_log.is_open() && + if (trans == &thd->transaction.all && mysql_bin_log.is_open(1) && my_b_tell(&thd->transaction.trans_log)) { mysql_bin_log.write(thd, &thd->transaction.trans_log); @@ -385,7 +385,7 @@ int ha_commit_trans(THD *thd, THD_TRANS* trans) if (transaction_commited && thd->transaction.changed_tables) query_cache.invalidate(thd->transaction.changed_tables); #endif /*HAVE_QUERY_CACHE*/ - if (error && trans == &thd->transaction.all && mysql_bin_log.is_open()) + if (error && trans == &thd->transaction.all && mysql_bin_log.is_open(1)) sql_print_error("Error: Got error during commit; Binlog is not up to date!"); thd->variables.tx_isolation=thd->session_tx_isolation; if (operation_done) |