Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2(EOL), 10.3(EOL), 10.4(EOL)
-
None
Description
This script makes the server crash in a debug build:
SET sql_mode=STRICT_ALL_TABLES; |
CREATE OR REPLACE TABLE t1 (a INT); |
INSERT INTO t1 VALUES (10); |
DELIMITER $$
|
BEGIN NOT ATOMIC |
DECLARE a INT; |
DECLARE c CURSOR FOR SELECT NAME_CONST('x','y') FROM t1; |
OPEN c; |
FETCH c INTO a; |
CLOSE c; |
END; |
$$
|
DELIMITER ;
|
If I change sql_mode to empty, it works fine:
SET sql_mode=''; |
CREATE OR REPLACE TABLE t1 (a INT); |
INSERT INTO t1 VALUES (10); |
DELIMITER $$
|
BEGIN NOT ATOMIC |
DECLARE a INT; |
DECLARE c CURSOR FOR SELECT NAME_CONST('x','y') FROM t1; |
OPEN c; |
FETCH c INTO a; |
CLOSE c; |
END; |
$$
|
DELIMITER ;
|