~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/alter_table.cc

  • Committer: Brian Aker
  • Date: 2010-06-15 13:37:26 UTC
  • Revision ID: brian@gaz-20100615133726-160z0ql8gxi8s3rg
This is a rollup set of patches for modifications to TableIdentifier to have
a getKey() which is now used for open_cache and table_share_def cache. This
also includes additional unittests on TableIdentifier, and makes use of some
cleanup, though not perfect, to TableShare for its contructors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1156
1156
    session->close_temporary_table(table);
1157
1157
 
1158
1158
    /* Should pass the 'new_name' as we store table name in the cache */
1159
 
    if (new_table->renameAlterTemporaryTable(new_table_identifier))
1160
 
    {
1161
 
      session->close_temporary_table(new_table);
1162
 
 
1163
 
      return true;
1164
 
    }
 
1159
    new_table->getMutableShare()->setIdentifier(new_table_identifier);
1165
1160
 
1166
1161
    new_table_identifier.setPath(new_table_as_temporary.getPath());
1167
1162
 
1438
1433
 
1439
1434
  if (order)
1440
1435
  {
1441
 
    if (to->getShare()->primary_key != MAX_KEY && to->cursor->primary_key_is_clustered())
 
1436
    if (to->getShare()->hasPrimaryKey() && to->cursor->primary_key_is_clustered())
1442
1437
    {
1443
1438
      char warn_buff[DRIZZLE_ERRMSG_SIZE];
1444
1439
      snprintf(warn_buff, sizeof(warn_buff),