~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/replication_services.h

  • Committer: Jay Pipes
  • Date: 2009-12-04 02:24:50 UTC
  • mto: (1237.2.10 push)
  • mto: This revision was merged to the branch mainline in revision 1238.
  • Revision ID: jpipes@serialcoder-20091204022450-4yg26ow5de8obroa
Adds test case to transaction log for TRUNCATE TABLE.

Adds ReplicationServices::truncateTable() method specific
to the ha_delete_all_rows() Cursor call.

Adds some placeholder comments and test case to the delete.test
case in the transaction log suite to test occasions where a DELETE
FROM statement with no WHERE clause happens

Updates the statement_transform library to deal properly with
TRUNCATE TABLE statements.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
    TRANSACTION= 1, /* A GPB Transaction Message */
64
64
    BLOB= 2 /* A BLOB value */
65
65
  };
 
66
  typedef std::vector<plugin::TransactionReplicator *> Replicators;
 
67
  typedef std::vector<plugin::TransactionApplier *> Appliers;
66
68
private:
67
69
  /** 
68
70
   * Atomic boolean set to true if any *active* replicators
75
77
   */
76
78
  atomic<uint64_t> last_applied_timestamp;
77
79
  /** Our collection of replicator plugins */
78
 
  std::vector<drizzled::plugin::TransactionReplicator *> replicators;
 
80
  Replicators replicators;
79
81
  /** Our collection of applier plugins */
80
 
  std::vector<drizzled::plugin::TransactionApplier *> appliers;
 
82
  Appliers appliers;
81
83
  /**
82
84
   * Helper method which is called after any change in the
83
85
   * registered appliers or replicators to evaluate whether
321
323
   */
322
324
  void deleteRecord(Session *in_session, Table *in_table);
323
325
  /**
 
326
   * Creates a TruncateTable Statement GPB message and add it
 
327
   * to the Session's active Transaction GPB message for pushing
 
328
   * out to the replicator streams.
 
329
   *
 
330
   * @param[in] Pointer to the Session which issued the statement
 
331
   * @param[in] The Table being truncated
 
332
   */
 
333
  void truncateTable(Session *in_session, Table *in_table);
 
334
  /**
324
335
   * Creates a new RawSql GPB message and pushes it to 
325
336
   * replicators.
326
337
   *