Bug #103411 Mysql.Data 8.0.25 - Entity framework
Submitted: 21 Apr 2021 19:31 Modified: 31 May 2021 12:37
Reporter: Matasci Sacha Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:8.0.25 OS:Any
Assigned to: CPU Architecture:Any

[21 Apr 2021 19:31] Matasci Sacha
Description:
Hi,
I've upgraded to 8.0.24 but the problem still remain.

Exception: 'MySql.Data.MySqlClient.MySqlException' in MySql.Data.dll
Table 'dbname.user.table' doesn't exist

It only works if dbname and user is the same. If it is different it comes this exception.

See Bug #101236

How to repeat:
// Initialize the connection string builder for the underlying provider.
var sqlBuilder = new MySqlConnectionStringBuilder
{
    Server = "servername",
    Database = "dbname",
    UserID = "user",
    Password = "password",
    PersistSecurityInfo = true,
    SslMode = MySqlSslMode.None 
};

// Initialize the EntityConnectionStringBuilder.
var entityBuilder = new EntityConnectionStringBuilder
{
    Provider = "MySql.Data.MySqlClient",
    ProviderConnectionString = sqlBuilder.ToString(),
    Metadata = @"res://*/LocalizationService.Database.DBModel.csdl|res://*/LocalizationService.Database.DBModel.ssdl|res://*/LocalizationService.Database.DBModel.msl"
};

_entityconnessione = new EntityConnection(entityBuilder.ToString());

This is the connection string generated...
metadata=res://*/Database.DBModel.csdl|res://*/Database.DBModel.ssdl|res://*/Database.DBModel.msl;provider=MySql.Data.MySqlClient;provider connection string="server=server;database=dbname;user id=user;password=password;port=3306;sslmode=None;persistsecurityinfo=True"

This is the exception
MySql.Data.MySqlClient.MySqlException: 'Table 'dbname.user.table' doesn't exist'
[27 Apr 2021 11:08] MySQL Verification Team
Hello Matasci Sacha,

Thank you for the bug report.
Could you please provide repeatable test case (sample project, etc. - please make it as private if you prefer) to confirm this issue at our end?

Regards,
Ashwini Patil
[27 Apr 2021 11:10] Matasci Sacha
Hi,

the problem is the same as the Bug #101236

Thank you.
[27 Apr 2021 11:18] MySQL Verification Team
Hello Matasci Sacha,

Yes, actually we used the project which was shared by one of the user in the bug #101236 as a reference to reproduce the issue before and then fixed the bug based on that, but it seems that you are using a different approach. That’s why we are asking you for a test project. Thanks.

Regards,
Ashwini Patil
[27 Apr 2021 12:28] Matasci Sacha
Hi,
the code for the connection is the same (Entity Framework library). 
The only difference is that I'm generating the connection string by code and I don't read it from app/web.config
[11 May 2021 21:13] Matasci Sacha
Hi,
I've upgraded to 8.0.25 but the problem still remain.

Thank you for your support.
[31 May 2021 12:37] MySQL Verification Team
Hello Matasci Sacha,

Thank you for the feedback.
Imho this is duplicate of Bug #101236, please see Bug #101236.

Regards,
Ashwini Patil