summaryrefslogtreecommitdiff
path: root/myisam/mi_create.c
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-06-26 10:23:50 +0300
committerunknown <monty@hundin.mysql.fi>2001-06-26 10:23:50 +0300
commitf246b619153704f78ecc60361470f3f664fc6493 (patch)
treec0fdcacb616884cc66417017b1d2de4754d92d7f /myisam/mi_create.c
parent4d5dcac35ea0fc25632d17657b3f42af41bd2c7d (diff)
downloadmariadb-git-f246b619153704f78ecc60361470f3f664fc6493.tar.gz
Fixed length rows should not use row checksum in MyISAM tables
Fixed bug in handling of packed MyISAM keys myisam/mi_create.c: Fixed length rows should not use row checksum myisam/mi_search.c: Fixed bug in handling packed keys. myisam/mi_statrec.c: Fixed bug when using --checksum on fixed length rows
Diffstat (limited to 'myisam/mi_create.c')
-rw-r--r--myisam/mi_create.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/myisam/mi_create.c b/myisam/mi_create.c
index d95941e142a..d3e5e819742 100644
--- a/myisam/mi_create.c
+++ b/myisam/mi_create.c
@@ -164,6 +164,9 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
if (packed || (flags & HA_PACK_RECORD))
options|=HA_OPTION_PACK_RECORD; /* Must use packed records */
+ /* We can't use checksum with static length rows */
+ if (!(options & HA_OPTION_PACK_RECORD))
+ options&= ~HA_OPTION_CHECKSUM;
if (options & (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD))
min_pack_length+=varchar_count; /* Min length to pack */
else
@@ -445,7 +448,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
share.base.records=ci->max_rows;
share.base.reloc= ci->reloc_rows;
share.base.reclength=real_reclength;
- share.base.pack_reclength=reclength+ test(options & HA_OPTION_CHECKSUM);;
+ share.base.pack_reclength=reclength+ test(options & HA_OPTION_CHECKSUM);
share.base.max_pack_length=pack_reclength;
share.base.min_pack_length=min_pack_length;
share.base.pack_bits=packed;