Web lists-archives.com

Re: is a .sql file transactional




----- Original Message -----
> From: "thufir" <hawat.thufir@xxxxxxxxx>
> Subject: is a .sql file transactional

> when you run a .sql file, which modifies a schema, is it transactional?
> Specifically, is it an all-or-nothing proposition?  Or, can some commands
> get executed, some fail?

A file is nothing more than just another input method, it has no impact on transactionality or any other parameters.

DDL (schema modification) cannot be done inside a transaction - mysql will automatically commit your open transaction before proceeding, if you have one.

Every DDL statement individually is, however, all-or-nothing - the server (mostly) makes a copy of the table you're operating on, and only switches them out if the change was successful.


-- 
Unhappiness is discouraged and will be corrected with kitten pictures.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql