summaryrefslogtreecommitdiff
path: root/mysys/checksum.c
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2003-09-03 11:34:32 +0200
committerunknown <serg@serg.mylan>2003-09-03 11:34:32 +0200
commit4a21b30e47cfb2905ac1e6a3e9a220164067b595 (patch)
tree0dfea7caf86829a5356d14fbd291804272da2deb /mysys/checksum.c
parent710d4f140a3c0f292f964cc5acc93a9a96318f69 (diff)
downloadmariadb-git-4a21b30e47cfb2905ac1e6a3e9a220164067b595.tar.gz
CHECKSUM TABLE table1, table2, ... [ QUICK | EXTENDED ]
myisam/mi_checksum.c: workaround for zlib's crc32 glitch mysql-test/r/show_check.result: results updated mysys/checksum.c: switching to crc32 as a checksum algorithm
Diffstat (limited to 'mysys/checksum.c')
-rw-r--r--mysys/checksum.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mysys/checksum.c b/mysys/checksum.c
index 2ae139b81c3..664e768ef4e 100644
--- a/mysys/checksum.c
+++ b/mysys/checksum.c
@@ -30,9 +30,11 @@
ha_checksum my_checksum(ha_checksum crc, const byte *pos, uint length)
{
- const byte *end=pos+length;
+/* const byte *end=pos+length;
for ( ; pos != end ; pos++)
crc=((crc << 8) + *((uchar*) pos)) + (crc >> (8*sizeof(ha_checksum)-8));
return crc;
+*/
+ return (ha_checksum)crc32((uint)crc, (const uchar *)pos, length);
}