-
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
Crash in the mysql driver when decoding short decimal values as f64 #2691
Comments
IMHO this isn't a bug and that conversion should not be done by The conversion |
I don't think it would be an issue to return an error in this case. But currently, sqlx does not return an error, it crashes the entire program. |
just checking some opening issues to evaluate how stable and robust this crate is and is it ready to be used in production. It seems some philosophies behind are potentially very risky. This issue is indeed a bug and a very bad bug because it will crash the whole program which is definitely unacceptable in production. Be very careful to use |
We'd appreciate a PR. I'd just check that the binary length is either 4 or 8, or return an error. |
@abonander I have a link to the fix in my initial comment, if you want. |
I saw your patch, but I agree with @ebissi. The bug is simply that |
Bug Description
the mysql driver crashes the entire program when decoding short decimal values as f64
see the fix in sqlx-oldapi: sqlpage@db000fb
The text was updated successfully, but these errors were encountered: