~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/rename.cc

  • Committer: Brian Aker
  • Date: 2009-03-25 22:52:34 UTC
  • mfrom: (934.2.28 small-cleanups)
  • Revision ID: brian@tangent.org-20090325225234-2ewmv7ma3kh858jk
Merge with Jay

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
  Every second entry in the table_list is the original name and every
32
32
  second entry is the new name.
33
33
*/
34
 
 
35
34
bool drizzle_rename_tables(Session *session, TableList *table_list, bool silent)
36
35
{
37
36
  bool error= 1;
41
40
    Avoid problems with a rename on a table that we have locked or
42
41
    if the user is trying to to do this in a transcation context
43
42
  */
44
 
  if (session->locked_tables || session->active_transaction())
 
43
  if (session->locked_tables || session->inTransaction())
45
44
  {
46
 
    my_message(ER_LOCK_OR_ACTIVE_TRANSACTION,
47
 
               ER(ER_LOCK_OR_ACTIVE_TRANSACTION), MYF(0));
 
45
    my_message(ER_LOCK_OR_ACTIVE_TRANSACTION, ER(ER_LOCK_OR_ACTIVE_TRANSACTION), MYF(0));
48
46
    return(1);
49
47
  }
50
48