diff options
author | unknown <heikki@donna.mysql.fi> | 2001-05-20 20:24:02 +0300 |
---|---|---|
committer | unknown <heikki@donna.mysql.fi> | 2001-05-20 20:24:02 +0300 |
commit | 23e19c904763e9456482f882ebefc10c59f433dc (patch) | |
tree | 42ebe5c140bed37ad7a6c605cb9bc1d27b6bf0d4 /innobase | |
parent | 55cbf7f9587eae2048c26b6f38144af1955ea6da (diff) | |
download | mariadb-git-23e19c904763e9456482f882ebefc10c59f433dc.tar.gz |
os0file.h InnoDB should now run with the same binary on Win95 and NT: checks OS version
srv0start.c InnoDB should now run with the same binary on Win95 and NT: checks OS version
innobase/srv/srv0start.c:
InnoDB should now run with the same binary on Win95 and NT: checks OS version
innobase/include/os0file.h:
InnoDB should now run with the same binary on Win95 and NT: checks OS version
Diffstat (limited to 'innobase')
-rw-r--r-- | innobase/include/os0file.h | 12 | ||||
-rw-r--r-- | innobase/srv/srv0start.c | 16 |
2 files changed, 23 insertions, 5 deletions
diff --git a/innobase/include/os0file.h b/innobase/include/os0file.h index 98e892f16b2..7ea90bb63e4 100644 --- a/innobase/include/os0file.h +++ b/innobase/include/os0file.h @@ -100,7 +100,17 @@ log. */ requests in a batch, and only after that wake the i/o-handler thread; this has effect only in simulated aio */ - +#define OS_WIN31 1 +#define OS_WIN95 2 +#define OS_WINNT 3 + +/*************************************************************************** +Gets the operating system version. Currently works only on Windows. */ + +ulint +os_get_os_version(void); +/*===================*/ + /* out: OS_WIN95, OS_WIN31, OS_WINNT (2000 == NT) */ /******************************************************************** Opens an existing file or creates a new. */ diff --git a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c index 6d0d0f45bd2..3136846c450 100644 --- a/innobase/srv/srv0start.c +++ b/innobase/srv/srv0start.c @@ -549,11 +549,19 @@ innobase_start_or_create_for_mysql(void) srv_n_file_io_threads = 4; #endif -#ifdef WIN_ASYNC_IO - /* On NT always use aio */ - os_aio_use_native_aio = TRUE; -#endif +#ifdef __WIN__ + if (os_get_os_version() == OS_WIN95 + || os_get_os_version() == OS_WIN31) { + /* On Win 95, 98, ME, and Win32 subsystem for Windows 3.1 use + simulated aio */ + os_aio_use_native_aio = FALSE; + srv_n_file_io_threads = 4; + } else { + /* On NT and Win 2000 always use aio */ + os_aio_use_native_aio = TRUE; + } +#endif if (!os_aio_use_native_aio) { os_aio_init(4 * SRV_N_PENDING_IOS_PER_THREAD * srv_n_file_io_threads, |