VReplication: Qualify and SQL escape tables in created AutoIncrement VSchema definitions#17174
Merged
mattlord merged 4 commits intovitessio:mainfrom Nov 7, 2024
Merged
Conversation
…keyspace Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Contributor
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
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17174 +/- ##
==========================================
- Coverage 67.45% 67.44% -0.02%
==========================================
Files 1569 1569
Lines 252229 252244 +15
==========================================
- Hits 170150 170124 -26
- Misses 82079 82120 +41 ☔ View full report in Codecov by Sentry. |
dbussink
approved these changes
Nov 7, 2024
a39994d to
b286043
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
b286043 to
4ceed1c
Compare
notfelineit
reviewed
Nov 7, 2024
| if err != nil { | ||
| return err | ||
| } | ||
| seqTableName = fmt.Sprintf("%s.%s", seqKeyspace, seqTableName) |
notfelineit
approved these changes
Nov 7, 2024
Signed-off-by: Matt Lord <mattalord@gmail.com>
rohit-nayak-ps
approved these changes
Nov 7, 2024
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.
Description
This is a follow-up to #16860 that addresses a couple of potential edge cases when we automatically replace the auto increment handling:
This PR addresses those respectively by 1) ensuring that the sequence table name is always properly SQL escaped 2) qualifying the sequence table with the keyspace and ensuring that the keyspace name is also properly SQL escaped.
I think that we should backport this to v21 as it heads off potential bugs related to keyspaces and table names that must be SQL escaped along with potential bugs related to the non-qualified generated sequence names NOT being unique across all keyspaces in the Vitess cluster.
Related Issue(s)
Checklist