summaryrefslogtreecommitdiff
path: root/myisam/mi_check.c
diff options
context:
space:
mode:
authorunknown <ramil@mysql.com>2005-09-05 16:31:42 +0500
committerunknown <ramil@mysql.com>2005-09-05 16:31:42 +0500
commit943f8335f11c30b6188589e484ceacd1b1b786f8 (patch)
tree5f9ea51f99e9886c06f9dabb584f907504392950 /myisam/mi_check.c
parent9e796abb5bcd8215c07936cefd94813b011f2c2f (diff)
downloadmariadb-git-943f8335f11c30b6188589e484ceacd1b1b786f8.tar.gz
a fix (bug #4214: Table corruption with myisampack and large BLOB objects).
myisam/mi_check.c: a fix (bug #4214: Table corruption with myisampack and large BLOB objects). - pass version to the save_pack_length(). myisam/mi_packrec.c: a fix (bug #4214: Table corruption with myisampack and large BLOB objects). - code cleanup: read_pack_length() and calc_pack_length() introduced, save_pack_length() modified: now the behavior depends on packing version - save packing version in the share->pack.version - pass it to the read_pack_length() myisam/mi_static.c: a fix (bug #4214: Table corruption with myisampack and large BLOB objects). - packing version set to 2 myisam/myisamdef.h: a fix (bug #4214: Table corruption with myisampack and large BLOB objects). - packing version slot introduced (see MI_PACK) myisam/myisampack.c: a fix (bug #4214: Table corruption with myisampack and large BLOB objects). - code cleanup - pass version to the calc_pack_length() and save_pack_length()
Diffstat (limited to 'myisam/mi_check.c')
-rw-r--r--myisam/mi_check.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c
index 60a2b664c70..711331518a7 100644
--- a/myisam/mi_check.c
+++ b/myisam/mi_check.c
@@ -3189,9 +3189,11 @@ int sort_write_record(MI_SORT_PARAM *sort_param)
break;
case COMPRESSED_RECORD:
reclength=info->packed_length;
- length=save_pack_length(block_buff,reclength);
+ length= save_pack_length((uint) share->pack.version, block_buff,
+ reclength);
if (info->s->base.blobs)
- length+=save_pack_length(block_buff+length,info->blob_length);
+ length+= save_pack_length((uint) share->pack.version,
+ block_buff + length, info->blob_length);
if (my_b_write(&info->rec_cache,block_buff,length) ||
my_b_write(&info->rec_cache,(byte*) sort_param->rec_buff,reclength))
{