1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

To save 32KB memory per thread when --log-bin is not used, we do not

init the binlog_cache (THD::transaction.trans_log).
I have checked all places where trans_log is used, because as now
it may not be inited in some cases, we have to be cautious
(will forward this commit mail to Heikki).
This commit is contained in:
guilhem@mysql.com
2004-03-26 19:11:37 +01:00
parent 34aefdf31e
commit 90a5e244be
3 changed files with 17 additions and 12 deletions

View File

@@ -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,