~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/alter_table.cc

  • Committer: Stewart Smith
  • Date: 2011-02-28 01:48:03 UTC
  • mto: (2241.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2242.
  • Revision ID: stewart@flamingspork.com-20110228014803-5mscqbre64hbana9
add code to store IMPORT/DISCARD TABLESPACE operation in the AlterTable protobuf message. assert that we get the right thing in alter table code

Show diffs side-by-side

added added

removed removed

Lines of Context:
1383
1383
 
1384
1384
  if (alter_info->tablespace_op != NO_TABLESPACE_OP)
1385
1385
  {
 
1386
    message::AlterTable *alter= session->getLex()->alter_table();
 
1387
 
 
1388
    if (alter_info->tablespace_op == DISCARD_TABLESPACE)
 
1389
    {
 
1390
      assert(alter->operations(0).operation() == message::AlterTable::AlterTableOperation::DISCARD_TABLESPACE);
 
1391
    }
 
1392
    else if (alter_info->tablespace_op == IMPORT_TABLESPACE)
 
1393
    {
 
1394
      assert(alter->operations(0).operation() == message::AlterTable::AlterTableOperation::IMPORT_TABLESPACE);
 
1395
    }
 
1396
 
1386
1397
    /* DISCARD/IMPORT TABLESPACE is always alone in an ALTER Table */
1387
1398
    return discard_or_import_tablespace(session, table_list, alter_info->tablespace_op);
1388
1399
  }