Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
This problem is repeatable in bb-10.2-compatibility:
This script:
SET sql_mode=ORACLE; |
DROP PROCEDURE IF EXISTS p1; |
DELIMITER $$
|
CREATE PROCEDURE p1() AS |
x0 INT:=100; |
CURSOR cur(cp1 INT, cp2 INT) IS SELECT cp1+cp2; |
x1 INT:=101; |
BEGIN
|
OPEN cur(10,11); |
CLOSE cur; |
SELECT x0, x1; |
END; |
$$
|
DELIMITER ;
|
CALL p1();
|
returns:
+------+------+
|
| x0 | x1 |
|
+------+------+
|
| 100 | 10 |
|
+------+------+
|
This is wrong. x1 should stay eqial to 101.
Attachments
Issue Links
- blocks
-
MDEV-10142 PL/SQL parser
- Closed
- relates to
-
MDEV-10597 sql_mode=ORACLE: Cursors with parameters
- Closed
-
MDEV-10598 sql_mode=ORACLE: Variable declarations can go after cursor declarations
- Closed