--- mysql-5.1.15-beta-20070124/storage/innobase/os/os0file.c Wed Jan 24 14:16:56 2007 +++ mysql-5.1.15-beta-20070124-directio/storage/innobase/os/os0file.c Sun Mar 4 13:27:19 2007 @@ -1356,6 +1356,14 @@ file = -1; #endif } else { +#ifdef DIRECTIO_ON + if (type != OS_LOG_FILE) { + if (directio(file, DIRECTIO_ON) == -1) { + fprintf(stderr, " InnoDB: Cannot enable direct I/O " + "for %s: %s\n", name, strerror(errno)); + } + } +#endif *success = TRUE; }