~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.cc

This patch adds the following functionality:

* Removes the need to manually enable replicators in order
  for an applier to work.
* Removes the enabled/disabled setting of both transaction
  applier plugins and transaction replicator plugins
* Pairs a replicator with an applier into a "ReplicationStream"
  and removes all checks for "enabled" replicators and appliers
* Allows modules that implement a TransactionApplier (such as
  the transaction_log module) to specify which replicator to
  use via a configuration variable.  For instance, the transaction
  log module now has --transaction-log-use-replicator=[default|filtered..]
  instead of the user having to do --default-replicator-enable and such
* Adds a new data dictionary table for REPLICATION_STREAMS, which
  allows querying of activated replication-to-applier streams
  managed by drizzled::ReplicationServices

Show diffs side-by-side

added added

removed removed

Lines of Context:
369
369
#endif
370
370
  {
371
371
    TransactionServices &transaction_services= TransactionServices::singleton();
372
 
    transaction_services.ha_rollback_trans(this, true);
 
372
    transaction_services.rollbackTransaction(this, true);
373
373
    xid_cache_delete(&transaction.xid_state);
374
374
  }
375
375
  hash_free(&user_vars);
772
772
       * (Which of course should never happen...)
773
773
       */
774
774
      server_status&= ~SERVER_STATUS_IN_TRANS;
775
 
      if (transaction_services.ha_commit_trans(this, true))
 
775
      if (transaction_services.commitTransaction(this, true))
776
776
        result= false;
777
777
      options&= ~(OPTION_BEGIN);
778
778
      break;
789
789
    case ROLLBACK_AND_CHAIN:
790
790
    {
791
791
      server_status&= ~SERVER_STATUS_IN_TRANS;
792
 
      if (transaction_services.ha_rollback_trans(this, true))
 
792
      if (transaction_services.rollbackTransaction(this, true))
793
793
        result= false;
794
794
      options&= ~(OPTION_BEGIN);
795
795
      if (result == true && (completion == ROLLBACK_AND_CHAIN))
822
822
  if (options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))
823
823
  {
824
824
    server_status&= ~SERVER_STATUS_IN_TRANS;
825
 
    if (transaction_services.ha_commit_trans(this, true))
 
825
    if (transaction_services.commitTransaction(this, true))
826
826
      result= false;
827
827
  }
828
828
  options&= ~(OPTION_BEGIN);
1947
1947
  {
1948
1948
    TransactionServices &transaction_services= TransactionServices::singleton();
1949
1949
    main_da.can_overwrite_status= true;
1950
 
    transaction_services.ha_autocommit_or_rollback(this, is_error());
 
1950
    transaction_services.autocommitOrRollback(this, is_error());
1951
1951
    main_da.can_overwrite_status= false;
1952
1952
    transaction.stmt.reset();
1953
1953
  }