On Dec 4, 2009, at 12:42 AM, Stewart Smith wrote:
On Thu, Dec 03, 2009 at 11:24:53AM -0500, Jay Pipes wrote:
Yep, makes sense. Basically, what you are doing is removing the
legacy confusion around a "normal transaction" and a "statement
transaction", and the need for the ha_register_trans() stuff,
passing false for a statement transaction.
We should also think about savepoints (i.e. nested transactions)
Yes, I have also been considering this. We already have savepoint
functions:
StorageEngine::savepoint_set(session, sp);
StorageEngine::savepoint_rollback(session, sp);
StorageEngine::savepoint_release(session, sp);
This fits will with the new functions:
StorageEngine::beginTransaction(session)
StorageEngine::commitTransaction(session)
StorageEngine::rollbackTransaction(session)
StorageEngine::startStatement(session)
StorageEngine::endStatement(session, abort = true/false)
Basically, the engine that supports savepoints will implement
startStatement and endStatement as savepoints. Something like this:
startStatement(session) := savepoint_set(session, "statement");
endStatement(session, abort=true) := savepoint_rollback(session,
"statement");
endStatement(session, abort=false) := savepoint_release(session,
"statement");
Just like startStatement and endStatement savepoints are nested and
appear within beginTransaction and commitTransaction/
rollbackTransaction.
However, startStatement and endStatement are the "lowest level"
savepoints (a savepoint cannot be created between startStatement and
endStatement)
--
Stewart Smith
--
Paul McCullagh
PrimeBase Technologies
www.primebase.org
www.blobstreaming.org
pbxt.blogspot.com
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp