Commit f26d163f authored by heikki@donna.mysql.fi's avatar heikki@donna.mysql.fi

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
parent b1319638
...@@ -100,7 +100,17 @@ log. */ ...@@ -100,7 +100,17 @@ log. */
requests in a batch, and only after that requests in a batch, and only after that
wake the i/o-handler thread; this has wake the i/o-handler thread; this has
effect only in simulated aio */ 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. */ Opens an existing file or creates a new. */
......
...@@ -549,11 +549,19 @@ innobase_start_or_create_for_mysql(void) ...@@ -549,11 +549,19 @@ innobase_start_or_create_for_mysql(void)
srv_n_file_io_threads = 4; srv_n_file_io_threads = 4;
#endif #endif
#ifdef WIN_ASYNC_IO #ifdef __WIN__
/* On NT always use aio */ if (os_get_os_version() == OS_WIN95
os_aio_use_native_aio = TRUE; || os_get_os_version() == OS_WIN31) {
#endif /* 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) { if (!os_aio_use_native_aio) {
os_aio_init(4 * SRV_N_PENDING_IOS_PER_THREAD os_aio_init(4 * SRV_N_PENDING_IOS_PER_THREAD
* srv_n_file_io_threads, * srv_n_file_io_threads,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment