~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to drizzled/statement/insert.cc

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.1.6)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20120619104649-e2l0ggd4oz3um0f4
Tags: upstream-7.1.36-stable
ImportĀ upstreamĀ versionĀ 7.1.36-stable

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <drizzled/session.h>
25
25
#include <drizzled/probes.h>
26
26
#include <drizzled/statement/insert.h>
 
27
#include <drizzled/sql_lex.h>
27
28
 
28
 
namespace drizzled
29
 
{
 
29
namespace drizzled {
30
30
 
31
31
bool statement::Insert::execute()
32
32
{
33
33
  TableList *first_table= (TableList *) lex().select_lex.table_list.first;
34
34
  TableList *all_tables= lex().query_tables;
35
35
  assert(first_table == all_tables && first_table != 0);
36
 
  bool need_start_waiting= false;
37
36
 
38
37
  if (insert_precheck(&session(), all_tables))
39
38
  {
40
39
    return true;
41
40
  }
42
41
 
43
 
  if (! (need_start_waiting= ! session().wait_if_global_read_lock(false, true)))
 
42
  if (session().wait_if_global_read_lock(false, true))
44
43
  {
45
44
    return true;
46
45
  }