XA - Explicit startTransaction() call

Registered by Jay Pipes

Resource managers (now currently only storage engines) must manually track whether or not they are "inside" a transaction (either a statement or a normal transaction). This is typically done by incrementing and decrementing a counter that the storage engine keeps when StorageEngine::external_lock(F_RDLOCK|F_WRLCK) and StorageEngine::external_lock(F_UNLCK) are called.

This API is needlessly complex and should be replaced with explicit calls to the resource manager telling the resource manager when a transaction starts and when it ends:

XaResourceManager::startTransaction();
XaResourceManager::endTransaction();

Blueprint information

Status:
Complete
Approver:
None
Priority:
High
Drafter:
Jay Pipes
Direction:
Approved
Assignee:
Jay Pipes
Definition:
Approved
Series goal:
Accepted for cherry
Implementation:
Implemented
Milestone target:
milestone icon 2010-03-01
Started by
Jay Pipes
Completed by
Jay Pipes

Whiteboard

1) Got old dead code ripped out
2) Got startStatement() and endStatement() integrated.
3) Removed need for trans_register_ha(). Kernel now automatically registers engines in both statement and normal transactions
4) Killed off InnoDB's use of trx->n_mysql_tables_in_use. startStatement() and endStatement() now provide InnoDB with explciit statement boundaries

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.