After merge fixes. Applied changes made in myisam manually to maria.

storage/maria/ma_test1.c:
  After merge fixes. Applied changes made in myisam manually to maria.
  
  Fixed memory leak.
storage/maria/ma_test2.c:
  After merge fixes. Applied changes made in myisam manually to maria.
  
  Fixed memory leak.
This commit is contained in:
unknown 2007-10-04 20:33:42 +03:00
commit 4eb383e06c
32 changed files with 510 additions and 375 deletions

View file

@ -75,13 +75,15 @@ int maria_delete(MARIA_HA *info,const uchar *record)
info->s->keyinfo[i].version++;
if (info->s->keyinfo[i].flag & HA_FULLTEXT )
{
if (_ma_ft_del(info,i,(char*) old_key,record,info->cur_row.lastpos))
if (_ma_ft_del(info, i, old_key, record, info->cur_row.lastpos))
goto err;
}
else
{
if (info->s->keyinfo[i].ck_delete(info,i,old_key,
_ma_make_key(info,i,old_key,record,info->cur_row.lastpos)))
_ma_make_key(info, i, old_key,
record,
info->cur_row.lastpos)))
goto err;
}
/* The above changed info->lastkey2. Inform maria_rnext_same(). */
@ -255,7 +257,7 @@ static int d_search(register MARIA_HA *info, register MARIA_KEYDEF *keyinfo,
if (info->ft1_to_ft2)
{
/* we're in ft1->ft2 conversion mode. Saving key data */
insert_dynamic(info->ft1_to_ft2, (char*) (lastkey+off));
insert_dynamic(info->ft1_to_ft2, (lastkey+off));
}
else
{
@ -806,7 +808,7 @@ static uint remove_key(MARIA_KEYDEF *keyinfo, uint nod_flag,
if (next_length > prev_length)
{
/* We have to copy data from the current key to the next key */
bmove_upp((char*) keypos,(char*) (lastkey+next_length),
bmove_upp(keypos, (lastkey+next_length),
(next_length-prev_length));
keypos-=(next_length-prev_length)+prev_pack_length;
store_key_length(keypos,prev_length);
@ -853,7 +855,7 @@ static uint remove_key(MARIA_KEYDEF *keyinfo, uint nod_flag,
if (next_length >= prev_length)
{ /* Key after is based on deleted key */
uint pack_length,tmp;
bmove_upp((char*) keypos,(char*) (lastkey+next_length),
bmove_upp(keypos, (lastkey+next_length),
tmp=(next_length-prev_length));
rest_length+=tmp;
pack_length= prev_length ? get_pack_length(rest_length): 0;