Bug #8299 | Allow FOR SELECT syntax extension | ||
---|---|---|---|
Submitted: | 3 Feb 2005 22:04 | Modified: | 27 May 2006 12:04 |
Reporter: | Paul van Rossem | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server | Severity: | S4 (Feature request) |
Version: | 5.0 | OS: | Any (all) |
Assigned to: | CPU Architecture: | Any |
[3 Feb 2005 22:04]
Paul van Rossem
[30 Jun 2005 7:56]
Roland Bouman
Hi Paul! I agree totally. The FOR syntax is supported by Oracle too, and it also gets rid of the usual problem with this REPEAT syntax: Suppose you had other work in your loop, right after the fetch, but before the UNTIL...END REPEAT, then you must ensure that your cursor would fetch at least one record. Else, the work would be executed without a successfull fetch. Of course, on could work round this by adding an IF..END IF, but this is all very cumbersome.
[30 Jun 2005 8:02]
Paul van Rossem
Another problem with this syntax is that the CONTINUE HANDLER FOR NOT FOUND can be activated by many more reasons than just the end of the cursor. So this construction is inherent buggy.
[11 Apr 2006 14:55]
Roland Bouman
similar on verified: http://bugs.mysql.com/bug.php?id=18845&thanks=3¬ify=67
[27 May 2006 12:04]
Valeriy Kravchuk
Duplicate of bug #18845.