4
I was looking on the internet if there was any way to run Transactions for operations of the type ALTER TABLE
or CREATE TABLE
in the Mysql. This is because in one of our systems, we used Migrations and wanted that if something went wrong in the creation of the table, the changes had a rollback.
Eventually I discovered that is not possible do this in Mysql.
I saw it in that Answer of SOEN.
(If anyone can translate, be grateful, but I could understand more or less).
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.
But then there were some doubts :
Knowing that they’re not all Statments that support Rollback, what are they that are always accepted?
Why is there such limitation regarding the structural changes in the tables?