diff options
author | serg@sergbook.mysql.com <> | 2002-07-26 14:42:51 +0200 |
---|---|---|
committer | serg@sergbook.mysql.com <> | 2002-07-26 14:42:51 +0200 |
commit | 43ef1198e9d21b5f98380528209aa23a500810c0 (patch) | |
tree | 0ec06db644f83dcda914d46e0e1ecad40ea13ab4 /myisam/mi_dynrec.c | |
parent | 5d978447b237da19f4be21eaab31da1572792536 (diff) | |
download | mariadb-git-43ef1198e9d21b5f98380528209aa23a500810c0.tar.gz |
MyISAM: always store alloced_rec_buff_length with the buffer itself
Diffstat (limited to 'myisam/mi_dynrec.c')
-rw-r--r-- | myisam/mi_dynrec.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/myisam/mi_dynrec.c b/myisam/mi_dynrec.c index 4ef4f80d137..8a9ca8aab34 100644 --- a/myisam/mi_dynrec.c +++ b/myisam/mi_dynrec.c @@ -1060,8 +1060,7 @@ int _mi_read_dynamic_record(MI_INFO *info, my_off_t filepos, byte *buf) if (info->s->base.blobs) { if (!(to=mi_alloc_rec_buff(info, block_info.rec_len, - &info->rec_buff, - &info->alloced_rec_buff_length))) + &info->rec_buff))) goto err; } else @@ -1107,12 +1106,8 @@ int _mi_cmp_dynamic_unique(MI_INFO *info, MI_UNIQUEDEF *def, /* Don't let the compare destroy blobs that may be in use */ rec_buff=info->rec_buff; - alloced_rec_buff_length=info->alloced_rec_buff_length; if (info->s->base.blobs) - { info->rec_buff=0; - info->alloced_rec_buff_length=0; - } error=_mi_read_dynamic_record(info,pos,old_record); if (!error) error=mi_unique_comp(def, record, old_record, def->null_are_equal); @@ -1120,7 +1115,6 @@ int _mi_cmp_dynamic_unique(MI_INFO *info, MI_UNIQUEDEF *def, { my_free(mi_get_rec_buff_ptr(info, info->rec_buff), MYF(MY_ALLOW_ZERO_PTR)); info->rec_buff=rec_buff; - info->alloced_rec_buff_length=alloced_rec_buff_length; } my_afree(old_record); DBUG_RETURN(error); @@ -1331,8 +1325,7 @@ int _mi_read_rnd_dynamic_record(MI_INFO *info, byte *buf, if (share->base.blobs) { if (!(to= mi_alloc_rec_buff(info, block_info.rec_len, - &info->rec_buff, - &info->alloced_rec_buff_length))) + &info->rec_buff))) goto err; } else |