maria-developers team mailing list archive
Mailing list archive
Re: ALTER ONLINE TABLE syntax
I really do not see why you would want to define both algorithm and lock
mode. In my transactional view
ALGORITHM=COPY would mean EXCLUSIVE lock and INPLACE would mean SHARED
lock. Is there some
other lock that protects from concurrent online alter tables ? Lock NONE
would mean I do not care what
You've added this ALTER ONLINE TABLE syntax, where ONLINE de facto means
"without copying the data".
Now, after 5.6 merge we also have ALGORITHM=COPY|INPLACE and
I've mapped ONLINE to ALGORITHM=INPLACE, because that's what it means.
But it's confusing, one can have an "inplace" operation under an
exclusive lock, if the engine wants it that way. And it won't be
"online" by any stretch of imagination. One can also technically have a
"copy" operation with a very permissive write-allow-write lock, and
it'll be as online as one can get it.
I mean, logically ONLINE should mean LOCK=NONE, not ALGORITHM=INPLACE.
But that would change the existing behavior and the test results too.
For example, *any* ALTER on the temporary table would always be
"online", because, well, it wouldn't take any lock on that table.
Alternatively, we can keep ONLINE as ALGORITHM=INPLACE, and deprecate
it, issue a warning, suggesting to use the new 5.6 syntax.