summaryrefslogtreecommitdiff
path: root/innobase/buf/buf0flu.c
diff options
context:
space:
mode:
authorunknown <heikki@donna.mysql.fi>2001-05-01 20:57:49 +0300
committerunknown <heikki@donna.mysql.fi>2001-05-01 20:57:49 +0300
commit32ccc96791115fd82b1fba23d3d48d7da5ea7f37 (patch)
treea6c3cc3b62ccbb655d4125773ee6e9afb02e0a9c /innobase/buf/buf0flu.c
parent9791282a50e8ebb8c52e3e4eb8d5f7223457716b (diff)
downloadmariadb-git-32ccc96791115fd82b1fba23d3d48d7da5ea7f37.tar.gz
log0recv.c Add checksum to written pages to check that they are also read in unchanged
buf0buf.h Add checksum to written pages to check that they are also read in unchanged buf0flu.c Add checksum to written pages to check that they are also read in unchanged buf0buf.c Add checksum to written pages to check that they are also read in unchanged innobase/buf/buf0buf.c: Add checksum to written pages to check that they are also read in unchanged innobase/buf/buf0flu.c: Add checksum to written pages to check that they are also read in unchanged innobase/include/buf0buf.h: Add checksum to written pages to check that they are also read in unchanged innobase/log/log0recv.c: Add checksum to written pages to check that they are also read in unchanged
Diffstat (limited to 'innobase/buf/buf0flu.c')
-rw-r--r--innobase/buf/buf0flu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/innobase/buf/buf0flu.c b/innobase/buf/buf0flu.c
index 443256cca34..90bdde1ebc6 100644
--- a/innobase/buf/buf0flu.c
+++ b/innobase/buf/buf0flu.c
@@ -222,6 +222,12 @@ buf_flush_write_block_low(
mach_write_to_8(block->frame + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN,
block->newest_modification);
+ /* We overwrite the first 4 bytes of the end lsn field to store
+ a page checksum */
+
+ mach_write_to_4(block->frame + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN,
+ buf_calc_page_checksum(block->frame));
+
fil_io(OS_FILE_WRITE | OS_AIO_SIMULATED_WAKE_LATER,
FALSE, block->space, block->offset, 0, UNIV_PAGE_SIZE,
(void*)block->frame, (void*)block);