diff options
author | unknown <marko@hundin.mysql.fi> | 2005-07-26 14:03:34 +0300 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2005-07-26 14:03:34 +0300 |
commit | aee8de3527f8f14262c2c3151659f9aef77d1cf6 (patch) | |
tree | 09a5b48dce49e89f224152a39b4b3fc2ec087521 /innobase/trx | |
parent | 6bac3d43097314a1afc639f472401d13de8121e7 (diff) | |
download | mariadb-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.c | 3 |
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); |