← Back to team overview

drizzle-discuss team mailing list archive

Re: Improving the Engine API

 

Ann W. Harrison wrote:
Jay Pipes wrote:

Well, I'm not a huge fan of implicit anything, as you know, but in this case, since engines do have a certain leeway in how they advise the kernel that they will handle a statement, I'm OK with continuing the existing MySQL behaviour of implicitly committing transactions before DDL statements are executed -- but in Drizzle's case, only if the engine advises it is unable to include the DDL in the current transaction.


Err, including DDL in the current transaction does raise some other
issues.   Falcon is capable of executing the DDL statement without
ending the current transaction.  Effectively, the DDL executes in
a separate concurrent transaction which commits when the DDL statement
finishes, without affecting the running user transaction.  That's not
the same as including the DDL in the current transaction, at least
not the way I understand transactions.

For DDL statements to be included, they should create structures
that are visible to and usable from the current transaction and
none other. If the transaction rolls back, the metadata changes
roll back with it.  If the transaction commits, the new metadata
elements are visible to new transactions as they start - or old
transactions if they make their initial reference to the new thing
after it's committed.

I don't know of any database systems that handle metadata changes
that way, so including DDL in transactions may be ambitious.

Hi! Actually, I understand how ambitious it would be, which is why I said continue the existing behaviour of implicitly committing transactions before executing DDL *unless the engine advises Drizzle it can include the DDL in the current transaction*. :)

So, yes, I'm punting this difficult, ambitious task to the engine developers ;)

Cheers!

Jay



References