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()
, andRemove().Where()
. (WL #12983)
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). (WL #12337)
New
README.md
andCONTRIBUTING.md
files now accompany MySQL Connector/NET code for compatibility with Git. Distribution packages (NuGet, MSI, ZIP) continue to include the originalREADME
file, but do not include the new files. (WL #12970)Connector/NET now supports the new
utf8mb4_0900_bin
collation added for theutf8mb4
Unicode character set in MySQL 8.0.17. For more information about this collation, see Unicode Character Sets. (WL #13099)-
Document Store: Connector/NET now supports the
OVERLAPS
andNOT 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. (WL #12749)
-
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 aBoolean
value. If set totrue
, 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 membertype
in index field descriptions) is extended with typeCHAR(
, where the lengthN
)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();
(WL #12176)
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. (WL #12747)
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 isVerifyCA
orVerifyFull
, or when PEM certificates are used. (Bug #29611216)Document Store: The
MySqlConnection.GetSchema()
method sometimes returned columns in an unexpected order when used with theINFORMATION_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)