Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2(EOL), 10.3(EOL)
-
None
-
10.2.12
Description
This script crashes the server in debug builds:
DELIMITER $$
|
CREATE OR REPLACE PROCEDURE p1(OUT a VARCHAR(20)) |
BEGIN
|
SET a=10; |
END; |
$$
|
BEGIN NOT ATOMIC |
DECLARE a DATETIME; |
EXECUTE IMMEDIATE 'CALL p1(?)' USING a; |
END; |
$$
|
DELIMITER ;
|
Note, if I slightly rewrite the script not to use dynamic SQL, the crash disappears and a correct error is returned instead:
DELIMITER $$
|
CREATE OR REPLACE PROCEDURE p1(OUT a VARCHAR(20)) |
BEGIN
|
SET a=10; |
END; |
$$
|
BEGIN NOT ATOMIC |
DECLARE a DATETIME; |
CALL p1(a);
|
END; |
$$
|
DELIMITER ;
|
ERROR 1292 (22007): Incorrect datetime value: '10' for column 'a' at row 1
|