-
Notifications
You must be signed in to change notification settings - Fork 339
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
InvalidCastException when using StoredProcedure with MySQL 5.0 #1431
Comments
As per #1126 (comment), there is no available Docker image for Since MySQL 5.0 has been EOL for 12+ years, I'd strongly recommend upgrading to a newer server version. Alternatively, if you'd like to open a PR to add the support you need (with code that is entirely your original contribution and able to be licensed to this project), I'd be happy to review it. (It seems plausible that the fix is to test |
Hi Bradley, I'd like to open a PR to add the support please. |
How can I create a pull request or branch? I don't think I have the permission. |
Fixed by #1432. |
Fixed in 2.3.4. |
Software versions
MySqlConnector version: 2.2.6 or above
Server type: MySQL 5.0 (an old MySQL version, connection.Session.ServerVersion.Version < ServerVersions.RemovesMySqlProcTable)
Describe the bug
Got InvalidCastException in C# when use MySQLCommand (StoredProcedure) to ExecuteReader.
Unable to cast object of type 'System.String' to type 'System.Byte[]'.
The stored procedure has no input/output parameters, simply a select statement
BEGIN
select distinct(name) from tablename WHERE code LIKE 'ABC%';
END
The exception is when CachedProcedure.FillAsync force converting the String to byte[]
line 32: var returnsSqlBytes = (byte[]) reader.GetValue(1);
Exception
Code sample
Expected behavior
Should be able to use stored procedure with MySQL 5.0
The text was updated successfully, but these errors were encountered: