~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/thr_lock.cc

  • Committer: Lee Bieber
  • Date: 2011-03-29 22:31:41 UTC
  • mfrom: (2257.1.3 build)
  • Revision ID: kalebral@gmail.com-20110329223141-yxc22h3l2he58sk0
Merge Andrew - 743842: Build failure using GCC 4.6
Merge Stewart - 738022: CachedDirectory silently fails to add entries if stat() fails
Merge Olaf - Common fwd: add copyright, add more declaration

Show diffs side-by-side

added added

removed removed

Lines of Context:
346
346
    {
347
347
      if (!lock->write_wait.data)
348
348
      {                                         /* no scheduled write locks */
349
 
        bool concurrent_insert= 0;
350
 
        if (lock_type == TL_WRITE_CONCURRENT_INSERT)
351
 
        {
352
 
          concurrent_insert= 1;
353
 
        }
354
 
 
355
349
        if (!lock->read.data ||
356
350
            (lock_type <= TL_WRITE_CONCURRENT_INSERT &&
357
351
             ((lock_type != TL_WRITE_CONCURRENT_INSERT &&
604
598
      return(result);
605
599
    }
606
600
  }
607
 
  /*
608
 
    Ensure that all get_locks() have the same status
609
 
    If we lock the same table multiple times, we must use the same
610
 
    status_param!
611
 
  */
612
 
#if !defined(DONT_USE_RW_LOCKS)
613
 
  if (count > 1)
614
 
  {
615
 
    THR_LOCK_DATA *last_lock= end[-1];
616
 
    pos=end-1;
617
 
    do
618
 
    {
619
 
      pos--;
620
 
      last_lock=(*pos);
621
 
    } while (pos != data);
622
 
  }
623
 
#endif
624
601
  return(THR_LOCK_SUCCESS);
625
602
}
626
603