diff options
Diffstat (limited to 'mysys/checksum.c')
-rw-r--r-- | mysys/checksum.c | 9 |
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; } - |