~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Brian Aker
  • Date: 2010-03-27 21:22:09 UTC
  • Revision ID: brian@gaz-20100327212209-ey71k8qwst00i8q2
Innodb is now in the house (aka... it handls its own DFE).

Show diffs side-by-side

added added

removed removed

Lines of Context:
284
284
  */
285
285
  pthread_mutex_unlock(&LOCK_open);
286
286
  error= 0;
 
287
 
287
288
  if (wrong_tables.length())
288
289
  {
289
 
    if (!foreign_key_error)
 
290
    if (not foreign_key_error)
 
291
    {
290
292
      my_printf_error(ER_BAD_TABLE_ERROR, ER(ER_BAD_TABLE_ERROR), MYF(0),
291
293
                      wrong_tables.c_ptr());
 
294
    }
292
295
    else
293
296
    {
294
297
      my_message(ER_ROW_IS_REFERENCED, ER(ER_ROW_IS_REFERENCED), MYF(0));
297
300
  }
298
301
 
299
302
  pthread_mutex_lock(&LOCK_open); /* final bit in rm table lock */
 
303
 
300
304
err_with_placeholders:
301
305
  unlock_table_names(tables, NULL);
302
306
  pthread_mutex_unlock(&LOCK_open);
303
307
  session->no_warnings_for_error= 0;
304
308
 
305
 
  return(error);
 
309
  return error;
306
310
}
307
311
 
308
312
 
1633
1637
 
1634
1638
  assert(base);
1635
1639
 
1636
 
  if (not (error= base->renameTable(*session, from, to)))
1637
 
  {
1638
 
    if (not base->check_flag(HTON_BIT_HAS_DATA_DICTIONARY))
1639
 
    {
1640
 
      if ((error= plugin::StorageEngine::renameDefinitionFromPath(to, from)))
1641
 
      {
1642
 
        error= errno;
1643
 
        base->renameTable(*session, to, from);
1644
 
      }
1645
 
    }
1646
 
  }
 
1640
  error= base->renameTable(*session, from, to);
1647
1641
 
1648
1642
  if (error == HA_ERR_WRONG_COMMAND)
1649
1643
  {