Skip to content
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

*: Show key content in DuplicateEntry error message #828

Merged
merged 3 commits into from
Jan 5, 2016
Merged

Conversation

shenli
Copy link
Member

@shenli shenli commented Jan 5, 2016

Fix: #822

return errors.Trace(us.lazyConditionPairs.Delete(k))
func (us *unionStore) markLazyConditionPair(k Key, v []byte, e error) error {
us.lazyConditionPairs[string(k)] = &conditionPair{
key: k,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Key should be cloned before store in map, the caller may change the content after calling Get().
Or maybe we can use the map key directly in later check, then no need to store it here.

@disksing
Copy link
Contributor

disksing commented Jan 5, 2016

LGTM

@shenli
Copy link
Member Author

shenli commented Jan 5, 2016

@coocood PTAL

@coocood
Copy link
Member

coocood commented Jan 5, 2016

LGTM

shenli added a commit that referenced this pull request Jan 5, 2016
*: Show key content in DuplicateEntry error message
@shenli shenli merged commit 81359df into master Jan 5, 2016
@shenli shenli deleted the shenli/issue-822 branch January 5, 2016 13:44
@shenli shenli mentioned this pull request Jan 5, 2016
xhebox pushed a commit to xhebox/tidb that referenced this pull request Sep 28, 2021
xhebox pushed a commit to xhebox/tidb that referenced this pull request Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants