summaryrefslogtreecommitdiff
path: root/innobase/trx
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2005-07-26 14:03:34 +0300
committerunknown <marko@hundin.mysql.fi>2005-07-26 14:03:34 +0300
commitaee8de3527f8f14262c2c3151659f9aef77d1cf6 (patch)
tree09a5b48dce49e89f224152a39b4b3fc2ec087521 /innobase/trx
parent6bac3d43097314a1afc639f472401d13de8121e7 (diff)
downloadmariadb-git-aee8de3527f8f14262c2c3151659f9aef77d1cf6.tar.gz
InnoDB: Do not flush after each write, not even when creating the
data files. Previously, writes were flushed until the doublewrite buffer was created. That would be too slow on systems where os_file_flush() [or fsync(2)] is slow. (Bug #12125) innobase/include/os0file.h: Disable os_do_not_call_flush_at_each_write unless #ifdef UNIV_DO_FLUSH innobase/os/os0file.c: Disable os_do_not_call_flush_at_each_write unless #ifdef UNIV_DO_FLUSH innobase/trx/trx0sys.c: Disable os_do_not_call_flush_at_each_write unless #ifdef UNIV_DO_FLUSH
Diffstat (limited to 'innobase/trx')
-rw-r--r--innobase/trx/trx0sys.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/innobase/trx/trx0sys.c b/innobase/trx/trx0sys.c
index 51e193d563b..c7292fb7650 100644
--- a/innobase/trx/trx0sys.c
+++ b/innobase/trx/trx0sys.c
@@ -97,8 +97,9 @@ trx_doublewrite_init(
/* Since we now start to use the doublewrite buffer, no need to call
fsync() after every write to a data file */
-
+#ifdef UNIV_DO_FLUSH
os_do_not_call_flush_at_each_write = TRUE;
+#endif /* UNIV_DO_FLUSH */
mutex_create(&(trx_doublewrite->mutex));
mutex_set_level(&(trx_doublewrite->mutex), SYNC_DOUBLEWRITE);