-
Notifications
You must be signed in to change notification settings - Fork 335
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
GetDouble and GetFloat less type auto conversion #664
Comments
MySqlConnector currently only performs a small number of known "safe" conversions; see #481 and #406. Note that a Like similar issues, this needs testing in AdoNetApiTest first. |
Added to AdoNetApiTest: mysql-net/AdoNetApiTest@2a48acc Conversions from a decimal column (or implicit decimal result) will be handled automatically by |
Fix shipped in 0.57.0-rc1. |
thanks |
simple example:
using (var reader = new MySqlCommand("select 1 / 3 from tablename", conn).ExecuteReader())
{
reader.Read();
reader.GetDouble(0); // InvalidCastException
reader.GetFloat(0); // InvalidCastException
}
The text was updated successfully, but these errors were encountered: