~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/load.cc

  • Committer: Olaf van der Spek
  • Date: 2011-04-05 12:26:58 UTC
  • mto: (2278.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2272.
  • Revision ID: olafvdspek@gmail.com-20110405122658-xxrvmobwwwwf3oct
Refactor Open_tables_state

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include <drizzled/session.h>
24
24
#include <drizzled/sql_load.h>
25
25
#include <drizzled/statement/load.h>
 
26
#include <drizzled/sql_lex.h>
26
27
 
27
 
namespace drizzled
28
 
{
 
28
namespace drizzled {
29
29
 
30
30
bool statement::Load::execute()
31
31
{
32
 
  TableList *first_table= (TableList *) getSession()->getLex()->select_lex.table_list.first;
33
 
  TableList *all_tables= getSession()->getLex()->query_tables;
 
32
  TableList *first_table= (TableList *) lex().select_lex.table_list.first;
 
33
  TableList *all_tables= lex().query_tables;
34
34
  assert(first_table == all_tables && first_table != 0);
35
 
  bool res= load(getSession(),
36
 
                 getSession()->getLex()->exchange,
 
35
  bool res= load(&session(),
 
36
                 lex().exchange,
37
37
                 first_table,
38
 
                 getSession()->getLex()->field_list,
39
 
                 getSession()->getLex()->update_list,
40
 
                 getSession()->getLex()->value_list,
41
 
                 getSession()->getLex()->duplicates,
42
 
                 getSession()->getLex()->ignore);
 
38
                 lex().field_list,
 
39
                 lex().update_list,
 
40
                 lex().value_list,
 
41
                 lex().duplicates,
 
42
                 lex().ignore);
43
43
 
44
44
  return res;
45
45
}