@@ -1598,7 +1598,7 @@ UNIV_INTERN
1598
1598
void
1599
1599
os_file_set_nocache (
1600
1600
/* ================*/
1601
- int fd /* !< in: file descriptor to alter */
1601
+ os_file_t fd /* !< in: file descriptor to alter */
1602
1602
__attribute__ ((unused)),
1603
1603
const char* file_name /* !< in: used in the diagnostic
1604
1604
message */
@@ -5041,53 +5041,25 @@ os_aio_windows_handle(
5041
5041
}
5042
5042
5043
5043
if (retry) {
5044
- /* retry failed read/write operation synchronously.
5045
- No need to hold array->mutex. */
5046
-
5047
- #ifdef UNIV_PFS_IO
5048
- /* This read/write does not go through os_file_read
5049
- and os_file_write APIs, need to register with
5050
- performance schema explicitly here. */
5051
- struct PSI_file_locker * locker = NULL ;
5052
- register_pfs_file_io_begin (locker, slot->file , slot->len ,
5053
- (slot->type == OS_FILE_WRITE)
5054
- ? PSI_FILE_WRITE
5055
- : PSI_FILE_READ,
5056
- __FILE__, __LINE__);
5057
- #endif
5044
+ LARGE_INTEGER li;
5045
+ li.LowPart = slot->control .Offset ;
5046
+ li.HighPart = slot->control .OffsetHigh ;
5058
5047
5059
5048
ut_a ((slot->len & 0xFFFFFFFFUL ) == slot->len );
5060
5049
5061
5050
switch (slot->type ) {
5062
5051
case OS_FILE_WRITE:
5063
5052
ret_val = os_file_write (slot->name , slot->file , slot->buf ,
5064
- slot-> control . Offset , slot-> control . OffsetHigh , slot->len );
5053
+ li. QuadPart , slot->len );
5065
5054
break ;
5066
5055
case OS_FILE_READ:
5067
5056
ret_val = os_file_read (slot->file , slot->buf ,
5068
- slot-> control . Offset , slot-> control . OffsetHigh , slot->len );
5057
+ li. QuadPart , slot->len );
5069
5058
break ;
5070
5059
default :
5071
5060
ut_error;
5072
5061
}
5073
5062
5074
- #ifdef UNIV_PFS_IO
5075
- register_pfs_file_io_end (locker, len);
5076
- #endif
5077
-
5078
- if (!ret && GetLastError () == ERROR_IO_PENDING) {
5079
- /* aio was queued successfully!
5080
- We want a synchronous i/o operation on a
5081
- file where we also use async i/o: in Windows
5082
- we must use the same wait mechanism as for
5083
- async i/o */
5084
-
5085
- ret = GetOverlappedResult (slot->file ,
5086
- &(slot->control ),
5087
- &len, TRUE );
5088
- }
5089
-
5090
- ret_val = ret && len == slot->len ;
5091
5063
}
5092
5064
5093
5065
os_aio_array_free_slot ((os_aio_array_t *)slot->arr , slot);
0 commit comments