summaryrefslogtreecommitdiff
path: root/innobase/trx
diff options
context:
space:
mode:
authorunknown <kaa@polly.local>2004-12-14 22:26:31 +0300
committerunknown <kaa@polly.local>2004-12-14 22:26:31 +0300
commit526fbcbbc551495d1fed482fbfa9b4f7496a935c (patch)
tree039af5ac48ea9b322014c4c858874b5452e38d9d /innobase/trx
parent8d45c5f9d0ed290bb0bb880488b5ff1d5c2c7619 (diff)
downloadmariadb-git-526fbcbbc551495d1fed482fbfa9b4f7496a935c.tar.gz
Forward port of HugeTLB, InnoDB doublewrite and checksums patches to 5.0
BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'innobase/trx')
-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);
}