This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix adding new columns instead of updating them if one of the key values is a NULL in upserts. #4369
Merged
Conversation
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
richvdh
suggested changes
Jan 9, 2019
richvdh
suggested changes
Jan 9, 2019
richvdh
reviewed
Jan 9, 2019
synapse/storage/_base.py
Outdated
@@ -547,11 +547,19 @@ def _simple_upsert_txn(self, txn, table, keyvalues, values, insertion_values={}, | |||
if lock: | |||
self.database_engine.lock_table(txn, table) | |||
|
|||
def _getwhere(val): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given that val
is a key as opposed to a value, could it be called key
?
richvdh
approved these changes
Jan 9, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\o/ lgtm, assuming the CI passes
Codecov Report
@@ Coverage Diff @@
## develop #4369 +/- ##
===========================================
+ Coverage 73.68% 73.69% +<.01%
===========================================
Files 300 300
Lines 29815 29815
Branches 4895 4895
===========================================
+ Hits 21970 21971 +1
Misses 6407 6407
+ Partials 1438 1437 -1
Continue to review full report at Codecov.
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.