Skip to content
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

[Announcement] Drop MySQL.Data support #3145

Closed
MaceWindu opened this issue Jul 31, 2021 · 9 comments
Closed

[Announcement] Drop MySQL.Data support #3145

MaceWindu opened this issue Jul 31, 2021 · 9 comments

Comments

@MaceWindu
Copy link
Contributor

MaceWindu commented Jul 31, 2021

Looking for feedback regarding possible removal of MySQL.Data mysql provider support in v4 and support only MySqlConnector provider.

MySQL.Data disadvantages (only biggest, there are more of them):

  • no async API
  • multiple known issues not fixed for ages with almost each release introducing new regressions. E.g. check this list

MySQL.Data advantages:

  • none? post yours below

Note that it shouldn't be breaking change for EF.Core integration as pomelo.mysql use MySqlConnector.

What this removal means for users:

  • linq2db.mysql T4 nuget will be obsoleted and users will need to switch to T4 nuget for MySqlConnector. Note that we probably will obsolete all T4 nugets in v4 (not decided yet) as we plan to switch to new scaffolding tools in v4
  • if user used mysql.data classes in code directly - he will need to update used namespaces
  • user should update nuget reference from mysql.data to mysqlconnector in his projects
  • user must check migration notes for mysqlconnector to enusure his connection strings are compatible (alongside with other checks on that page)
@MaceWindu
Copy link
Contributor Author

Added PR #3238, that removes provider support. If anyone have objections for this removal, you should rise them now...

@pebezo
Copy link
Contributor

pebezo commented Oct 12, 2021

Do you have an example on how to use MySqlConnector with LINQ2DB? Simply replacing the nuget references doesn't seem to be sufficient as I'm getting System.InvalidOperationException : Cannot load assembly MySql.Data

@MaceWindu
Copy link
Contributor Author

After removal it will be enough to replace nuget, but for now you need to specify proper provider. I don't know how you configure your connection, so it's hard to say how to fix it for YOU. In general you need to change providerName option of your connection.

@pebezo
Copy link
Contributor

pebezo commented Oct 12, 2021

If case this helps anyone else: We have a custom class that inherits from MySqlDataProvider. The trick was to pass the "MySqlConnector" string in the base constructor.

@MaceWindu referencing linq2db.MySqlConnector brings over a bunch of .ttinclude files from LinqToDB.Templates. Is there any way to opt out of that? Thanks.

@MaceWindu
Copy link
Contributor Author

MaceWindu commented Oct 12, 2021

You don't need to reference any of linq2db.DB nugets if you don't use T4 templates. Just reference linq2db and MySqlConnector directly

@pebezo
Copy link
Contributor

pebezo commented Oct 12, 2021

That did the trick, thank you! All our integration tests (against a real db) passed with MySqlConnector v1.3.13. I will later test in dev then prod. If I hit any issues compared to MySql.Data I'll let you know, but so far so good.

@MaceWindu
Copy link
Contributor Author

MaceWindu commented Nov 3, 2021

On hold, need to check if we can provide support for big decimals. Basically only feature MySqlConnector miss compared to MySql.Data. mysql-net/MySqlConnector#1070

@MaceWindu
Copy link
Contributor Author

Facing strong opposition inside team, we will preserve mysql.data support for now :)

@MaceWindu MaceWindu unpinned this issue Feb 18, 2022
@MaceWindu
Copy link
Contributor Author

Still it is highly discouraged from use due to low quality

@MaceWindu MaceWindu removed this from the 4.0.0 milestone Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants