drizzle-discuss team mailing list archive
Mailing list archive
Re: Improving the Engine API
On Tue, Dec 08, 2009 at 11:23:00AM -0500, Jay Pipes wrote:
> >While I am no fan of a silent COMMIT, it may be the best solution,
> >because at least this sequence of statements will be compatible
> >with engines that support DDL in transactions and those that don't
> >(much like MyISAM happily ignores BEGIN TRANSACTION).
> >The alternative would be to return an error. This would prevent
> >the surprise affect that I get when the server crashes and I
> >discover my transaction was not atomic after all.
> 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
My choice would be to disallow the DDL if the engine involved can't
cope with it being transactional (currently all).
Probably will catch a lot of bugs in user applications.
> Suppose PBXT can handle ADD INDEX in an optimized fashion, but PBXT
> does not implement the remainder of the ALTER TABLE statement and
> prefers Drizzle's kernel to handle the other operations. In this
> particular case, we need a way of allowing the engine to communicate
> that it would like to handle *some part* of a statement internally,
> and let the kernel handle other parts. This is an interesting
> problem, and I can see at least three possible solutions. Let me
> know what you think of either of these:
I like "EXPLAIN ALTER TABLE" :)
along with ALTER TABLE ONLINE/OFFLINE syntax (already in mysql), this should
work for all situations:
- never implicit commit
- allow offline operations (how it is now. also allows you to force
- can find out if the ALTER you want to do can be done online (and
what parts of it can)
- can say "only do this if you can do it online"