2 ms·
> DDL statements, atomic or otherwise, implicitly end any transaction that is active in the current session, as if you had done a COMMIT before executing the st
by deathanatos 9y ago
> DDL statements, atomic or otherwise, implicitly end any transaction that is active in the current session, as if you had done a COMMIT before executing the statement.
That sounds horrifying. Implicitly committing transactions could very well leave the database in an undefined / inconsistent state, no? That is, from the applications view, if I do:
BEGIN;
STATEMENT A;
STATEMENT B;
END;
I would expect either both or neither to succeed, but that paragraph would suggest that A could succeed, and the transaction be committed. (And who knows after that?)
Am I missing something?
- marcosdumay 9y ago> That sounds horrifying. That means any previous version could fail during DDL execution and leave your metadata in an inconsistent state that you couldn't recover. Now MySQL is about as good as any commercial database.