-
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
executor: special handling is required when an "auto id out of range" error occurs in insert ignore into ... on on duplicate ...
#39847
Merged
Merged
Changes from 21 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
4abb091
remove unnecessary checks during inserts
Dousir9 9b10da2
add test case
Dousir9 aab8392
add IgnoreTruncate and TruncateAsWarning support for autoid.ErrAutoin…
Dousir9 463cfcc
Handling the special case of
Dousir9 fee23b1
fixed a bug that returned an incorrect err
Dousir9 68c27fa
Merge branch 'master' into fix-38950
Dousir9 90fcc44
test
Dousir9 e67f6fb
Merge branch 'fix-38950' of github.com:Dousir9/tidb into fix-38950
Dousir9 80936ea
test
Dousir9 daeca72
Merge branch 'master' into fix-38950
hawkingrei 9ca314b
Merge branch 'master' into fix-38950
Dousir9 d532251
test
Dousir9 6e27ed9
Merge branch 'fix-38950' of github.com:Dousir9/tidb into fix-38950
Dousir9 7f7eedb
Merge branch 'master' into fix-38950
Dousir9 f81fb79
Merge branch 'master' into fix-38950
Dousir9 a6a948a
Merge branch 'master' into fix-38950
Dousir9 f06381f
Merge branch 'master' into fix-38950
hawkingrei 17badfb
check if the type cast is ok to avoid panic
Dousir9 8b966db
Merge branch 'fix-38950' of github.com:Dousir9/tidb into fix-38950
Dousir9 8892c7b
Merge branch 'master' of github.com:pingcap/tidb into fix-38950
Dousir9 7649f61
change the name of the test case
Dousir9 c2b9f01
Update executor/writetest/write_test.go
Dousir9 b11a896
Update executor/writetest/write_test.go
Dousir9 cd41491
minor
Dousir9 69bee57
update comment
Dousir9 b084390
Merge branch 'master' into fix-38950
Dousir9 e48180a
Merge branch 'master' into fix-38950
Dousir9 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
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.
Please add some test cases for it.
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.
maybe we should add a check about core.Insert.IsReplace in this line 🤔
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.
yes, this also works, but we can put
sc := ctx.GetSessionVars().StmtCtx
andinsertPlan, ok := sc.GetPlan().(*core.Insert)
inside the if statement block to avoid more calls.