summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index f86c0cf7461..cd685cb3437 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -114,11 +114,17 @@ THD::THD()
ull=0;
system_thread=0;
bzero((char*) &mem_root,sizeof(mem_root));
+#if defined(HAVE_BDB) || defined(HAVE_INNOBASE) || defined(HAVE_GEMENI)
+ if (open_cached_file(&transactions.trans_log,
+ mysql_tempdir,LOG_PREFIX,0,MYF(MY_WME)))
+ killed=1;
+ transaction.bdb_lock_count=0;
+#endif
+ transaction.bdb_tid=0;
+
#ifdef __WIN__
real_id = 0 ;
#endif
- transaction.bdb_lock_count=0;
- transaction.bdb_tid=0;
}
THD::~THD()
@@ -137,6 +143,9 @@ THD::~THD()
close_thread_tables(this);
}
close_temporary_tables(this);
+#if defined(HAVE_BDB) || defined(HAVE_INNOBASE) || defined(HAVE_GEMENI)
+ close_cached_file(transactions.trans_log);
+#endif
if (global_read_lock)
{
pthread_mutex_lock(&LOCK_open);