-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: fix panic in insert on conflict do update
There was an assumption that the row inserter and row updater had the same columns in the same order and if that wasn't the case row inserter's columns would be larger. This assumption is incorrect, so to fix it, when storing the existing rows (which are used to see if they conflicts with other rows further on in the statement) instead of storing the row used for inputs, convert the rows directly to those required by the row updater. Fixes #32834. Release note (bug fix): Fixed an issue in which if a nullable column wasn't supplied in an INSERT ON CONFLICT DO UPDATE statement, it may cause a panic.
- Loading branch information
1 parent
28340a5
commit 16071de
Showing
2 changed files
with
65 additions
and
7 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
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