summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2002-09-11 16:07:52 +0300
committerunknown <heikki@hundin.mysql.fi>2002-09-11 16:07:52 +0300
commit686a758f6561debaed0bdbd1fb395dd6937b4d93 (patch)
treec1428b35a79c4ccfab78c451b3c17860956d3224 /innobase
parent6a06c4c534ac68f9d0469f31c869fe1d20b1e463 (diff)
downloadmariadb-git-686a758f6561debaed0bdbd1fb395dd6937b4d93.tar.gz
srv0srv.c, srv0srv.h:
Change srv_flush_log_at_trx_commit to ulint, note that ibool is defined as ulint, so this is purely formal change os0file.c: Start using unbuffered i/o again in Windows because sequential read using normal i/o was 4 times slower in XP innobase/os/os0file.c: Start using unbuffered i/o again in Windows because sequential read using normal i/o was 4 times slower in XP innobase/include/srv0srv.h: Change srv_flush_log_at_trx_commit to ulint, note that ibool is defined as ulint, so this is purely formal change innobase/srv/srv0srv.c: Change srv_flush_log_at_trx_commit to ulint, note that ibool is defined as ulint, so this is purely formal change
Diffstat (limited to 'innobase')
-rw-r--r--innobase/include/srv0srv.h2
-rw-r--r--innobase/os/os0file.c21
-rw-r--r--innobase/srv/srv0srv.c2
3 files changed, 17 insertions, 8 deletions
diff --git a/innobase/include/srv0srv.h b/innobase/include/srv0srv.h
index 1f76974b03d..f457d52dec7 100644
--- a/innobase/include/srv0srv.h
+++ b/innobase/include/srv0srv.h
@@ -53,7 +53,7 @@ extern ulint srv_n_log_files;
extern ulint srv_log_file_size;
extern ibool srv_log_archive_on;
extern ulint srv_log_buffer_size;
-extern ibool srv_flush_log_at_trx_commit;
+extern ulint srv_flush_log_at_trx_commit;
extern byte srv_latin1_ordering[256];/* The sort order table of the latin1
character set */
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c
index 2a17c554dc1..b2881581fc7 100644
--- a/innobase/os/os0file.c
+++ b/innobase/os/os0file.c
@@ -15,8 +15,6 @@ Created 10/21/1995 Heikki Tuuri
#undef HAVE_FDATASYNC
-#undef UNIV_NON_BUFFERED_IO
-
#ifdef POSIX_ASYNC_IO
/* We assume in this case that the OS has standard Posix aio (at least SunOS
2.6, HP-UX 11i and AIX 4.3 have) */
@@ -500,14 +498,25 @@ try_again:
}
#endif
#ifdef UNIV_NON_BUFFERED_IO
- attributes = attributes | FILE_FLAG_NO_BUFFERING;
+ if (type == OS_LOG_FILE && srv_flush_log_at_trx_commit == 2) {
+ /* Do not use unbuffered i/o to log files because
+ value 2 denotes that we do not flush the log at every
+ commit, but only once per second */
+ } else {
+ attributes = attributes | FILE_FLAG_NO_BUFFERING;
+ }
#endif
} else if (purpose == OS_FILE_NORMAL) {
- attributes = 0
+ attributes = 0;
#ifdef UNIV_NON_BUFFERED_IO
- | FILE_FLAG_NO_BUFFERING
+ if (type == OS_LOG_FILE && srv_flush_log_at_trx_commit == 2) {
+ /* Do not use unbuffered i/o to log files because
+ value 2 denotes that we do not flush the log at every
+ commit, but only once per second */
+ } else {
+ attributes = attributes | FILE_FLAG_NO_BUFFERING;
+ }
#endif
- ;
} else {
attributes = 0;
ut_error;
diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c
index 7b5aa79b3c7..84d48bebf97 100644
--- a/innobase/srv/srv0srv.c
+++ b/innobase/srv/srv0srv.c
@@ -96,7 +96,7 @@ ulint srv_n_log_files = ULINT_MAX;
ulint srv_log_file_size = ULINT_MAX; /* size in database pages */
ibool srv_log_archive_on = TRUE;
ulint srv_log_buffer_size = ULINT_MAX; /* size in database pages */
-ibool srv_flush_log_at_trx_commit = TRUE;
+ulint srv_flush_log_at_trx_commit = 1;
byte srv_latin1_ordering[256] /* The sort order table of the latin1
character set. The following table is