~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/truncate.cc

  • Committer: Lee Bieber
  • Date: 2011-01-21 05:20:24 UTC
  • mfrom: (2099.1.3 build)
  • Revision ID: kalebral@gmail.com-20110121052024-43pl0aj8j5fmqnvl
Merge Stewart - Fix bug 664222: DDL operations have an implicit commit
Merge Stewart - Fix bug #695201: autocommit=1 not resetting session->server_status properly when committing ongoing txn
Add BSD copyright file to win32/config.h
Merge Brian - cleanup user_locks.kill_wait test

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
bool statement::Truncate::execute()
30
30
{
31
31
  TableList *first_table= (TableList *) session->lex->select_lex.table_list.first;
32
 
  if (! session->endActiveTransaction())
33
 
  {
34
 
    return true;
35
 
  }
36
 
  /*
37
 
   * Don't allow this within a transaction because we want to use
38
 
   * re-generate table
39
 
   */
 
32
 
40
33
  if (session->inTransaction())
41
34
  {
42
 
    my_message(ER_LOCK_OR_ACTIVE_TRANSACTION, 
43
 
               ER(ER_LOCK_OR_ACTIVE_TRANSACTION), 
44
 
               MYF(0));
 
35
    my_error(ER_TRANSACTIONAL_DDL_NOT_SUPPORTED, MYF(0));
45
36
    return true;
46
37
  }
47
38
 
 
39
 
48
40
  return truncate(*session, first_table);
49
41
}
50
42