Some statements cannot be rolled back. In general, these include data definition language (DDL) statements, such as those that create or drop databases, those that create, drop, or alter tables or stored routines.
You should design your transactions not to include such
statements. If you issue a statement early in a transaction that
cannot be rolled back, and then another statement later fails, the
full effect of the transaction cannot be rolled back in such cases
by issuing a
ROLLBACK
statement.
User Comments
Actually when a DDL statement is issued (eg. ALTER) MySQL will commit the pending transaction (5.0.45-log FreeBSD).
Add your own comment.