MySQL not working well
I run a mysql 8 database and as far as I understand I need third party drivers to get this to work (please correct me otherwise).
I tried IQ Driver but it refuses to connect to MySQL 8 (with it's not auth method 'cache_sha2_password')
I then tried Linq to DB Driver
But well... I see the tables but....
First off links are just null even tho there is correct foreign keys
Then, if I enable the rest of the query above (that is commented away) like so
You see that is has now taken a different row just because I included a select with a link to license (without the "FromLicense = x.License.Id") it would keep the same behaviour, so not really select that is the issue but rather the link.
I can force it like this
But this does not feel trustworthy, so please please include good MySql 8 support.
I tried IQ Driver but it refuses to connect to MySQL 8 (with it's not auth method 'cache_sha2_password')
I then tried Linq to DB Driver
But well... I see the tables but....
First off links are just null even tho there is correct foreign keys
Then, if I enable the rest of the query above (that is commented away) like so
You see that is has now taken a different row just because I included a select with a link to license (without the "FromLicense = x.License.Id") it would keep the same behaviour, so not really select that is the issue but rather the link.
I can force it like this
But this does not feel trustworthy, so please please include good MySql 8 support.
Comments
Regarding the third-party LINQ-to-DB driver, it sounds like it doesn't support lazy loading (which will be why the License link is null). As to why it picks a different row when adding the license in the projection, this is not a bug. It will be because the generated SQL will include a join (look at the SQL tab), which will result in MySQL producing a different query execution plan. If you don't specify an order, the database server is free to pick whatever it likes, and it can change depending on the query execution plan.
As it happens, right now I'm working on a built-in driver in LINQPad 6 that will support MySQL, SQLite, Oracle and Postgres, via EF Core. Would you be interested in beta-testing this when its released?
@JoeAlbahari: Yes I would be very intrested in testing the MySQL built in support
Let me know how you get along.