~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/rename.cc

Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
    Avoid problems with a rename on a table that we have locked or
41
41
    if the user is trying to to do this in a transcation context
42
42
  */
43
 
  if (session->locked_tables || session->inTransaction())
 
43
  if (session->inTransaction())
44
44
  {
45
45
    my_message(ER_LOCK_OR_ACTIVE_TRANSACTION, ER(ER_LOCK_OR_ACTIVE_TRANSACTION), MYF(0));
46
 
    return(1);
 
46
    return true;
47
47
  }
48
48
 
49
49
  if (wait_if_global_read_lock(session,0,1))
50
 
    return(1);
 
50
    return true;
51
51
 
52
52
  pthread_mutex_lock(&LOCK_open); /* Rename table lock for exclusive access */
53
53
  if (lock_table_names_exclusively(session, table_list))
100
100
 
101
101
err:
102
102
  start_waiting_global_read_lock(session);
 
103
 
103
104
  return error;
104
105
}
105
106