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
@ -2594,9 +2594,9 @@ ERROR HY000: 'ignore' is not allowed in this context
|
||||
VALUES (DEFAULT);
|
||||
ERROR HY000: 'default' is not allowed in this context
|
||||
EXECUTE IMMEDIATE 'VALUES (?)' USING IGNORE;
|
||||
ERROR HY000: 'ignore' is not allowed in this context
|
||||
ERROR HY000: Default/ignore value is not supported for such parameter usage
|
||||
EXECUTE IMMEDIATE 'VALUES (?)' USING DEFAULT;
|
||||
ERROR HY000: 'default' is not allowed in this context
|
||||
ERROR HY000: Default/ignore value is not supported for such parameter usage
|
||||
#
|
||||
# MDEV-24675: TVC using subqueries
|
||||
#
|
||||
|
Reference in New Issue
Block a user