PL/SQL parser
(MDEV-10142)
|
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Parser, Stored routines |
| Affects Version/s: | None |
| Fix Version/s: | 10.3.0 |
| Type: | Technical task | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Compatibility | ||
| Issue Links: |
|
||||||||
| Sprint: | 10.2.2-3, 10.2.2-1, 10.2.2-2, 10.2.2-4, 10.1.18 | ||||||||
| Description |
|
Understand explicit cursor attributes when running in sql_mode=ORACLE:
Due to a grammar conflict, this task will remove the modulo operator '%'. One should use MOD in Oracle. This task will also implement the predefined exception INVALID_CURSOR. If a cursor is not open, referencing it with %FOUND, %NOTFOUND, or %ROWCOUNT raises INVALID_CURSOR. If a cursor is closed and then opened again, %FOUND and %NOTFOUND are reset to NULL and %ROWCOUNT is reset to 0. Note, we'll also change behavior of the FETCH statement to raise no conditions (exceptions) if no rows were returned. Instead of catching conditions, in Oracle one should test %FOUND or %NOTFOUND attributes to know if FETCH returned a row. Example:
|