~jaypipes/drizzle/split-xa-resource-manager

« back to all changes in this revision

Viewing changes to plugin/myisam/mi_panic.cc

  • Committer: Jay Pipes
  • Date: 2010-02-06 01:51:20 UTC
  • mfrom: (1273.1.10 build)
  • Revision ID: jpipes@serialcoder-20100206015120-as4vb638inbzrb59
Merge trunk changes and resolve conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#include "myisam_priv.h"
17
17
 
18
18
using namespace std;
 
19
using namespace drizzled;
19
20
 
20
21
        /* if flag == HA_PANIC_CLOSE then all misam files are closed */
21
22
        /* if flag == HA_PANIC_WRITE then all misam files are unlocked and
56
57
      {
57
58
        if (flush_io_cache(&info->rec_cache))
58
59
          error=errno;
59
 
        reinit_io_cache(&info->rec_cache,READ_CACHE,0,
 
60
        reinit_io_cache(&info->rec_cache,internal::READ_CACHE,0,
60
61
                       (bool) (info->lock_type != F_UNLCK),1);
61
62
      }
62
63
      if (info->lock_type != F_UNLCK && ! info->was_locked)
66
67
          error=errno;
67
68
      }
68
69
#ifdef CANT_OPEN_FILES_TWICE
69
 
      if (info->s->kfile >= 0 && my_close(info->s->kfile,MYF(0)))
 
70
      if (info->s->kfile >= 0 && internal::my_close(info->s->kfile,MYF(0)))
70
71
        error = errno;
71
 
      if (info->dfile >= 0 && my_close(info->dfile,MYF(0)))
 
72
      if (info->dfile >= 0 && internal::my_close(info->dfile,MYF(0)))
72
73
        error = errno;
73
74
      info->s->kfile=info->dfile= -1;   /* Files aren't open anymore */
74
75
      break;
78
79
      {                                 /* Open closed files */
79
80
        char name_buff[FN_REFLEN];
80
81
        if (info->s->kfile < 0)
81
 
          if ((info->s->kfile= my_open(fn_format(name_buff,info->filename,"",
 
82
          if ((info->s->kfile= internal::my_open(internal::fn_format(name_buff,info->filename,"",
82
83
                                              N_NAME_IEXT,4),info->mode,
83
84
                                    MYF(MY_WME))) < 0)
84
85
            error = errno;
85
86
        if (info->dfile < 0)
86
87
        {
87
 
          if ((info->dfile= my_open(fn_format(name_buff,info->filename,"",
 
88
          if ((info->dfile= internal::my_open(internal::fn_format(name_buff,info->filename,"",
88
89
                                              N_NAME_DEXT,4),info->mode,
89
90
                                    MYF(MY_WME))) < 0)
90
91
            error = errno;