mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-15703: Crash in EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 (a INT DEFAULT ?)' USING DEFAULT
This patch fixes the issue with passing the DEFAULT or IGNORE values to positional parameters for some kind of SQL statements to be executed as prepared statements. The main idea of the patch is to associate an actual value being passed by the USING clause with the positional parameter represented by the Item_param class. Such association must be performed on execution of UPDATE statement in PS/SP mode. Other corner cases that results in server crash is on handling CREATE TABLE when positional parameter placed after the DEFAULT clause or CALL statement and passing either the value DEFAULT or IGNORE as an actual value for the positional parameter. This case is fixed by checking whether an error is set in diagnostics area at the function pack_vcols() on return from the function pack_expression()
This commit is contained in:
committed by
Oleksandr Byelkin
parent
6b2cd78695
commit
e48bd474a2
@ -1349,9 +1349,9 @@ DELIMITER ;$$
|
||||
VALUES (IGNORE);
|
||||
--error ER_UNKNOWN_ERROR
|
||||
VALUES (DEFAULT);
|
||||
--error ER_UNKNOWN_ERROR
|
||||
--error ER_INVALID_DEFAULT_PARAM
|
||||
EXECUTE IMMEDIATE 'VALUES (?)' USING IGNORE;
|
||||
--error ER_UNKNOWN_ERROR
|
||||
--error ER_INVALID_DEFAULT_PARAM
|
||||
EXECUTE IMMEDIATE 'VALUES (?)' USING DEFAULT;
|
||||
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user