I have a question/concern.
My organization often uses the output from Workbench's "create alter script" export ability as the basis for their alter scripts. They start with what workbench provides and then add their own additional SQL commands.
In the workbench output I see the following near the top of the script
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
and at the end there are commands that to restore the old values.
I found the explanation for these changes at:
http://dev.mysql.com/doc/workbench/en/workbench-faq.html
However, my concern is..... what if the script fails in the middle. Doesn't that mean that the we never restore the old values for these variables? And isn't that bad?