summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2003-10-19 20:28:03 +0300
committerunknown <heikki@hundin.mysql.fi>2003-10-19 20:28:03 +0300
commit931d4fccc0e1dc2a2c0882f54dbd1f2bcea885ef (patch)
tree369a2d0b7d8f87328131ff8cd27c03f92031ce46 /innobase
parent14affe7e2fa5287aa205353e80615d089861a104 (diff)
downloadmariadb-git-931d4fccc0e1dc2a2c0882f54dbd1f2bcea885ef.tar.gz
os0file.c:
Check that writes to data files always happen in to addresses divisible by 16 kB, and the chunk size is also divisible by 16 kB; a user reported 2 corrupt pages from Linux-2.4.20 where an index page seemed displaced innobase/os/os0file.c: Check that writes to data files always happen in to addresses divisible by 16 kB, and the chunk size is also divisible by 16 kB; a user reported 2 corrupt pages from Linux-2.4.20 where an index page seemed displaced
Diffstat (limited to 'innobase')
-rw-r--r--innobase/os/os0file.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c
index 311937f2145..24bc0f1bdf9 100644
--- a/innobase/os/os0file.c
+++ b/innobase/os/os0file.c
@@ -2676,7 +2676,11 @@ consecutive_loop:
/* Do the i/o with ordinary, synchronous i/o functions: */
if (slot->type == OS_FILE_WRITE) {
if (array == os_aio_write_array) {
-
+ if ((total_len % UNIV_PAGE_SIZE != 0)
+ || (slot->offset % UNIV_PAGE_SIZE != 0)) {
+ ut_a(0);
+ }
+
/* Do a 'last millisecond' check that the page end
is sensible; reported page checksum errors from
Linux seem to wipe over the page end */