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

Identify ENUM and SET types correctly #19

Open
Deewiant opened this issue Nov 6, 2015 · 0 comments
Open

Identify ENUM and SET types correctly #19

Deewiant opened this issue Nov 6, 2015 · 0 comments

Comments

@Deewiant
Copy link

Deewiant commented Nov 6, 2015

ENUM and SET values show up with fieldType = String. This is actually an old upstream bug: https://bugs.mysql.com/bug.php?id=31134

But the documentation has in fact been updated to reflect the status quo: https://dev.mysql.com/doc/refman/5.7/en/c-api-data-structures.html

ENUM and SET values are returned as strings. For these, check that the type value is MYSQL_TYPE_STRING and that the ENUM_FLAG or SET_FLAG flag is set in the flags value.

It seems to me that this library could work around that inconsistency — or, at the very least, populate those flags into fieldFlags, to even make it possible to differentiate strings from enums and sets.

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

No branches or pull requests

1 participant