-
The default value for the
SslMode
connection option now differs based on the protocol used to make the connection. ThePreferred
mode has been reintroduced in this release (see Options for Both Classic MySQL Protocol and X Protocol). To summarize the defaultSslmode
values in the Connector/NET 8.0 (and 7.0) release series:Connector/NET 8.0.13:
Preferred
mode is the default for classic MySQL protocol connections only.Required
mode is the default for X Protocol connections only (Preferred
mode is not available for use with X Protocol).Connector/NET 8.0.8 to 8.0.12:
Preferred
mode is not supported for any connections.Required
mode is the default for both classic MySQL protocol and X Protocol connections.Connector/NET 7.0.0 to 7.0.7:
Preferred
mode is the default for both classic MySQL protocol and X Protocol connections. (Bug #28687769)
Document Store: An incremental improvement was made to the performance of session creation with a connection string. (Bug #28343655)
Support for EF Core 2.1 was added to Connector/NET 8.0.13 and support for EF Core 2.0 was discontinued in the same connector version. Other versions of Connector/NET continue to support EF Core 2.0 (see Entity Framework Core Support). (WL #12182)
-
The
ConnectionTimeout
connection option and property were reimplemented as theConnect-Timeout
option (and theConnectTimeout
property) for X Protocol operations. Some aspects of the timeout behavior were changed (see Options for X Protocol Only).The new
ConnectTimeout
property was added to theMySqlX.XDevAPI.MySqlXConnectionStringBuilder
class and the existingConnectionTimeout
property was removed.No modifications were made to the existing implementation of the
ConnectionTimeout
option (or property) for classic MySQL operations. (WL #12177) -
Connector/NET now provides connection pooling for applications using the X Protocol. The implementation includes the new static
MySQLX.GetClient
method that takes two parameters:
(connection string or URI) andconnectionData
(JSON-formatted string or anonymous object containing the pooling options). Method overloading enables the following type combinations:connectionOptions
MySQLX.GetClient(Object, Object) MySQLX.GetClient(Object, String) MySQLX.GetClient(String, Object) MySQLX.GetClient(String, String)
GetClient
returns the newClient
object, which retrieves an existing and currently unused network connection from the pool, resets it, and uses it. Closing a session marks the underlying connection as unused and returns it to the pool. Connection options are configured as follows:// Connection options of type String Client client = MySQLX.GetClient(ConnectionData, "{ \"pooling\": { \"maxSize\": 5, \"queueTimeout\": 5000 } }"); // Connection options of type Object (anonymous object) Client client = MySQLX.GetClient(ConnectionData, new { pooling = new { maxSize = 5, queueTimeout = 5000 } });
The
new
keyword must be used twice when the connection options are configured using an anonymous object. Connection options are:enabled
,maxSize
,maxIdleTime
, andqueueTimeout
. For more information, see Connection and Session Concepts. (WL #11841)
The
CreateCommandBuilder
andCreateDataAdapter
methods were added toMySqlClientFactory
class. Thanks to Cédric Luthi for the patch. (Bug #28560189, Bug #92206)Document Store: Connector-side validation performed when the
Collection.CreateIndex
method was called duplicated some of the checks already made by the server. The connector now only validates that theindexDefinition
value passed to the method is a valid JSON document with the correct structure. (Bug #28343828)EF Core: An invalid syntax error was generated when a new property (defined as numeric, has a default value, and is not a primary key) was added to an entity that already contained a primary-key column with the
AUTO_INCREMENT
attribute. This fix validates that the entity property (column) is a primary key first before adding the attribute. (Bug #28293927)Connector/NET returned the wrong time zone when the
TIMESTAMP
column was read from a MySQL table. (Bug #28156187)Document Store: A mixed alphanumeric value such as "1address" when used with the
Set
andUnset
methods caused the operations to throw an exception. This fix resolves the way mixed values are converted into tokens to generate only one token as an identifier. (Bug #28094094)EF Core: The implementation of some methods required to scaffold an existing database were incomplete. (Bug #27898343, Bug #90368)
Attempts to create a new foreign key from within an application resulted in an exception when the key was generated by a server in the MySQL 8.0 release series. (Bug #27715069)
A variable of type
POINT
when used properly within an application targeting MySQL 8.0 generated an SQL syntax error. (Bug #27715007)The implementation of
DbProviderFactory
prevented an application from connecting to MySQL in a generic way. Now, invoking theCreateDataAdapter
method returns a valid adapter instead of returning thenull
value. (Bug #27292344, Bug #88660)The case-sensitive lookup of field ordinals was initialized using case-insensitive comparison logic. This fix removes the original case-sensitive lookup. (Bug #27285641, Bug #88950)
The
MySql.Data.Types.MySqlGeometry
constructor called with an array of bytes representing an empty geometry collection generated anArgumentOutOfRangeException
exception, rather than creating the type as expected. Thanks to Peet Whittaker for the patch. (Bug #26421346, Bug #86974)Slow connections made to MySQL were improved by reducing the frequency and scope of operating system details required by the server to establish and maintain a connection. (Bug #22580399, Bug #80030)