-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WL#6312: Referencing new row in INSERT ... VALUES ... ODKU statements
Extend the INSERT .. VALUES/SET .. ON DUPLICATE KEY UPDATE syntax to make it possible to declare an alias for the new row and columns in that row, and refer to those aliases in the UPDATE expression. The intention with this new feature is to be able to replace VALUES(<expression>) clauses with row and column alias names. INSERT .. SELECT .. ON DUPLICATE KEY UPDATE is not affected. Named references to the old and new row are already possible in these statements. A derived table is created as the VALUES alias to resolve references to the new rows from within update expressions. The field_translations of the derived table are initialized with Item_insert_values, which resolve directly to the insert_values buffer of the insert table. The name of the table being updated is now a valid reference to the old row in the scope of an ODKU clause. func_misc-bug19601730.test is thus changed to allow such references. Change-Id: I979b72f76e5fcf9f3af88acf1c8d06674179bd44
- Loading branch information
Thomas Aven
committed
Aug 8, 2019
1 parent
7b9e3af
commit c39355e
Showing
11 changed files
with
888 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.