~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/insert.cc

  • Committer: Lee Bieber
  • Date: 2011-03-13 16:37:38 UTC
  • mfrom: (2227.4.18 session2)
  • Revision ID: kalebral@gmail.com-20110313163738-7ti21zk40o2xi3ew
Merge Olaf - Refactor Session

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
  assert(first_table == all_tables && first_table != 0);
36
36
  bool need_start_waiting= false;
37
37
 
38
 
  if (insert_precheck(getSession(), all_tables))
39
 
  {
40
 
    return true;
41
 
  }
42
 
 
43
 
  if (! (need_start_waiting= ! getSession()->wait_if_global_read_lock(false, true)))
44
 
  {
45
 
    return true;
46
 
  }
47
 
 
48
 
  DRIZZLE_INSERT_START(getSession()->getQueryString()->c_str());
49
 
 
50
 
  bool res= insert_query(getSession(),
 
38
  if (insert_precheck(&session(), all_tables))
 
39
  {
 
40
    return true;
 
41
  }
 
42
 
 
43
  if (! (need_start_waiting= ! session().wait_if_global_read_lock(false, true)))
 
44
  {
 
45
    return true;
 
46
  }
 
47
 
 
48
  DRIZZLE_INSERT_START(session().getQueryString()->c_str());
 
49
 
 
50
  bool res= insert_query(&session(),
51
51
                         all_tables,
52
52
                         lex().field_list,
53
53
                         lex().many_values,
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
 
  getSession()->startWaitingGlobalReadLock();
 
62
  session().startWaitingGlobalReadLock();
63
63
 
64
64
  return res;
65
65
}