~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.cc

Completes the work of removing the weirdness around transaction
boundaries in the storage engine API.

* Transactional storage engines are now all explicitly notified
  of the start of a new "normal" transaction in the new PSE API
  method plugin::TransactionalStorageEngine::doStartTransaction()
  This new method takes a start_transaction_option_t as one of its
  parameters, and passing this option allows the storage engine
  API to cleanly signal the start of a consistent snapshot (and in
  the future additional transaction attributes).  This meant the
  removal of the old start_consistent_snapshot() method.

* The TransactionServices component now fully manages the transaction
  boundaries, notification of transaction boundaries to participating
  resource managers (transactional storage engines)

Adds a simple test case (to be expanded with future XA work) for
transaction behaviour.

Show diffs side-by-side

added added

removed removed

Lines of Context:
857
857
    options|= OPTION_BEGIN;
858
858
    server_status|= SERVER_STATUS_IN_TRANS;
859
859
 
860
 
    if (opt == START_TRANS_OPT_WITH_CONS_SNAPSHOT)
 
860
    if (plugin::TransactionalStorageEngine::notifyStartTransaction(this, opt))
861
861
    {
862
 
      if (plugin::TransactionalStorageEngine::startConsistentSnapshot(this))
863
 
      {
864
 
        result= false;
865
 
      }
 
862
      result= false;
866
863
    }
867
864
  }
868
865