~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_write.c

  • Committer: Monty Taylor
  • Date: 2008-12-06 07:22:02 UTC
  • mto: (656.1.7 devel) (660.1.5 codestyle)
  • mto: This revision was merged to the branch mainline in revision 665.
  • Revision ID: monty@inaugust.com-20081206072202-2g25o9doqr1l8euu
OOOh doggie. Got rid of my_alloca.

Show diffs side-by-side

added added

removed removed

Lines of Context:
303
303
  my_off_t next_page, dupp_key_pos;
304
304
 
305
305
  search_key_length= (comp_flag & SEARCH_FIND) ? key_length : USE_WHOLE_KEY;
306
 
  if (!(temp_buff= (unsigned char*) my_alloca((uint) keyinfo->block_length+
307
 
                                      MI_MAX_KEY_BUFF*2)))
 
306
  if (!(temp_buff= (unsigned char*) malloc(keyinfo->block_length+
 
307
                                           MI_MAX_KEY_BUFF*2)))
308
308
    return(-1);
309
309
  if (!_mi_fetch_keypage(info,keyinfo,page,DFLT_INIT_HITS,temp_buff,0))
310
310
    goto err;
324
324
 
325
325
    {
326
326
      info->dupp_key_pos= dupp_key_pos;
327
 
      my_afree((unsigned char*) temp_buff);
 
327
      free(temp_buff);
328
328
      my_errno=HA_ERR_FOUND_DUPP_KEY;
329
329
      return(-1);
330
330
    }
343
343
    if (_mi_write_keypage(info,keyinfo,page,DFLT_INIT_HITS,temp_buff))
344
344
      goto err;
345
345
  }
346
 
  my_afree((unsigned char*) temp_buff);
 
346
  free(temp_buff);
347
347
  return(error);
348
348
err:
349
 
  my_afree((unsigned char*) temp_buff);
 
349
  free(temp_buff);
350
350
  return (-1);
351
351
} /* w_search */
352
352