Details
-
Technical task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3(EOL)
-
10.2.2-3, 10.2.2-1, 10.2.2-2, 10.2.2-4, 10.1.18
Description
The below script makes the server crash. Notice a syntax error in OPEN(a+,b);.
SET sql_mode=oracle; |
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (a INT, b VARCHAR(10)); |
INSERT INTO t1 VALUES (1,'A'); |
DROP PROCEDURE IF EXISTS p1; |
CREATE TABLE t1 (a INT, b VARCHAR(10)); |
DELIMITER $$
|
CREATE PROCEDURE p1(a INT,b VARCHAR) |
AS
|
CURSOR c (p_a INT, p_b VARCHAR) IS SELECT * FROM t1 WHERE a=p_a; |
BEGIN
|
OPEN c(a+, b); |
LOOP
|
FETCH c INTO a, b; |
EXIT WHEN c%NOTFOUND; |
SELECT a, b; |
END LOOP; |
CLOSE c; |
END; |
$$
|
DELIMITER ;
|
CALL p1(1,'a'); |
DROP TABLE t1; |
Attachments
Issue Links
- relates to
-
MDEV-10597 sql_mode=ORACLE: Cursors with parameters
- Closed