~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_open.c

  • Committer: Monty Taylor
  • Date: 2008-07-14 22:29:09 UTC
  • mto: (77.6.2 glibclient-merge)
  • mto: This revision was merged to the branch mainline in revision 159.
  • Revision ID: monty@inaugust.com-20080714222909-6qu1bjrwiwq9htm7
Removed skip-external-locking.

Show diffs side-by-side

added added

removed removed

Lines of Context:
161
161
    errpos=2;
162
162
 
163
163
    VOID(my_seek(kfile,0L,MY_SEEK_SET,MYF(0)));
164
 
    if (!(open_flags & HA_OPEN_TMP_TABLE))
165
 
    {
166
 
      if ((lock_error=my_lock(kfile,F_RDLCK,0L,F_TO_EOF,
167
 
                              MYF(open_flags & HA_OPEN_WAIT_IF_LOCKED ?
168
 
                                  0 : MY_DONT_WAIT))) &&
169
 
          !(open_flags & HA_OPEN_IGNORE_IF_LOCKED))
170
 
        goto err;
171
 
    }
172
164
    errpos=3;
173
165
    if (my_read(kfile,disk_cache,info_length,MYF(MY_NABP)))
174
166
    {
202
194
    if (!(open_flags & HA_OPEN_FOR_REPAIR) &&
203
195
        ((share->state.changed & STATE_CRASHED) ||
204
196
         ((open_flags & HA_OPEN_ABORT_IF_CRASHED) &&
205
 
          (my_disable_locking && share->state.open_count))))
 
197
          (share->state.open_count))))
206
198
    {
207
199
      DBUG_PRINT("error",("Table is marked as crashed. open_flags: %u  "
208
 
                          "changed: %u  open_count: %u  !locking: %d",
 
200
                          "changed: %u  open_count: %u",
209
201
                          open_flags, share->state.changed,
210
 
                          share->state.open_count, my_disable_locking));
 
202
                          share->state.open_count));
211
203
      my_errno=((share->state.changed & STATE_CRASHED_ON_REPAIR) ?
212
204
                HA_ERR_CRASHED_ON_REPAIR : HA_ERR_CRASHED_ON_USAGE);
213
205
      goto err;
392
384
 
393
385
    if (! lock_error)
394
386
    {
395
 
      VOID(my_lock(kfile,F_UNLCK,0L,F_TO_EOF,MYF(MY_SEEK_NOT_DONE)));
396
387
      lock_error=1;                     /* Database unlocked */
397
388
    }
398
389
 
582
573
    my_free((uchar*) share,MYF(0));
583
574
    /* fall through */
584
575
  case 3:
585
 
    if (! lock_error)
586
 
      VOID(my_lock(kfile, F_UNLCK, 0L, F_TO_EOF, MYF(MY_SEEK_NOT_DONE)));
587
576
    /* fall through */
588
577
  case 2:
589
578
    my_afree(disk_cache);