• Dmitry Shulga's avatar
    MDEV-15703: Crash in EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 (a INT DEFAULT ?)' USING DEFAULT · e48bd474
    Dmitry Shulga authored
    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()
    e48bd474
sql_base.cc 307 KB