summaryrefslogtreecommitdiff
path: root/storage/xtradb/os/os0file.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb/os/os0file.c')
-rw-r--r--storage/xtradb/os/os0file.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/storage/xtradb/os/os0file.c b/storage/xtradb/os/os0file.c
index 7d47203e992..5b8e656d8b2 100644
--- a/storage/xtradb/os/os0file.c
+++ b/storage/xtradb/os/os0file.c
@@ -142,6 +142,7 @@ struct os_aio_slot_struct{
// made and only the slot message
// needs to be passed to the caller
// of os_aio_simulated_handle */
+ ulint space_id;
fil_node_t* message1; /*!< message which is given by the */
void* message2; /*!< the requester of an aio operation
and which can be used to identify
@@ -3390,7 +3391,8 @@ os_aio_array_reserve_slot(
offset */
ulint offset_high, /*!< in: most significant 32 bits of
offset */
- ulint len) /*!< in: length of the block to read or write */
+ ulint len, /*!< in: length of the block to read or write */
+ ulint space_id)
{
os_aio_slot_t* slot;
ulint i;
@@ -3472,6 +3474,7 @@ found:
slot->offset_high = offset_high;
// slot->io_already_done = FALSE;
slot->status = OS_AIO_NOT_ISSUED;
+ slot->space_id = space_id;
#ifdef WIN_ASYNC_IO
control = &(slot->control);
@@ -3680,6 +3683,7 @@ os_aio(
(can be used to identify a completed
aio operation); ignored if mode is
OS_AIO_SYNC */
+ ulint space_id,
trx_t* trx)
{
os_aio_array_t* array;
@@ -3762,7 +3766,7 @@ try_again:
trx->io_read += n;
}
slot = os_aio_array_reserve_slot(type, array, message1, message2, file,
- name, buf, offset, offset_high, n);
+ name, buf, offset, offset_high, n, space_id);
if (type == OS_FILE_READ) {
if (os_aio_use_native_aio) {
#ifdef WIN_ASYNC_IO
@@ -3813,7 +3817,8 @@ try_again:
slot->pos,
&dummy_mess1,
&dummy_mess2,
- &dummy_type);
+ &dummy_type,
+ &space_id);
return(retval);
}
@@ -3872,7 +3877,8 @@ os_aio_windows_handle(
parameters are valid and can be used to
restart the operation, for example */
void** message2,
- ulint* type) /*!< out: OS_FILE_WRITE or ..._READ */
+ ulint* type, /*!< out: OS_FILE_WRITE or ..._READ */
+ ulint* space_id)
{
ulint orig_seg = segment;
os_aio_array_t* array;
@@ -3926,6 +3932,7 @@ os_aio_windows_handle(
*message2 = slot->message2;
*type = slot->type;
+ *space_id = slot->space_id;
if (ret && len == slot->len) {
ret_val = TRUE;
@@ -4009,7 +4016,8 @@ os_aio_simulated_handle(
parameters are valid and can be used to
restart the operation, for example */
void** message2,
- ulint* type) /*!< out: OS_FILE_WRITE or ..._READ */
+ ulint* type, /*!< out: OS_FILE_WRITE or ..._READ */
+ ulint* space_id)
{
os_aio_array_t* array;
ulint segment;
@@ -4300,6 +4308,7 @@ slot_io_done:
*message2 = slot->message2;
*type = slot->type;
+ *space_id = slot->space_id;
os_mutex_exit(array->mutex);