-
-
Notifications
You must be signed in to change notification settings - Fork 190
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
Problems with MySQL Connector/NET (Mysql.Data) and go-mysql-server #2501
Comments
This is seemingly the correct type for this field. MySQL Connector/NET expects this for servers >8.0.1: https://github.com/mysql/mysql-connector-net/blob/8.4.0/MySQL.Data/src/SchemaProvider.cs#L298-L300 Fixes dolthub#2501
Just to clarify. The problem we identified was the the ASP.NET server died with an invalid cast exception, stating that it cannot cast from a boxed int32 object to an uint32. A boxed type can only be cast to the type that is boxed. The code in MySQL Connector/NET therefore would suggest that the correct wire type of SEQ_IN_INDEX is in fact uint32 and not int32. |
We are reviewing your submitted PR now. Sorry we missed it this morning. Good bug find and fix! |
* Use Uint32 for SEQ_IN_INDEX in 'SHOW INDEXES' queries. This is seemingly the correct type for this field. MySQL Connector/NET expects this for servers >8.0.1: https://github.com/mysql/mysql-connector-net/blob/8.4.0/MySQL.Data/src/SchemaProvider.cs#L298-L300 Fixes #2501 --------- Co-authored-by: James Cor <james@dolthub.com>
Hello,
We've identified a compatibility problem in go-mysql-server when used with MySQL Connector/NET.
We have an internal ASP.NET Core project using NHibernate for which use Dolt when developing locally.
When using NHibenrate's SchemaUpdate, it eventually calls into SchemaProvider.GetIndexesAsync, which fails with an invalid cast (from Int32 -> UInt32).
Relevant code is here: https://github.com/mysql/mysql-connector-net/blob/8.4.0/MySQL.Data/src/SchemaProvider.cs#L298-L300
Seemingly, the cast from object to UInt32 would suggest that the wire-type of SEQ_IN_INDEX is uint32 instead of the current int32:
https://github.com/dolthub/go-mysql-server/blob/v0.18.1/sql/plan/show_indexes.go#L78
I tried changing this and re-building go-mysql-server and Dolt, and it worked for me. I am not sure if this is the correct fix -- but it works for us. I will submit a PR momentarily.
The text was updated successfully, but these errors were encountered: