summaryrefslogtreecommitdiff
path: root/innobase/trx/trx0sys.c
diff options
context:
space:
mode:
authorjan@hundin.mysql.fi <>2004-12-21 07:49:38 +0200
committerjan@hundin.mysql.fi <>2004-12-21 07:49:38 +0200
commit198dc7a8ec6e220c348bb47e59a2ac7532be18b8 (patch)
tree5d3767a8558fd05da17b5d4e3f361ef643d3a9b8 /innobase/trx/trx0sys.c
parentc187798fcbdb055bc69ec727c81840a132481cbe (diff)
parent88b63ab6690bd453a1b841968b468759898cd94a (diff)
downloadmariadb-git-198dc7a8ec6e220c348bb47e59a2ac7532be18b8.tar.gz
Content merge.
Diffstat (limited to 'innobase/trx/trx0sys.c')
-rw-r--r--innobase/trx/trx0sys.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/innobase/trx/trx0sys.c b/innobase/trx/trx0sys.c
index 35e18064329..57166e98f45 100644
--- a/innobase/trx/trx0sys.c
+++ b/innobase/trx/trx0sys.c
@@ -125,6 +125,22 @@ trx_doublewrite_init(
}
/********************************************************************
+Frees the doublewrite buffer. */
+static
+void
+trx_doublewrite_free(void)
+/*======================*/
+{
+ mutex_free(&(trx_doublewrite->mutex));
+
+ mem_free(trx_doublewrite->buf_block_arr);
+ ut_free(trx_doublewrite->write_buf_unaligned);
+
+ mem_free(trx_doublewrite);
+ trx_doublewrite = NULL;
+}
+
+/********************************************************************
Marks the trx sys header when we have successfully upgraded to the >= 4.1.x
multiple tablespace format. */
@@ -512,6 +528,9 @@ trx_sys_doublewrite_init_or_restore_pages(
fil_flush_file_spaces(FIL_TABLESPACE);
+ if (!srv_use_doublewrite_buf)
+ trx_doublewrite_free();
+
leave_func:
ut_free(unaligned_read_buf);
}