summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2005-09-27 08:24:19 -0700
committerunknown <igor@rurik.mysql.com>2005-09-27 08:24:19 -0700
commit6c2dad0dbefd231abec5b4f466e55f2438a9f098 (patch)
tree36fc0155c39713fa77bb48d76a1e32a29375e75a /innobase
parentd7e4e1a56173df249ec4c27a332c127752771628 (diff)
parentfe3e77d88a51f97de920ce7022fcb74852288022 (diff)
downloadmariadb-git-6c2dad0dbefd231abec5b4f466e55f2438a9f098.tar.gz
Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
Diffstat (limited to 'innobase')
-rw-r--r--innobase/buf/buf0flu.c4
-rw-r--r--innobase/include/trx0trx.h4
-rw-r--r--innobase/srv/srv0start.c2
-rw-r--r--innobase/trx/trx0sys.c19
-rw-r--r--innobase/trx/trx0trx.c4
5 files changed, 7 insertions, 26 deletions
diff --git a/innobase/buf/buf0flu.c b/innobase/buf/buf0flu.c
index ffb16790b2d..e39d1ae0a71 100644
--- a/innobase/buf/buf0flu.c
+++ b/innobase/buf/buf0flu.c
@@ -230,7 +230,7 @@ buf_flush_buffered_writes(void)
ulint len2;
ulint i;
- if (trx_doublewrite == NULL) {
+ if (!srv_use_doublewrite_buf || trx_doublewrite == NULL) {
os_aio_simulated_wake_handler_threads();
return;
@@ -503,7 +503,7 @@ buf_flush_write_block_low(
#endif
buf_flush_init_for_writing(block->frame, block->newest_modification,
block->space, block->offset);
- if (!trx_doublewrite) {
+ if (!srv_use_doublewrite_buf || !trx_doublewrite) {
fil_io(OS_FILE_WRITE | OS_AIO_SIMULATED_WAKE_LATER,
FALSE, block->space, block->offset, 0, UNIV_PAGE_SIZE,
(void*)block->frame, (void*)block);
diff --git a/innobase/include/trx0trx.h b/innobase/include/trx0trx.h
index 964491f747b..0dc82893ad1 100644
--- a/innobase/include/trx0trx.h
+++ b/innobase/include/trx0trx.h
@@ -61,8 +61,8 @@ Set detailed error message for the transaction. */
void
trx_set_detailed_error(
/*===================*/
- trx_t* trx, /* in: transaction struct */
- char* msg); /* in: detailed error message */
+ trx_t* trx, /* in: transaction struct */
+ const char* msg); /* in: detailed error message */
/*****************************************************************
Set detailed error message for the transaction from a file. Note that the
file is rewinded before reading from it. */
diff --git a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c
index 325b0a109cf..e5151ebf631 100644
--- a/innobase/srv/srv0start.c
+++ b/innobase/srv/srv0start.c
@@ -1540,7 +1540,7 @@ NetWare. */
#endif
sync_order_checks_on = TRUE;
- if (srv_use_doublewrite_buf && trx_doublewrite == NULL) {
+ if (trx_doublewrite == NULL) {
/* Create the doublewrite buffer to a new tablespace */
trx_sys_create_doublewrite_buf();
diff --git a/innobase/trx/trx0sys.c b/innobase/trx/trx0sys.c
index bf48c30e942..23f1dc40d00 100644
--- a/innobase/trx/trx0sys.c
+++ b/innobase/trx/trx0sys.c
@@ -126,22 +126,6 @@ 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. */
@@ -529,9 +513,6 @@ 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);
}
diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c
index 10b95179a73..090057f5d46 100644
--- a/innobase/trx/trx0trx.c
+++ b/innobase/trx/trx0trx.c
@@ -58,8 +58,8 @@ Set detailed error message for the transaction. */
void
trx_set_detailed_error(
/*===================*/
- trx_t* trx, /* in: transaction struct */
- char* msg) /* in: detailed error message */
+ trx_t* trx, /* in: transaction struct */
+ const char* msg) /* in: detailed error message */
{
ut_strlcpy(trx->detailed_error, msg, sizeof(trx->detailed_error));
}