• Rucha Deodhar's avatar
    MDEV-23178: Qualified asterisk not supported in INSERT .. RETURNING · 5518c320
    Rucha Deodhar authored
    Analysis: When we have INSERT/REPLACE returning with qualified asterisk in the
    RETURNING clause, '*' is not resolved properly because of wrong context.
    context->table_list is NULL or has incorrect table because context->table_list
    has tables from the FROM clause. For INSERT/REPLACE...SELECT...RETURNING,
    context->table_list has table we are inserting from. While in other
    INSERT/REPLACE syntax, context->table_list is NULL because there is no FROM
    clause.
    Fix: If filling fields instead of '*' for qualified asterisk in RETURNING,
    use first_name_resolution_table for correct resolution of item.
    5518c320
replace_returning.test 6.66 KB