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
Merged

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

merged 3 commits into from
Aug 17, 2018

Conversation

lysu
Copy link
Contributor

@lysu lysu 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
Copy link
Member

does type bit have the same issue?

@lysu
Copy link
Contributor Author

lysu commented Aug 16, 2018

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

@lysu lysu removed the status/WIP label Aug 16, 2018
@lysu
Copy link
Contributor Author

lysu commented Aug 16, 2018

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

@zz-jason
Copy link
Member

OK, LGTM

@zz-jason zz-jason added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 16, 2018
@coocood
Copy link
Member

coocood commented Aug 16, 2018

LGTM

@coocood coocood added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Aug 16, 2018
@ngaut ngaut merged commit 57f1914 into pingcap:master Aug 17, 2018
@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
Development

Successfully merging this pull request may close these issues.

When the field list of the select statement contains the Enum type, the client will report an error
4 participants