~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_open.c

  • Committer: Brian Aker
  • Date: 2008-10-10 07:00:22 UTC
  • mfrom: (492.1.15 codestyle)
  • Revision ID: brian@tangent.org-20081010070022-aud6tq3a82emaujj
Merge from Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
    share_buff.key_cache= multi_key_cache_search((unsigned char*) name_buff,
98
98
                                                 strlen(name_buff));
99
99
 
100
 
    if ((kfile=my_open(name_buff,(open_mode=O_RDWR) | O_SHARE,MYF(0))) < 0)
 
100
    if ((kfile=my_open(name_buff,(open_mode=O_RDWR),MYF(0))) < 0)
101
101
    {
102
102
      if ((errno != EROFS && errno != EACCES) ||
103
103
          mode != O_RDONLY ||
104
 
          (kfile=my_open(name_buff,(open_mode=O_RDONLY) | O_SHARE,MYF(0))) < 0)
 
104
          (kfile=my_open(name_buff,(open_mode=O_RDONLY),MYF(0))) < 0)
105
105
        goto err;
106
106
    }
107
107
    share->mode=open_mode;
1051
1051
int mi_open_datafile(MI_INFO *info, MYISAM_SHARE *share,
1052
1052
                     File file_to_dup __attribute__((unused)))
1053
1053
{
1054
 
    info->dfile=my_open(share->data_file_name, share->mode | O_SHARE,
 
1054
    info->dfile=my_open(share->data_file_name, share->mode,
1055
1055
                        MYF(MY_WME));
1056
1056
  return info->dfile >= 0 ? 0 : 1;
1057
1057
}
1059
1059
 
1060
1060
int mi_open_keyfile(MYISAM_SHARE *share)
1061
1061
{
1062
 
  if ((share->kfile=my_open(share->unique_file_name, share->mode | O_SHARE,
 
1062
  if ((share->kfile=my_open(share->unique_file_name, share->mode,
1063
1063
                            MYF(MY_WME))) < 0)
1064
1064
    return 1;
1065
1065
  return 0;