~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/thr_lock.cc

  • Committer: Brian Aker
  • Date: 2009-05-13 01:31:43 UTC
  • mto: This revision was merged to the branch mainline in revision 1013.
  • Revision ID: brian@gaz-20090513013143-l0a5oh6aly1e15td
Removed TL_READ_HIGH_PRIORITY

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
TL_READ                 # Low priority read
28
28
TL_READ_WITH_SHARED_LOCKS
29
 
TL_READ_HIGH_PRIORITY   # High priority read
30
29
TL_READ_NO_INSERT       # Read without concurrent inserts
31
30
TL_WRITE_ALLOW_WRITE    # Write lock that allows other writers
32
31
TL_WRITE_ALLOW_READ     # Write lock, but allow reading
310
309
 
311
310
      if (thr_lock_owner_equal(data->owner, lock->write.data->owner) ||
312
311
          (lock->write.data->type <= TL_WRITE_CONCURRENT_INSERT &&
313
 
           (((int) lock_type <= (int) TL_READ_HIGH_PRIORITY) ||
 
312
           (((int) lock_type <= (int) TL_READ_WITH_SHARED_LOCKS) ||
314
313
            (lock->write.data->type != TL_WRITE_CONCURRENT_INSERT &&
315
314
             lock->write.data->type != TL_WRITE_ALLOW_READ))))
316
315
      {                                         /* Already got a write lock */
334
333
    }
335
334
    else if (!lock->write_wait.data ||
336
335
             lock->write_wait.data->type <= TL_WRITE_DEFAULT ||
337
 
             lock_type == TL_READ_HIGH_PRIORITY ||
338
336
             have_old_read_lock(lock->read.data, data->owner))
339
337
    {                                           /* No important write-locks */
340
338
      (*lock->read.last)=data;                  /* Add to running FIFO */
546
544
    {
547
545
      /* Release write-locks with TL_WRITE or TL_WRITE_ONLY priority first */
548
546
      if (data &&
549
 
          (!lock->read_wait.data || lock->read_wait.data->type < TL_READ_HIGH_PRIORITY))
 
547
          (!lock->read_wait.data || lock->read_wait.data->type <= TL_READ_WITH_SHARED_LOCKS))
550
548
      {
551
549
        if (lock->write_lock_count++ > max_write_lock_count)
552
550
        {