~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/truncate.cc

  • Committer: Brian Aker
  • Date: 2011-01-22 18:52:16 UTC
  • mfrom: (2098.4.1 catalogs)
  • Revision ID: brian@tangent.org-20110122185216-18and6vncipd7x72
Session encapsulation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
bool statement::Truncate::execute()
30
30
{
31
 
  TableList *first_table= (TableList *) session->lex->select_lex.table_list.first;
 
31
  TableList *first_table= (TableList *) getSession()->lex->select_lex.table_list.first;
32
32
 
33
 
  if (session->inTransaction())
 
33
  if (getSession()->inTransaction())
34
34
  {
35
35
    my_error(ER_TRANSACTIONAL_DDL_NOT_SUPPORTED, MYF(0));
36
36
    return true;
37
37
  }
38
38
 
39
 
 
40
 
  return truncate(*session, first_table);
 
39
  return truncate(*getSession(), first_table);
41
40
}
42
41
 
43
42
} /* namespace drizzled */