~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/replication_services.cc

  • Committer: Jay Pipes
  • Date: 2010-02-27 23:47:33 UTC
  • mto: (1309.2.14 build)
  • mto: This revision was merged to the branch mainline in revision 1319.
  • Revision ID: jpipes@serialcoder-20100227234733-0e4pq1zxwluxud00
* Adds CREATE TABLE as a specific CreateTableStatement message in the
replication stream.
* Corrects previous incorrect behaviour where non-MyISAM tables were
incorrectly being defined with PACK_RECORD = TRUE.  This affected the
checksumming of the table.
* There is still one remaining test case failure in the create_table.test
case in the transaction log test suite regarding the incorrect setting
of Table::Index::IndexPart::compare_length.

Show diffs side-by-side

added added

removed removed

Lines of Context:
727
727
  }
728
728
}
729
729
 
 
730
void ReplicationServices::createTable(Session *in_session,
 
731
                                      const message::Table &table)
 
732
{
 
733
  if (! is_active)
 
734
    return;
 
735
  
 
736
  message::Transaction *transaction= getActiveTransaction(in_session);
 
737
  message::Statement *statement= transaction->add_statement();
 
738
 
 
739
  initStatement(*statement, message::Statement::CREATE_TABLE, in_session);
 
740
 
 
741
  /* 
 
742
   * Construct the specialized CreateTableStatement message and attach
 
743
   * it to the generic Statement message
 
744
   */
 
745
  message::CreateTableStatement *create_table_statement= statement->mutable_create_table_statement();
 
746
  message::Table *new_table_message= create_table_statement->mutable_table();
 
747
  *new_table_message= table;
 
748
 
 
749
  finalizeStatement(*statement, in_session);
 
750
 
 
751
  finalizeTransaction(*transaction, in_session);
 
752
  
 
753
  push(*transaction);
 
754
 
 
755
  cleanupTransaction(transaction, in_session);
 
756
 
 
757
}
 
758
 
730
759
void ReplicationServices::createSchema(Session *in_session,
731
760
                                       const message::Schema &schema)
732
761
{