summaryrefslogtreecommitdiff
path: root/innobase/buf/buf0flu.c
diff options
context:
space:
mode:
authorheikki@donna.mysql.fi <>2001-05-01 20:57:49 +0300
committerheikki@donna.mysql.fi <>2001-05-01 20:57:49 +0300
commit8dba7dc06ae965a74d4db8e18d2ce23134bb2c8f (patch)
treea6c3cc3b62ccbb655d4125773ee6e9afb02e0a9c /innobase/buf/buf0flu.c
parent03cb1ccef58a3047ed61c93ba204b244d1e0ea64 (diff)
downloadmariadb-git-8dba7dc06ae965a74d4db8e18d2ce23134bb2c8f.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
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);