-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix encoding and decoding of MySQL enums in sqlx::Type
#3371
Conversation
As it turns out, we didn't actually have a comprehensive test covering enum encoding and decoding for MySQL, so it's not clear if it ever actually worked correctly. Because this PR was opened without context and the MySQL internal documentation is garbage, it took writing and running the test to actually understand the situation. (The C API documentation mentions this briefly but also lists The problem is that how MySQL interprets
I suspect it's expecting the integer encoding that's mainly used internally. Or it just doesn't like it altogether; I'm not really sure and I don't want to get into it. Both 5.7 and 8 return columns with Your change did result in the correct behavior, with one exception: MySQL doesn't appear to care about the I've taken the liberty of pushing my changes. Since it's still your PR, you'll get the credit in the CHANGELOG. I don't think this is a breaking change because it fixes something that never really worked in the first place. |
sqlx::Type
sqlx::Type
Thanks for the merge and your dedication and commitment. I love this library with all my heart. |
fixes #1241