~drizzle-developers/drizzle/elliott-release

« back to all changes in this revision

Viewing changes to drizzled/statement/drop_table.cc

  • Committer: Patrick Crews
  • Date: 2011-02-01 20:33:06 UTC
  • mfrom: (1845.2.288 drizzle)
  • Revision ID: gleebix@gmail.com-20110201203306-mwq2rk0it81tlwxh
Merged Trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
 
88
88
bool statement::DropTable::execute()
89
89
{
90
 
  TableList *first_table= (TableList *) session->lex->select_lex.table_list.first;
91
 
  TableList *all_tables= session->lex->query_tables;
 
90
  TableList *first_table= (TableList *) getSession()->lex->select_lex.table_list.first;
 
91
  TableList *all_tables= getSession()->lex->query_tables;
92
92
  assert(first_table == all_tables && first_table != 0);
93
93
 
94
94
  if (not drop_temporary)
95
95
  {
96
 
    if (not session->endActiveTransaction())
 
96
    if (getSession()->inTransaction())
97
97
    {
 
98
      my_error(ER_TRANSACTIONAL_DDL_NOT_SUPPORTED, MYF(0));
98
99
      return true;
99
100
    }
100
101
  }
101
102
 
102
103
  /* DDL and binlog write order protected by table::Cache::singleton().mutex() */
103
104
 
104
 
  return rm_table(session, first_table, drop_if_exists, drop_temporary);
 
105
  return rm_table(getSession(), first_table, drop_if_exists, drop_temporary);
105
106
}
106
107
 
107
108
} /* namespace drizzled */