Don't use non-unique indexes as functional dependencies in AND expressions.#2868
Merged
Don't use non-unique indexes as functional dependencies in AND expressions.#2868
Conversation
842766b to
0c4e082
Compare
max-hoffman
approved these changes
Mar 4, 2025
Contributor
max-hoffman
left a comment
There was a problem hiding this comment.
I suspect the change here is upstream of the root cause, but it's directionally correct and i agree the plan change is more of a testing artifact than a regression customers using statistics would see
This was referenced Mar 4, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This fixes a customer issue that was causing
Error 1105 (HY000): result max1Row iterator returned more than one rowWe can probably do better than this: we could tweak it so that adding a FD key on a non-unique index instead adds an implication that the non-unique index key determines the primary key.
But this is a simpler fix in the meantime that makes us more correct.