Bug #10111 DROP PROCEDURE Cannot Be Rolled Back
Submitted: 23 Apr 2005 13:13 Modified: 28 Apr 2005 0:04
Reporter: MySQL-Front Team Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.0.4-beta OS:Widnows XP
Assigned to: Paul Dubois CPU Architecture:Any
Triage: D4 (Minor)

[23 Apr 2005 13:13] MySQL-Front Team
Description:
CREATE PROCEDURE `test`.`simpleproc`(OUT param1 INT)
  SELECT COUNT(*) INTO param1 FROM t;

START TRANSACTION;
DROP PROCEDURE `test`.`simpleproc`;
ALTER PROCEDURE `test`.`simpleproc` COMMENT 'Test';
ROLLBACK;

... the ALTER PROCEDURE query fails, since there is a DROP PROCEDURE before.

Ups, I've made a mistake. Let's use the ROLLBACK query - but it doesn't bring back the procedure.

Ok, now I read the manual:
http://dev.mysql.com/doc/mysql/en/commit.html

There is no note that the ROLLBACK doesn't works after a DROP PROCEDURE.

Ok, let's read this page:
http://dev.mysql.com/doc/mysql/en/cannot-roll-back.html
... and again no notice that the DROP PROCEDURE.

Now I'm unsure if there is a bug in the server (I hope so) or if there is a missing note in the manual.

How to repeat:
CREATE PROCEDURE `test`.`simpleproc`(OUT param1 INT)
  SELECT COUNT(*) INTO param1 FROM t;

START TRANSACTION;
DROP PROCEDURE `test`.`simpleproc`;
ALTER PROCEDURE `test`.`simpleproc` COMMENT 'Test';
ROLLBACK;

Reading:
http://dev.mysql.com/doc/mysql/en/cannot-roll-back.html
[23 Apr 2005 19:10] Jorge del Conde
This is not a bug, but our manual needs to be updated.

Thanks for the report.
[28 Apr 2005 0:04] Paul Dubois
Thank you for your bug report. This issue has been addressed in the
documentation. The updated documentation will appear on our website
shortly, and will be included in the next release of the relevant
product(s).