[MDEV-15941] Explicit cursor FOR loop does not close the cursor Created: 2018-04-20 Updated: 2018-06-20 Resolved: 2018-06-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Stored routines |
| Affects Version/s: | 10.3 |
| Fix Version/s: | 10.3.8 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I run this script:
It ends successfully. This is wrong. The FOR loop for an explicit cursor should close the cursor. In fact it does not seem to, so FETCH and CLOSE are still possible with this cursor after the loop. In Oracle, the cursor is in closed state after the loop. So attempts to use it with FETCH (or CLOSE) after the loop return an error:
|