~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/insert.cc

  • Committer: Brian Aker
  • Date: 2010-11-22 00:16:44 UTC
  • mto: (1945.2.1 quick)
  • mto: This revision was merged to the branch mainline in revision 1947.
  • Revision ID: brian@tangent.org-20101122001644-pi6jv0d65e82xn38
Merge in lock refactor, this just encapsulates.

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= ! wait_if_global_read_lock(session, 0, 1)))
 
43
  if (! (need_start_waiting= ! session->wait_if_global_read_lock(false, true)))
44
44
  {
45
45
    return true;
46
46
  }
47
47
 
48
 
  DRIZZLE_INSERT_START(session->query.c_str());
 
48
  DRIZZLE_INSERT_START(session->getQueryString()->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
 
  start_waiting_global_read_lock(session);
 
62
  session->startWaitingGlobalReadLock();
 
63
 
63
64
  return res;
64
65
}
65
66