-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Foreign_key_checks
a Vitess Aware variable
#14484
Merged
harshit-gangal
merged 29 commits into
vitessio:main
from
planetscale:fk-checks-vitess-aware
Nov 20, 2023
Merged
Make Foreign_key_checks
a Vitess Aware variable
#14484
harshit-gangal
merged 29 commits into
vitessio:main
from
planetscale:fk-checks-vitess-aware
Nov 20, 2023
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
Signed-off-by: Manan Gupta <[email protected]>
…ds bind vars Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
…e value Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
vitess-bot
bot
added
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
NeedsIssue
A linked issue is missing for this Pull Request
NeedsWebsiteDocsUpdate
What it says
labels
Nov 7, 2023
GuptaManan100
added
Type: Enhancement
Logical improvement (somewhere between a bug and feature)
Component: Query Serving
and removed
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
NeedsWebsiteDocsUpdate
What it says
NeedsIssue
A linked issue is missing for this Pull Request
labels
Nov 7, 2023
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
GuptaManan100
requested review from
harshit-gangal,
systay,
frouioui,
arthurschreiber and
deepthi
as code owners
November 9, 2023 09:53
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
… them Signed-off-by: Manan Gupta <[email protected]>
… having 2 comments and fix test expectations Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
vmg
approved these changes
Nov 17, 2023
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
harshit-gangal
approved these changes
Nov 20, 2023
Good change Manan! Ended up being much smaller than I expected ✨ |
Thank-you very much! 💕 |
This was referenced Nov 24, 2023
ejortegau
pushed a commit
to slackhq/vitess
that referenced
this pull request
Dec 13, 2023
Signed-off-by: Manan Gupta <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Component: Query Serving
Type: Enhancement
Logical improvement (somewhere between a bug and feature)
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.
Description
This PR makes
FOREIGN_KEY_CHECKS
as a Vitess aware variable. Planning gets affected because of this variable, so introducing Vitess managed foreign keys prompted this change. We now keep track of this variable in the session. This PR also adds the capability to the sqlparser to parse and read the optimiser hint comments to find the value ofFOREIGN_KEY_CHECKS
if specified as part of aSET_VAR
optimiser hint.Once this information has been processed, we store it in the vcursor and use this for planning. The plan hash has also been changed to take into account the foreign key checks state because the plans produced in different states are different and need to be cached separately.
Plan tests have been added and fuzzer changes have been made to test out this new functionality.
Related Issue(s)
Checklist
Deployment Notes