Bug #88427 Plain authentication fails to set the default database when using the X DevAPI
Submitted: 9 Nov 2017 22:02 Modified: 14 Nov 2017 22:05
Reporter: JOSE RAMIREZ Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:8.0.9 OS:Any
Assigned to: CPU Architecture:Any

[9 Nov 2017 22:02] JOSE RAMIREZ
Description:
Setting the "database=xxx" option in the connection string when using the X DevAPI isn't working.

After creating a session, the Session.GetCurrentSchema() method returns null when it is expected to return a Schema object set with the default database specified in the connection string.

This behavior exists only when using the default PLAIN authentication. MYSQL41 works as expected.

How to repeat:
1. Create a session using a connection string that includes the "database" connection option.
2. Call the Session.GetCurrentSchema() method.
[9 Nov 2017 22:40] JOSE RAMIREZ
When authenticating using Plain the database was being omitted from the
authentication data, hence the default database was never set.
[14 Nov 2017 22:02] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Connector/NET 8.0.10 release, and here's the changelog entry:

When the PLAIN authentication option was used to make a secure connection,
the database name was excluded from the authenticating data and the database value 
was not set. PLAIN authentication is the default option for connections made with TLS or Unix Sockets.

Thank you for the bug report.
[14 Nov 2017 22:03] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Connector/NET 8.0.10 release, and here's the changelog entry:

When the PLAIN authentication option was used to make a secure connection,
the database name was excluded from the authenticating data and the database value 
was not set. PLAIN authentication is the default option for connections made with TLS or Unix Sockets.

Thank you for the bug report.