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

commented Jul 4, 2018

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

@coocood

This comment has been minimized.

Copy link
Member

commented Jul 4, 2018

LGTM

@coocood coocood added the status/LGT1 label Jul 4, 2018
for {
// WARNNING: decodeTableRow decodes data from a chunk Row, that is a shallow copy.

This comment has been minimized.

Copy link
@zhexuany

zhexuany Jul 4, 2018

Member

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

Copy link
Member

left a comment

LGTM

@shenli

This comment has been minimized.

Copy link
Member

commented Jul 4, 2018

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

@zz-jason zz-jason added status/LGT2 and removed status/LGT1 labels Jul 4, 2018
@tiancaiamao

This comment has been minimized.

Copy link
Contributor Author

commented Jul 4, 2018

CI is currently down...

@tiancaiamao

This comment has been minimized.

Copy link
Contributor Author

commented Jul 4, 2018

/run-all-tests

@shenli shenli merged commit 1310996 into pingcap:master Jul 4, 2018
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
ci/circleci Your tests passed on CircleCI!
Details
license/cla Contributor License Agreement is signed.
Details
tiancaiamao added a commit to tiancaiamao/tidb that referenced this pull request Jul 4, 2018
@tiancaiamao tiancaiamao deleted the tiancaiamao:privilege-chunk branch Jul 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.