| Bug #27637 | can't drop table inside stored procedure | ||
|---|---|---|---|
| Submitted: | 4 Apr 2007 7:23 | Modified: | 4 Apr 2007 8:27 |
| Reporter: | Jacek Becla | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server: Stored Routines | Severity: | S3 (Non-critical) |
| Version: | 5.0.22-standard | OS: | Linux |
| Assigned to: | CPU Architecture: | Any | |
[4 Apr 2007 8:27]
Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php Please read about "Stored functions may not contain statements that do explicit or implicit commit or rollback." at http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html

Description: Stored procedure with DROP TABLE fails to compile. Error: ERROR 1422 (HY000): Explicit or implicit commit is not allowed in stored function or trigger. How to repeat: delimiter // CREATE FUNCTION testFun() RETURNS INT BEGIN CREATE TEMPORARY TABLE myTable (i INT); DROP TABLE myTable; END //