-
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
server: check LOAD DATA is into a base table (#20924) #21638
server: check LOAD DATA is into a base table (#20924) #21638
Conversation
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
/run-all-tests |
@nullnotnil you're already a collaborator in bot's repo. |
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.
LGTM
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.
LGTM
@tangenta, @wjhuang2016, @ngaut, PTAL. |
/merge |
Sorry @qw4990, this branch cannot be merged without an approval of release maintainers. |
/merge |
Sorry @qw4990, this branch cannot be merged without an approval of release maintainers. |
/run-all-tests |
/rebuild |
cherry-pick #20924 to release-4.0
What problem does this PR solve?
Issue Number: Fixes #20880
Problem Summary:
What is changed and how it works?
What's Changed:
Before loading data using
LOAD DATA
, a check if performed to make sure that the table is of type base table.How it Works:
I have a PR on pingcap/parser#1080 to add an explicity
IsBaseTable()
function, which I think will be useful in other cases such as infoschema.Note: The error code is a generic one. TiDB does not allow insertable views (differing from MySQL), and MySQL does not support sequences.
Related changes
Check List
Tests
Side effects
Release note
LOAD DATA
statement can only load data into base tables.