summaryrefslogtreecommitdiff
path: root/innobase/os
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2002-07-19 17:09:40 +0300
committerunknown <heikki@hundin.mysql.fi>2002-07-19 17:09:40 +0300
commitdda85ba004d099adfcdf794e02db4467f3662409 (patch)
tree53c8a1a58135a1e1ae0a856a814ecd8b91da99de /innobase/os
parentd0b58e312976c50c0b6859a2a657f4a9f79ee5e7 (diff)
downloadmariadb-git-dda85ba004d099adfcdf794e02db4467f3662409.tar.gz
os0file.c:
Fix a bug in the previous commit change and align also the buffer in simulataled aio for possible use in i/o to raw devices innobase/os/os0file.c: Fix a bug in the previous commit change and align also the buffer in simulataled aio for possible use in i/o to raw devices
Diffstat (limited to 'innobase/os')
-rw-r--r--innobase/os/os0file.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c
index 94908ae9ade..4a1bbfa9874 100644
--- a/innobase/os/os0file.c
+++ b/innobase/os/os0file.c
@@ -723,7 +723,7 @@ os_file_set_size(
(ulint)(offset >> 32),
n_bytes);
if (!ret) {
- ut_free(buf);
+ ut_free(buf2);
goto error_handling;
}
offset += n_bytes;
@@ -2104,6 +2104,7 @@ os_aio_simulated_handle(
ulint offs;
ulint lowest_offset;
byte* combined_buf;
+ byte* combined_buf2;
ibool ret;
ulint n;
ulint i;
@@ -2226,9 +2227,11 @@ consecutive_loop:
/* We can use the buffer of the i/o request */
combined_buf = slot->buf;
} else {
- combined_buf = ut_malloc(total_len);
+ combined_buf2 = ut_malloc(total_len + UNIV_PAGE_SIZE);
- ut_a(combined_buf);
+ ut_a(combined_buf2);
+
+ combined_buf = ut_align(combined_buf2, UNIV_PAGE_SIZE);
}
/* We release the array mutex for the time of the i/o: NOTE that
@@ -2287,7 +2290,7 @@ consecutive_loop:
}
if (n_consecutive > 1) {
- ut_free(combined_buf);
+ ut_free(combined_buf2);
}
os_mutex_enter(array->mutex);