~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_extra.c

  • Committer: Monty Taylor
  • Date: 2008-07-16 19:10:24 UTC
  • mfrom: (51.1.127 remove-dbug)
  • mto: This revision was merged to the branch mainline in revision 176.
  • Revision ID: monty@inaugust.com-20080716191024-prjgoh7fbri7rx26
MergedĀ fromĀ remove-dbug.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
  int error=0;
43
43
  ulong cache_size;
44
44
  MYISAM_SHARE *share=info->s;
45
 
  DBUG_ENTER("mi_extra");
46
 
  DBUG_PRINT("enter",("function: %d",(int) function));
47
45
 
48
46
  switch (function) {
49
47
  case HA_EXTRA_RESET_STATE:            /* Reset state (don't free buffers) */
361
359
    {
362
360
      if (mi_dynmap_file(info, share->state.state.data_file_length))
363
361
      {
364
 
        DBUG_PRINT("warning",("mmap failed: errno: %d",errno));
365
362
        error= my_errno= errno;
366
363
      }
367
364
      else
383
380
    tmp[0]=function;
384
381
    myisam_log_command(MI_LOG_EXTRA,info,(uchar*) tmp,1,error);
385
382
  }
386
 
  DBUG_RETURN(error);
 
383
  return(error);
387
384
} /* mi_extra */
388
385
 
389
386
 
421
418
{
422
419
  int error= 0;
423
420
  MYISAM_SHARE *share=info->s;
424
 
  DBUG_ENTER("mi_reset");
425
421
  /*
426
422
    Free buffers and reset the following flags:
427
423
    EXTRA_CACHE, EXTRA_WRITE_CACHE, EXTRA_KEYREAD, EXTRA_QUICK
448
444
  info->page_changed= 1;
449
445
  info->update= ((info->update & HA_STATE_CHANGED) | HA_STATE_NEXT_FOUND |
450
446
                 HA_STATE_PREV_FOUND);
451
 
  DBUG_RETURN(error);
 
447
  return(error);
452
448
}