-
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
*: do not return row not match parition error when using update ingore
#50134
Merged
Merged
Changes from all commits
Commits
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ partition by list (id*2 + b*b + b*b - b*b*2 - abs(id)) ( | |
partition p0 values in (3,5,6,9,17), | ||
partition p1 values in (1,2,10,11,19,20), | ||
partition p2 values in (4,12,13,14,18), | ||
partition p3 values in (7,8,15,16,null) | ||
partition p3 values in (7,8,15,16,27,null) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This modification here is to make the later test stable:
Without this line of change, there will be two errors in the statement and any of them can be returned first. |
||
); | ||
analyze table t; | ||
## Test add unique index failed. | ||
|
@@ -812,3 +812,31 @@ select * from tIssue989; | |
a b | ||
111 2 | ||
set @@session.tidb_enable_table_partition = default; | ||
drop table if exists insert_update_ignore_test; | ||
create table insert_update_ignore_test (a int) partition by range (a) (partition p0 values less than (100), partition p1 values less than (200)); | ||
insert ignore into insert_update_ignore_test values(1000); | ||
show warnings where Message not like '%disable dynamic pruning%'; | ||
Level Code Message | ||
Warning 1526 Table has no partition for value 1000 | ||
insert ignore into insert_update_ignore_test partition(p0) values(101); | ||
show warnings where Message not like '%disable dynamic pruning%'; | ||
Level Code Message | ||
Warning 1748 Found a row not matching the given partition set | ||
select * from insert_update_ignore_test; | ||
a | ||
insert into insert_update_ignore_test values(1); | ||
update ignore insert_update_ignore_test set a=1000; | ||
show warnings where Message not like '%disable dynamic pruning%'; | ||
Level Code Message | ||
Warning 1526 Table has no partition for value 1000 | ||
select * from insert_update_ignore_test; | ||
a | ||
1 | ||
update ignore insert_update_ignore_test partition(p0) set a=101; | ||
show warnings where Message not like '%disable dynamic pruning%'; | ||
Level Code Message | ||
Warning 1748 Found a row not matching the given partition set | ||
select * from insert_update_ignore_test; | ||
a | ||
1 | ||
drop table insert_update_ignore_test; |
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
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
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.
We should append error to warning when "update/insert ignore" to keep the behavior same with mysql