summaryrefslogtreecommitdiff
path: root/mysys/checksum.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/checksum.c')
-rw-r--r--mysys/checksum.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mysys/checksum.c b/mysys/checksum.c
index a948785d935..40f2ace680d 100644
--- a/mysys/checksum.c
+++ b/mysys/checksum.c
@@ -30,7 +30,13 @@
ha_checksum my_checksum(ha_checksum crc, const uchar *pos, size_t length)
{
+#ifdef HAVE_CRC32_VPMSUM
+ extern unsigned int crc32ieee_vpmsum(unsigned int crc, const unsigned char *p,
+ unsigned long len);
+ crc= (ha_checksum) crc32ieee_vpmsum((uint) crc, pos, (uint) length);
+#else
crc= (ha_checksum) crc32((uint)crc, pos, (uint) length);
+#endif
DBUG_PRINT("info", ("crc: %lu", (ulong) crc));
return crc;
}