summaryrefslogtreecommitdiff
path: root/innobase/os
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2002-09-17 05:17:32 +0300
committermonty@mashka.mysql.fi <>2002-09-17 05:17:32 +0300
commit3bb2660d1047f33988ae9703dd8172d059037fdc (patch)
tree6684292d18658097f30b2ff7eadd9af7357a4e51 /innobase/os
parentc7b6854f704f4bd536a5ba4ecd76d1a5543ada9b (diff)
parentff993695a43914561488f71f3819bdf81d4df97a (diff)
downloadmariadb-git-3bb2660d1047f33988ae9703dd8172d059037fdc.tar.gz
Merge with 3.23.53
Diffstat (limited to 'innobase/os')
-rw-r--r--innobase/os/os0file.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c
index 6f122f38107..1da66fdc512 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;