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

server: fix resultType/flag of enum&set column #7417

Merged
merged 3 commits into from Aug 17, 2018

Conversation

@lysu
Copy link
Member

commented Aug 16, 2018

What problem does this PR solve?

fixes #6910

In MySQL-protocol for enum and set type, server send column-metadata as string type and remark enum or set in flag field.

maybe see:
https://github.com/mysql/mysql-server/blob/99a4c9262047edce8bb67086d22f745c67afe2ef/sql/field.h#L4165

https://github.com/mysql/mysql-server/blob/99a4c9262047edce8bb67086d22f745c67afe2ef/sql/field.h#L4225

What is changed and how it works?

modify ColumnInfo#Dump()(write metadata stage) to return special type, and doesn't modify column.type, because later we will use it to write data stage.

Check List

Code changes

  • Change response

Side effects

  • no

Related changes

  • Need to cherry-pick to the release branch
  • Need to be included in the release note

This change is Reviewable

@zz-jason

This comment has been minimized.

Copy link
Member

commented Aug 16, 2018

does type bit have the same issue?

@lysu lysu force-pushed the lysu:dev-fix-result-type branch from 217f199 to 55b7a77 Aug 16, 2018
@lysu lysu force-pushed the lysu:dev-fix-result-type branch from 55b7a77 to ba1c36d Aug 16, 2018
@lysu

This comment has been minimized.

Copy link
Member Author

commented Aug 16, 2018

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

@lysu lysu removed the status/WIP label Aug 16, 2018
@lysu

This comment has been minimized.

Copy link
Member Author

commented Aug 16, 2018

it seems bit is ok and no magic, only enum/set return a different type - -|||

@zz-jason

This comment has been minimized.

Copy link
Member

commented Aug 16, 2018

OK, LGTM

@coocood

This comment has been minimized.

Copy link
Member

commented Aug 16, 2018

LGTM

@coocood coocood added status/LGT2 and removed status/LGT1 labels Aug 16, 2018
ngaut added 2 commits Aug 16, 2018
@ngaut
ngaut approved these changes Aug 17, 2018
@ngaut ngaut merged commit 57f1914 into pingcap:master Aug 17, 2018
4 checks passed
4 checks passed
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci-tidb/build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details
@lysu lysu changed the title server: fix column info for resultType/flag for enum&set type. server: fix resultType/flag of enum&set column Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.