~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_delete.c

  • Committer: Eric Herman
  • Date: 2008-12-06 22:37:37 UTC
  • mfrom: (656.1.6 devel)
  • mto: (656.1.8 devel)
  • mto: This revision was merged to the branch mainline in revision 665.
  • Revision ID: eric@mysql.com-20081206223737-viem01l5uhm0w14r
mergedĀ fromĀ lp:drizzle/mordred

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
    mi_print_error(info->s, HA_ERR_CRASHED);
140
140
    return(my_errno=HA_ERR_CRASHED);
141
141
  }
142
 
  if (!(root_buff= (unsigned char*) my_alloca((uint) keyinfo->block_length+
 
142
  if (!(root_buff= (unsigned char*) malloc(keyinfo->block_length+
143
143
                                      MI_MAX_KEY_BUFF*2)))
144
144
  {
145
145
    return(my_errno=ENOMEM);
173
173
    }
174
174
  }
175
175
err:
176
 
  my_afree((unsigned char*) root_buff);
 
176
  free(root_buff);
177
177
  return(error);
178
178
} /* _mi_ck_real_delete */
179
179
 
210
210
  if (nod_flag)
211
211
  {
212
212
    leaf_page=_mi_kpos(nod_flag,keypos);
213
 
    if (!(leaf_buff= (unsigned char*) my_alloca((uint) keyinfo->block_length+
 
213
    if (!(leaf_buff= (unsigned char*) malloc(keyinfo->block_length+
214
214
                                        MI_MAX_KEY_BUFF*2)))
215
215
    {
216
216
      my_errno=ENOMEM;
279
279
  }
280
280
  if (save_flag && ret_value != 1)
281
281
    ret_value|=_mi_write_keypage(info,keyinfo,page,DFLT_INIT_HITS,anc_buff);
282
 
  my_afree((unsigned char*) leaf_buff);
 
282
  free(leaf_buff);
283
283
  return(ret_value);
284
284
 
285
285
err:
286
 
  my_afree((unsigned char*) leaf_buff);
 
286
  free(leaf_buff);
287
287
  return (-1);
288
288
} /* d_search */
289
289
 
311
311
  if ((nod_flag=mi_test_if_nod(leaf_buff)))
312
312
  {
313
313
    next_page= _mi_kpos(nod_flag,endpos);
314
 
    if (!(next_buff= (unsigned char*) my_alloca((uint) keyinfo->block_length+
 
314
    if (!(next_buff= (unsigned char*) malloc(keyinfo->block_length+
315
315
                                        MI_MAX_KEY_BUFF*2)))
316
316
      return(-1);
317
317
    if (!_mi_fetch_keypage(info,keyinfo,next_page,DFLT_INIT_HITS,next_buff,0))
343
343
      if (_mi_write_keypage(info,keyinfo,leaf_page,DFLT_INIT_HITS,leaf_buff))
344
344
        goto err;
345
345
    }
346
 
    my_afree((unsigned char*) next_buff);
 
346
    free(next_buff);
347
347
    return(ret_value);
348
348
  }
349
349