~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to storage/myisam/mi_panic.c

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
          error=my_errno;
55
55
      if (info->opt_flag & READ_CACHE_USED)
56
56
      {
 
57
        /* QQ Why do we flush a READ_CACHE? it's a no-op */
57
58
        if (flush_io_cache(&info->rec_cache))
58
59
          error=my_errno;
59
60
        reinit_io_cache(&info->rec_cache,READ_CACHE,0,
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
 
                                              N_NAME_IEXT,4),info->mode,
83
 
                                    MYF(MY_WME))) < 0)
 
82
          if ((info->s->kfile= my_open(fn_format(name_buff,
 
83
                                                 info->s->unresolv_file_name,
 
84
                                                 "", N_NAME_IEXT, 4),
 
85
                                       info->mode, MYF(MY_WME))) < 0)
84
86
            error = my_errno;
85
87
        if (info->dfile < 0)
86
88
        {
87
 
          if ((info->dfile= my_open(fn_format(name_buff,info->filename,"",
88
 
                                              N_NAME_DEXT,4),info->mode,
89
 
                                    MYF(MY_WME))) < 0)
 
89
          if ((info->dfile= my_open(fn_format(name_buff,
 
90
                                              info->s->unresolv_file_name,
 
91
                                              "", N_NAME_DEXT, 4),
 
92
                                    info->mode, MYF(MY_WME))) < 0)
90
93
            error = my_errno;
91
94
          info->rec_cache.file=info->dfile;
92
95
        }
103
106
  }
104
107
  if (flag == HA_PANIC_CLOSE)
105
108
  {
106
 
    VOID(mi_log(0));                            /* Close log if neaded */
 
109
    /* Close log if needed */
 
110
    mi_log(MI_LOG_ACTION_CLOSE_INCONSISTENT, MI_LOG_LOGICAL, NULL, NULL);
107
111
    ft_free_stopwords();
108
112
  }
109
113
  pthread_mutex_unlock(&THR_LOCK_myisam);