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
-
Activity
Field | Original Value | New Value |
---|---|---|
Summary | sql_mode=ORACLE: Syntax error in a OPEN cursor with parameters make the server crash | sql_mode=ORACLE: Syntax error in a OPEN cursor with parameters makes the server crash |
Link |
This issue relates to |
Status | Open [ 1 ] | In Progress [ 3 ] |
issue.field.resolutiondate | 2017-03-08 19:58:20.0 | 2017-03-08 19:58:20.26 |
Fix Version/s | 10.3.0 [ 22127 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Labels | need_review |
Parent |
|
|
Issue Type | Bug [ 1 ] | Technical task [ 7 ] |
Labels | need_review | Compatibility need_review |
Component/s | Stored routines [ 13905 ] |
Labels | Compatibility need_review | Compatibility |
Workflow | MariaDB v3 [ 79898 ] | MariaDB v4 [ 151784 ] |