From d2c74eb98a0923b97e7bf0f9d99547c90e743a8c Mon Sep 17 00:00:00 2001 From: Mikael Ronstrom Date: Thu, 26 Feb 2009 00:58:28 +0100 Subject: [PATCH] Trying a workaround for the Windows crashes --- storage/innobase/srv/srv0start.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c index 16ad4325080..9fcee2d4d5a 100644 --- a/storage/innobase/srv/srv0start.c +++ b/storage/innobase/srv/srv0start.c @@ -1249,6 +1249,14 @@ innobase_start_or_create_for_mysql(void) return(DB_ERROR); } +#ifdef __WIN__ + /* + Need to hardcode this to 2 read and 2 write on Windows + while searching for problem causing this to crash when + higher number of threads are supported. + */ + srv_n_read_io_threads = srv_n_write_io_threads = 2; +#endif /* Restrict the maximum number of file i/o threads */ if ((srv_n_read_io_threads + srv_n_write_io_threads) > SRV_MAX_N_IO_THREADS) { fprintf(stderr, @@ -1267,7 +1275,7 @@ innobase_start_or_create_for_mysql(void) SRV_MAX_N_PENDING_SYNC_IOS); } else { /* Might need more slots here. Alas, I don't do windows. */ - n_threads = os_aio_init(8 * SRV_N_PENDING_IOS_PER_THREAD, + n_threads = os_aio_init(SRV_N_PENDING_IOS_PER_THREAD, srv_n_read_io_threads, srv_n_write_io_threads, SRV_MAX_N_PENDING_SYNC_IOS);