Bug #18845 | Cursor traversal issues | ||
---|---|---|---|
Submitted: | 6 Apr 2006 12:29 | Modified: | 6 Apr 2006 12:50 |
Reporter: | Robin Schumacher | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Stored Routines | Severity: | S4 (Feature request) |
Version: | 5.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[6 Apr 2006 12:29]
Robin Schumacher
[6 Apr 2006 12:50]
Valeriy Kravchuk
Thank you for a reasonable feture requests.
[6 Apr 2006 23:00]
Konstantin Osipov
The standard-compliant syntax is: [<beginning_label>:] FOR <loop variable name> AS [<Cursor name> {SENSITIVE|ASENSITIVE|INSENSITIVE}] CURSOR FOR] <query expression> [ORDER BY clause] [updateability clause] DO <SQL statement>(s) END FOR [<end_label>] Effectively, a Cursor is open when the loop begins, fetched for each row of the result set, and closed when the loop ends. Execution of the loop body takes place for each row of the result set. Source: SQL99 Complete, Really MySQL doesn't support sensitive/asensitive/insensitive clause and FOR UPDATE clause, but we can add support for the following syntax: FOR <loop variable name> AS [<Cursor name> CURSOR FOR] <query expression> [ORDER BY clause] [updateability clause] DO <SQL statement>(s) END FOR
[7 Apr 2006 13:44]
Brian Aker
Konstantin, what would it take to add this?
[11 Apr 2006 14:55]
Roland Bouman
This would make http://bugs.mysql.com/bug.php?id=8299 a duplicate
[5 Feb 2008 14:18]
Paul van Rossem
Any thoughts / plans on implementing this or has this reasonable request completely been snowed under?