~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/mi_locking.cc

  • Committer: Brian Aker
  • Date: 2010-08-11 18:47:39 UTC
  • mfrom: (1689.2.28 rollup)
  • Revision ID: brian@gaz-20100811184739-ey7llnsu12gfv6hb
No longer concurrent, no longer need these locks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
  MYISAM_SHARE *share=info->s;
37
37
  uint32_t flag;
38
38
 
39
 
  pthread_mutex_lock(&share->intern_lock);
40
39
  if (!info->s->in_use)
41
40
    info->s->in_use= new list<Session *>;
42
41
 
43
42
  if (lock_type == F_EXTRA_LCK)                 /* Used by TMP tables */
44
43
  {
45
 
    pthread_mutex_unlock(&share->intern_lock);
46
44
    ++share->w_locks;
47
45
    ++share->tot_locks;
48
46
    info->lock_type= lock_type;
84
82
    if ((info->s->mmaped_length != info->s->state.state.data_file_length) &&
85
83
        (info->s->nonmmaped_inserts > MAX_NONMAPPED_INSERTS))
86
84
    {
87
 
      if (info->s->concurrent_insert)
88
 
        pthread_rwlock_wrlock(&info->s->mmap_lock);
89
85
      mi_remap_file(info, info->s->state.state.data_file_length);
90
86
      info->s->nonmmaped_inserts= 0;
91
 
      if (info->s->concurrent_insert)
92
 
        pthread_rwlock_unlock(&info->s->mmap_lock);
93
87
    }
94
88
          share->state.process= share->last_process=share->this_process;
95
89
          share->state.unique=   info->last_unique=  info->this_unique;
213
207
    }
214
208
  }
215
209
#endif
216
 
  pthread_mutex_unlock(&share->intern_lock);
217
210
#if defined(FULL_LOG) || defined(_lint)
218
211
  lock_type|=(int) (flag << 8);         /* Set bit to set if real lock */
219
212
  myisam_log_command(MI_LOG_LOCK,info,(unsigned char*) &lock_type,sizeof(lock_type),