| Bug #29223 | declare cursor c for SHOW ..... | ||
|---|---|---|---|
| Submitted: | 19 Jun 2007 21:45 | Modified: | 24 Oct 2007 21:09 |
| Reporter: | Martin Friebe (Gold Quality Contributor) | ||
| Status: | Closed | ||
| Category: | Server: Parser | Severity: | S3 (Non-critical) |
| Version: | 5.0.44/5.1 | OS: | Any |
| Assigned to: | Davi Arnaut | Target Version: | |
| Tags: | show, cursor | ||
[19 Jun 2007 21:45]
Martin Friebe
[20 Jun 2007 2:46]
Miguel Solorzano
Thank you for the bug report.
[6 Sep 2007 18:46]
Konstantin Osipov
Do nothing in the code, add test coverage in 5.2, document in 5.2 manual.
[12 Sep 2007 3:41]
Marc Alff
To discuss, but I think we should *not* allow this syntax, as it opens the door to constructs that are probably not working, because they are not all implemented reusing internally COM_SELECT, like for example: DECLARE CURSOR c FOR SHOW AUTHORS; DECLARE CURSOR c FOR SHOW CONTRIBUTORS; DECLARE CURSOR c FOR SHOW PROFILE; etc etc Giving end users the expectation that any command using the SHOW keyword should therefore be supported and is a feature is a bad idea IMO.
[11 Oct 2007 22:39]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/35411 ChangeSet@1.2594, 2007-10-11 17:38:40-03:00, davi@moksha.com.br +4 -0 Bug#29223 declare cursor c for SHOW ..... "DECLARE CURSOR FOR SHOW ..." is a syntax that currently appears to work, but is untested for some SHOW commands and does not work for other SHOW commands. Since this is an un-intended feature that leaked as a result of a coding bug (in the parser grammar), the correct fix is to fix the grammar to not accept this construct. In other words, "DECLARE CURSOR FOR SHOW <other commands that don't work>" is not considered a bug, and we will not implement other features to make all the SHOW commands usable inside a cursor just because someone exploited a bug.
[19 Oct 2007 20:52]
Bugs System
Pushed into 5.1.23-beta
[24 Oct 2007 21:09]
Paul DuBois
Noted in 5.1.23 changelog. Within a stored routine, it is no longer allowable to declare a cursor for a SHOW statement. This happened to work in some instances, but is no longer supported.
