Skip to content

Fix binary flag test in cext. #51

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

Closed
wants to merge 1 commit into from

Conversation

fsaric
Copy link

@fsaric fsaric commented Jun 17, 2019

MySQL Connector 8.0.16 with cext tries to decode binary values as unicode strings because it fails to detect when a BINARY_FLAG is set on a MySQL value.

The old test !((flags != NULL) & flags & BINARY_FLAG) is always 1 (i.e. it assumes the field is not binary).

This fix also allows MySQL connector to work seamlessly with SQLAlchemy (without any unicode/binary conversion issues).

@mysql-oca-bot
Copy link

Hi, thank you for submitting this pull request. In order to consider your code we need you to sign the Oracle Contribution Agreement (OCA). Please review the details and follow the instructions at http://www.oracle.com/technetwork/community/oca-486395.html
Please make sure to include your MySQL bug system user (email) in the returned form.
Thanks

@mysql-oca-bot
Copy link

Hi, there was no response to our request to sign an OCA or confirm the code is submitted under the terms of the OCA. As such this request will be closed.
Thanks

@mysql-oca-bot
Copy link

Hi, thank you for submitting this pull request. In order to consider your code we need you to sign the Oracle Contribution Agreement (OCA). Please review the details and follow the instructions at http://www.oracle.com/technetwork/community/oca-486395.html
Please make sure to include your MySQL bug system user (email) in the returned form.
Thanks

@fsaric
Copy link
Author

fsaric commented Jul 19, 2019

Hi! I have submitted the OCA. You can find my name (Frane Saric) in the published list.

@fsaric fsaric force-pushed the mysql_binary_flag_fix branch from b09fdde to 9cac978 Compare July 22, 2019 21:34
@mysql-oca-bot
Copy link

Hi, there was no response to our request to sign an OCA or confirm the code is submitted under the terms of the OCA. As such this request will be closed.
Thanks

@methane
Copy link

methane commented Aug 18, 2019

FYI, checking flag & BINARY_FLAG is wrong way to distinguish binary and texts.
It's binary when charsetnr == 63, otherwise it's text.

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