summaryrefslogtreecommitdiff
path: root/mysys/checksum.c
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2010-11-25 18:17:28 +0100
committerSergei Golubchik <sergii@pisem.net>2010-11-25 18:17:28 +0100
commit65ca700def99289cc31a7040537f5aa6e12bf485 (patch)
tree97b3a07299b626c519da0e80c122b5b79b933914 /mysys/checksum.c
parent2ab57de38d13d927ddff2d51aed4af34e13998f5 (diff)
parent6e5bcca7935d3c62f84bb640e5357664a210ee12 (diff)
downloadmariadb-git-65ca700def99289cc31a7040537f5aa6e12bf485.tar.gz
merge.
checkpoint. does not compile.
Diffstat (limited to 'mysys/checksum.c')
-rw-r--r--mysys/checksum.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/mysys/checksum.c b/mysys/checksum.c
index a96ea31ea0e..b2579351134 100644
--- a/mysys/checksum.c
+++ b/mysys/checksum.c
@@ -18,6 +18,8 @@
#include <my_sys.h>
#include <zlib.h>
+ha_checksum my_crc_dbug_check= 1; /* Unlikely number */
+
/*
Calculate a long checksum for a memoryblock.
@@ -30,6 +32,9 @@
ha_checksum my_checksum(ha_checksum crc, const uchar *pos, size_t length)
{
- return (ha_checksum)crc32((uint)crc, pos, (uint)length);
+ crc= (ha_checksum) crc32((uint)crc, pos, (uint) length);
+ DBUG_PRINT("info", ("crc: %lu", (ulong) crc));
+ if (crc == my_crc_dbug_check)
+ my_debug_put_break_here();
+ return crc;
}
-