Bug #2672 | Stored Procedure handler declaration causes syntax error | ||
---|---|---|---|
Submitted: | 7 Feb 2004 17:55 | Modified: | 13 Feb 2004 12:32 |
Reporter: | Peter Gulutzan | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.0.0-alpha-debug | OS: | Linux (SuSE 8.2) |
Assigned to: | CPU Architecture: | Any |
[7 Feb 2004 17:55]
Peter Gulutzan
[8 Feb 2004 12:28]
Peter Gulutzan
The error is in the documentation, not in the implementation. I have suggested a correction to the manual. So: the original example statement is "not a bug". However, there is still some DECLARE syntax that doesn't work. A corrected example: mysql> create procedure p1 () begin declare integrity_violation CONDITION FOR SQLSTATE '23000'; end;// Query OK, 0 rows affected (0.00 sec) mysql> create procedure p2 () begin declare integrity_violation CONDITION FOR SQLWARNING; end;// ERROR 1064 (42000): You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SQLWARNING; end' at line 1 The same happens for SQLEXCEPTION, NOT FOUND. Integers are okay.
[13 Feb 2004 12:32]
Peter Gulutzan
The whole complaint was really due to one page in the documentation. The documentation has now been fixed.