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

privilege/privileges: don't reuse chunk in loadTable function #6976

Merged
merged 3 commits into from
Jul 4, 2018

Conversation

tiancaiamao
Copy link
Contributor

What have you changed? (mandatory)

Don't reuse chunk in loadTable function.
The memory from the chunk is shallow copy, and MySQLPrivilege struct data may be overwritten sometime later, lead to weird TiDB behavior.

What are the type of the changes (mandatory)?

  • Bug fix (non-breaking change which fixes an issue)

PTAL @XuHuaiyu @zz-jason @coocood

@tiancaiamao tiancaiamao added the type/bugfix This PR fixes a bug. label Jul 4, 2018
@coocood
Copy link
Member

coocood commented Jul 4, 2018

LGTM

@coocood coocood added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 4, 2018
for {
// WARNNING: decodeTableRow decodes data from a chunk Row, that is a shallow copy.
Copy link
Contributor

Choose a reason for hiding this comment

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

I hardly saw "WARNNING" in codebase, but Note or NOTE.

zz-jason
zz-jason previously approved these changes Jul 4, 2018
Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@shenli
Copy link
Member

shenli commented Jul 4, 2018

/run-all-tests tidb-test=pr/562

@zz-jason zz-jason added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 4, 2018
@tiancaiamao
Copy link
Contributor Author

CI is currently down...

@tiancaiamao
Copy link
Contributor Author

/run-all-tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants