MySQL Connector/NET Release Notes

2.2 Changes in MySQL Connector/NET 8.0.17 (2019-07-22, General Availability)

Functionality Added or Changed

  • Connector/NET supports SSL PEM certificate versions 1, 2, and 3 to enable use with the full range of applications that generate certificates. (Bug #29756058)

  • Support was added for .NET Core 2.2, which is a cross-platform version of .NET for building applications that run on Linux, macOS and Windows (see Connector/NET Versions).

  • Document Store: The Where() method is deprecated (Obsolete attribute applied) and will return a warning when called in the following method constructs: Find().Where(), Modify().Where(), and Remove().Where().

  • New README.md and CONTRIBUTING.md files now accompany MySQL Connector/NET code for compatibility with Git. Distribution packages (NuGet, MSI, ZIP) continue to include the original README file, but do not include the new files.

  • Connector/NET now supports the new utf8mb4_0900_bin collation added for the utf8mb4 Unicode character set in MySQL 8.0.17. For more information about this collation, see Unicode Character Sets.

  • Document Store: Connector/NET now supports the OVERLAPS and NOT OVERLAPS operators for expressions on JSON arrays or objects:

    expr OVERLAPS expr
    expr NOT OVERLAPS expr
    

    Suppose that a collection has these contents:

    [{
       "_id": "1",
       "list": [1, 4]
     }, {
       "_id": "2",
       "list": [4, 7]
    }]
    

    This operation:

    var res = collection.Find("[1, 2, 3] OVERLAPS $.list").Fields("_id").Execute();
    res.FetchAll();
    

    Should return:

    [{ "_id": "1" }]
    

    This operation:

    var res = collection.Find("$.list OVERLAPS [4]").Fields("_id").Execute();
    res.FetchAll();
    

    Should return:

    [{ "_id": "1" }, { "_id": "2" }]
    

    An error occurs if an application uses either operator and the server does not support it.

  • Document Store: For index specifications passed to the Collection.CreateIndex() method, Connector/NET now supports indexing array fields. For example, consider a collection with this array:

    Session session = MySQLX.GetSession(connString);
    Schema schema = session.GetSchema(schemaName);
    Collection coll = schema.CreateCollection(collectionName);
    
    var docs = new[]
    {
      new {  _id = 1, name = "John Smith", emails = [ "john.smith@mycompany.com", "jsmith@php.net", "jsmith@mail.com" ] }
    };
    
    coll.Add(docs).Execute();
    

    A single index field description can contain a new member name array that takes a Boolean value. If set to true, the field is assumed to contain arrays of elements of the given type. In addition, the set of possible index field data types (used as values of member type in index field descriptions) is extended with type CHAR(N), where the length N is mandatory. For example, to create the emails_idx index with an array field:

    coll.CreateIndex("emails_idx",
        "{\"fields\": [{\"field\": $.emails,
                   	   \"type\":\"CHAR(128)\",
                   	   \"array\": true }]}"
    );        
    

    To find an element of the array:

    collection
       .Find(":mail IN $.emails")
       .Bind("mail", "jsmith@php.net")
       .Execute();
    
  • New support for SSH tunneling enables Connector/NET to create secure connections to a remote MySQL server using TCP/IP over SSH. With SSH server authorization, an application can establish a connection from behind a firewall when the MySQL Server port is blocked. The new connection-string options (and equivalent class properties) for SSH tunneling are supported by both the classic MySQL protocol and X Protocol connections (see Connecting With TCP/IP Over SSH.

Bugs Fixed

  • The BouncyCastle assembly was loaded into memory whenever a connection attempt was made using any SSL mode type, except None. Now the assembly loads only when the SSL mode type is VerifyCA or VerifyFull, or when PEM certificates are used. (Bug #29611216)

  • Document Store: The MySqlConnection.GetSchema() method sometimes returned columns in an unexpected order when used with the INFORMATION_SCHEMA.COLUMNS table. This fix ensures that returned columns now correspond to the ordinal position only. (Bug #29536344)

  • The InvariantCulture property was missing from some data types, which created issues during platform migration operations. Thanks to Effy Teva for the patch. (Bug #29262195, Bug #94045)

  • Connector/NET connections executed SHOW VARIABLES unnecessarily. (Bug #28928543, Bug #93202)

  • Connector/NET access to MySQL stopped working after the computer hosting the server was started and continued to operate uninterrupted for a defined period of time. (Bug #26930306, Bug #75604)