title: mysql rollback by error HANDLER not working
body: <p>I just build a stored procedure to test transaction in mysql.</p>
  
  <p>But somehow it's not working.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>USE `test`;
  DROP procedure IF EXISTS `testTran`;
  DELIMITER $$
  USE `test`$$
  CREATE DEFINER=`root`@`localhost` PROCEDURE `testTran`()
  BEGIN
      DECLARE EXIT HANDLER FOR SQLEXCEPTION rollback;
      START TRANSACTION;
      INSERT INTO `test`.`books`(`name`,`number`) VALUES ('asd', 20);
      ALTER TABLE `test`.`books` ADD COLUMN `name` VARCHAR(45) NULL  AFTER `number` ;
      COMMIT;
  END$$
  DELIMITER ;
  </code></pre>
  
  <p>Inside transaction, the second command is create an exist column which will be fail. What I expect is the first insert will be rollback. But actually, it's not. The insert do work.</p>
  
  <p>Can anyone help?</p>