~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/insert.cc

fix pthread atomics. operator precedence is important. The unit test now passes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
    return true;
41
41
  }
42
42
 
43
 
  if (! (need_start_waiting= ! session->wait_if_global_read_lock(false, true)))
 
43
  if (! (need_start_waiting= ! wait_if_global_read_lock(session, 0, 1)))
44
44
  {
45
45
    return true;
46
46
  }
47
47
 
48
 
  DRIZZLE_INSERT_START(session->getQueryString()->c_str());
 
48
  DRIZZLE_INSERT_START(session->query.c_str());
49
49
 
50
50
  bool res= mysql_insert(session,
51
51
                         all_tables,
59
59
     Release the protection against the global read lock and wake
60
60
     everyone, who might want to set a global read lock.
61
61
   */
62
 
  session->startWaitingGlobalReadLock();
63
 
 
 
62
  start_waiting_global_read_lock(session);
64
63
  return res;
65
64
}
66
65