diff options
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 945414f532b..1b4c8bec416 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -169,7 +169,11 @@ THD::THD():user_time(0), current_statement(0), is_fatal_error(0), tablespace_op=FALSE; #ifdef USING_TRANSACTIONS bzero((char*) &transaction,sizeof(transaction)); - if (opt_using_transactions) + /* + Binlog is always open (if needed) before a THD is created (including + bootstrap). + */ + if (opt_using_transactions && mysql_bin_log.is_open()) { if (open_cached_file(&transaction.trans_log, mysql_tmpdir, LOG_PREFIX, binlog_cache_size, |