do alter statement require commit
ALTER DATABASE ... SET autocommit = 1 causes an implicit commit if the value was 0. All these statements cause an implicit commit before execution. This means that, even if the statement fails with an error, the transaction is committed. Some of them, like CREATE TABLE ... SELECT, also cause a commit immediatly after execution.