From 8cde9162460cc2c3a7eddb972c6aa766f89d4965 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Sun, 12 Jun 2011 16:44:41 +0200 Subject: fix mismerge --- storage/xtradb/os/os0file.c | 27 +++++++++++---------------- storage/xtradb/srv/srv0start.c | 4 +--- 2 files changed, 12 insertions(+), 19 deletions(-) (limited to 'storage/xtradb') diff --git a/storage/xtradb/os/os0file.c b/storage/xtradb/os/os0file.c index f0547f2e243..edf4e5d2744 100644 --- a/storage/xtradb/os/os0file.c +++ b/storage/xtradb/os/os0file.c @@ -2445,8 +2445,7 @@ _os_file_read( DWORD len; ibool retry; OVERLAPPED overlapped; - overlapped.Offset = (DWORD)offset; - overlapped.OffsetHigh = (DWORD)offset_high; + /* On 64-bit Windows, ulint is 64 bits. But offset and n should be no more than 32 bits. */ @@ -2466,8 +2465,8 @@ try_again: os_mutex_exit(os_file_count_mutex); memset (&overlapped, 0, sizeof (overlapped)); - overlapped.Offset = low; - overlapped.OffsetHigh = high; + overlapped.Offset = (DWORD)offset; + overlapped.OffsetHigh = (DWORD)offset_high; overlapped.hEvent = win_get_syncio_event(); ret = ReadFile(file, buf, n, NULL, &overlapped); if (ret) { @@ -2475,7 +2474,7 @@ try_again: } else if(GetLastError() == ERROR_IO_PENDING) { ret = GetOverlappedResult(file, &overlapped, (DWORD *)&len, TRUE); - + } os_mutex_enter(os_file_count_mutex); os_n_pending_reads--; os_mutex_exit(os_file_count_mutex); @@ -2568,8 +2567,8 @@ try_again: os_mutex_exit(os_file_count_mutex); memset (&overlapped, 0, sizeof (overlapped)); - overlapped.Offset = low; - overlapped.OffsetHigh = high; + overlapped.Offset = (DWORD)offset; + overlapped.OffsetHigh = (DWORD)offset_high; overlapped.hEvent = win_get_syncio_event(); ret = ReadFile(file, buf, n, NULL, &overlapped); if (ret) { @@ -2577,7 +2576,7 @@ try_again: } else if(GetLastError() == ERROR_IO_PENDING) { ret = GetOverlappedResult(file, &overlapped, (DWORD *)&len, TRUE); - + } os_mutex_enter(os_file_count_mutex); os_n_pending_reads--; os_mutex_exit(os_file_count_mutex); @@ -2654,8 +2653,6 @@ os_file_write( ulint n_retries = 0; ulint err; OVERLAPPED overlapped; - overlapped.Offset = (DWORD)offset; - overlapped.OffsetHigh = (DWORD)offset_high; /* On 64-bit Windows, ulint is 64 bits. But offset and n should be no more than 32 bits. */ @@ -2674,12 +2671,14 @@ retry: os_mutex_exit(os_file_count_mutex); memset (&overlapped, 0, sizeof (overlapped)); - overlapped.Offset = low; - overlapped.OffsetHigh = high; + overlapped.Offset = (DWORD)offset; + overlapped.OffsetHigh = (DWORD)offset_high; + overlapped.hEvent = win_get_syncio_event(); ret = WriteFile(file, buf, n, NULL, &overlapped); if (ret) { ret = GetOverlappedResult(file, &overlapped, (DWORD *)&len, FALSE); + } else if(GetLastError() == ERROR_IO_PENDING) { ret = GetOverlappedResult(file, &overlapped, (DWORD *)&len, TRUE); } @@ -3831,10 +3830,6 @@ os_aio_windows_handle( BOOL retry = FALSE; ULONG_PTR dummy_key; - if (srv_shutdown_state == SRV_SHUTDOWN_EXIT_THREADS) { - os_thread_exit(NULL); - - ret = GetQueuedCompletionStatus(completion_port, &len, &dummy_key, (OVERLAPPED **)&slot, INFINITE); diff --git a/storage/xtradb/srv/srv0start.c b/storage/xtradb/srv/srv0start.c index e235bab3e02..bb1beb06ef5 100644 --- a/storage/xtradb/srv/srv0start.c +++ b/storage/xtradb/srv/srv0start.c @@ -1284,10 +1284,8 @@ innobase_start_or_create_for_mysql(void) default: os_aio_use_native_aio = TRUE; srv_use_native_conditions = TRUE; - default: - /* On Win 2000 and XP use async i/o */ - os_aio_use_native_aio = TRUE; } +#endif if (srv_file_flush_method_str == NULL) { /* These are the default options */ -- cgit v1.2.1