-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
privilege: remove any string concat #22523
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
154506a
privilege: remove any string concat
morgo 53f44d2
Merge remote-tracking branch 'upstream/master' into fix-priv-sql-api
morgo bf9f9e3
Add comment on privileges source
morgo 199c105
Merge branch 'master' into fix-priv-sql-api
AilinKid 3680748
Merge remote-tracking branch 'upstream/master' into fix-priv-sql-api
morgo 8f319f7
fix merge from master, change to ExecuteInternal
morgo c856b4e
Merge branch 'fix-priv-sql-api' of github.com:morgo/tidb into fix-pri…
morgo 24a654b
Merge branch 'master' into fix-priv-sql-api
ti-srebot 05cf4eb
Merge branch 'master' into fix-priv-sql-api
ti-srebot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Oops, something went wrong.
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.
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.
I would like to keep this dynamic array. Won't we add more privUserCol in the future?
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.
In theory actually it should become rare. The new privileges added to MySQL are usually added with something called
DYNAMIC
privileges. We have a spec for adding it here: #22486We have already extended the privileges table prior to add ad-hoc DYNAMIC privileges. I don't think we need to migrate these yet, but it does actually break MySQL compatibility since a mysqldump becomes non-restorable.
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.
It makes sense to me, though. I wonder that there should be a comment at the
mysql.Priv2UserCol
to remind the update of tidb.It is also rare that internal column names will cause problems, even if they are using string concat. The new API could handle the problem, too.
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.
Lets see what @tiancaiamao thinks. I am happy to take either approach, but prefer the comment if he is okay with that.