MysqlConnector 比Oracle官方MySql驱动更好用、高性能、轻量级、纯异步
MysqlConnector 比Oracle官方MySql驱动更好用、高性能、轻量级、纯异步- Connections are now reset asynchronously in the background: #178.
- This speeds up
MySqlConnection.Open(Async)
but still cleans up connections between uses. - Use
DeferConnectionReset=true
in the connection string to revert to the old behaviour. - Experimental Use
ConnectionIdlePingTime=300
in the connection string to avoid any network I/O when retrieving a connection from the pool; this is fastest but may return invalid connections fromOpen
. This setting is experimental and may change in the future.
- This speeds up
- Use transaction for
SHOW WARNINGS
: #918.
Assets
2
Assets
2
- Add
TlsCipherSuites
connection string option for fine-grained control of TLS cipher suites: #904.- This option is only supported on Linux when using .NET Core 3.1 or .NET 5.0 or later.
- Fix bug loading GUIDs with
MySqlBulkCopy
.
Assets
2
- Support .NET 5.0
- Cancel query (server-side) when
CommandTimeout
expires: #455.- Add
CancellationTimeout
connection string option. - Implementation details discussed in this comment.
- Add
- Return
null
fromMySqlDataReader.GetSchemaTable
when there is no result set: #877. - Make
DisposeAsync
fully async: #876. - Ignore
ObjectDisposedException
thrown inTryResetConnectionAsync
: #897. - Ignore closed/disposed connections/commands in
MySqlCommand.Cancel
: #820. - Fix bug where sessions could time out if they were opened but no queries were ever executed.
- Thanks to @dlemstra and @laurent-jeancler-realist for contributions to this release.
- Support .NET 5 RC 2
- Cancel query (server-side) when
CommandTimeout
expires: #455.- Implementation details discussed in this comment.
- Return
null
fromMySqlDataReader.GetSchemaTable
when there is no result set: #877. - Make
DisposeAsync
fully async: #876. - Ignore
ObjectDisposedException
thrown inTryResetConnectionAsync
: #897. - Fix bug where sessions could time out if they were opened but no queries were ever executed.
- Thanks to @dlemstra for contributions to this release.
Assets
2
bgrainger released this
- Ignore
ObjectDisposedException
thrown inTryResetConnectionAsync
: #897. - Thanks to @laurent-jeancler-realist for contributions to this release.
Assets
2
bgrainger released this
- Return
null
fromMySqlDataReader.GetSchemaTable
when there is no result set: #877.
Assets
2
- Support
ENUM
columns that use theMYSQL_TYPE_ENUM
type in their column metadata: #850. - Allow
MySqlCommand.CommandText
and.Connection
to be changed while another command is executing: #867. - Make schema collection names (for
MySqlConnection.GetSchema(collectionName)
) case-insensitive: #852. - Fix
MySqlBulkLoader
with Azure Database for MySQL/MariaDB: #853. - Fix bug preventing the retrieval of more than 2³¹-1 rows in a single query: #863.
- Fix
MySqlParameterCollection.Insert
implementation: #869. - Fix integer overflow in sequence number for compressed packets.
- Fix ZLIB header flags verification for compressed packets.
- Thanks to @akamor for contributions to this release.
Assets
2
bgrainger released this
- Support
ENUM
columns that use theMYSQL_TYPE_ENUM
type in their column metadata: #850.
Assets
2
- Breaking Change namespace to
MySqlConnector
: #827. - Breaking Rename
MySqlClientFactory
toMySqlConnectorFactory
: #839. - Breaking All
MySqlConnectionStringBuilder
string properties return""
(notnull
) when unset: #837. - Breaking Remove
MySqlInfoMessageEventArgs.errors
property; use.Errors
instead. - Implement async schema APIs: #835.
- Implement
MySqlConnectorFactory.CanCreateXyz
methods: #838. - Add
net5.0
target framework. - Add
MySqlException.ErrorCode
: #830. - Add
MySqlConnection.ResetConnectionAsync
: #831. - Add documentation at https://mysqlconnector.net/api/ built from XML doc comments: #827.
- Allow rows larger than 1 MiB in
MySqlBulkCopy
: #834. - Reduce memory allocations when hashing passwords (during login).
Assets
2
bgrainger released this
- Support
GEOMCOLLECTION
data type alias in MySQL Server 8.0: #845.
Assets
2
bgrainger released this
- Improve robustness of OK packet parsing: #842.
Assets
2
Fix connection pool leak when a failure (e.g., timeout) occurs on a connection: #836.
Assets
2
Assets
2
bgrainger released this
- Fix
Failed to read the result set.
error when usingMySqlBulkCopy
: #780.- The maximum row size supported by
MySqlBulkCopy
is 1 MiB.
- The maximum row size supported by
Assets
2
- Breaking Add
new
implementations ofMySqlCommand.ExecuteReaderAsync
that returnTask<MySqlDataReader>
: #822. - Breaking
MySqlBulkCopy.DestinationTableName
must be quoted if it contains reserved keywords or characters: #818. - Automatically create expressions for
BIT
and binary columns inMySqlBulkCopy
: #816. - Throw an exception from
MySqlBulkCopy
if not all rows were inserted: #814. - Add logging to
MySqlBulkCopy
. - Detect simple column mapping errors in
MySqlBulkCopy
.
Assets
2
- Breaking Add
MySqlBulkCopy.RowsCopied
property: #809.- The
RowsCopied
event is renamed toMySqlRowsCopied
. - The
MySqlRowsCopied
event is no longer guaranteed to be raised at the end of copying.
- The
- Fix
NullReferenceException
when calling a stored procedure with anENUM
parameter: #812. - Track
MySqlParameter
name changes (when added to aMySqlParameterCollection
): #811.
Assets
2
- Restore
COLUMN_TYPE
column toGetSchema("COLUMNS")
: #807.- This was a regression in 0.64.1
- Fix ignored
CancellationToken
inMySqlBulkCopy.WriteToServerAsync(DataTable)
. - Thanks to @mitchydeath for contributions to this release.
Assets
2
Assets
2
Assets
2
- Experimental Add new transaction savepoint API (from .NET 5): #775.
- Allow
TINYINT(1)
(BOOL
) columns to be read usingMySqlDataReader.GetInt32
,GetInt16
,GetByte
, etc. whenTreatTinyAsBoolean=true
: #782.- These methods will always return
1
for any non-zero value in the underlying column.
- These methods will always return
- Allow
FLOAT
andDOUBLE
columns to be read usingMySqlDataReader.GetDecimal
: #785. - Fix connection timeout when server doesn't respond: #739.
- Thanks to @danielgindi for contributions to this release.
Assets
2
- Experimental Add new
MySqlBulkCopy
class for efficiently loading a table from aDataTable
orIDataReader
: #737.- Known issue: individual data values larger than 16MiB cannot be sent.
- Improve nullability annotations.
- Optimize
MySqlDataReader.GetInt32
: #725. - Set TCP Keepalive for all operating systems: #746.
- Remove properties from
MySqlConnectionStringBuilder
when they're set tonull
: #749. - Send shorter connector version to server: #765.
- Throw better exception for invalid connection string values: #763.
- Fix
KeyNotFoundException
inGetAndRemoveStream
: #757. - Reduce
ObjectDisposedExceptions
thrown fromMySqlCommand
.
Assets
2
Assets
2
- Add more schemas to
MySqlConnection.GetSchema
: #724. - Add XML documentation to NuGet package.
- Add documentation for
MySqlConnection.ConnectionTimeout
: #727. - Fix exception in
MySqlDataReader.FieldCount
andHasRows
: #728.- This fixes a regression introduced in 0.60.1.
- Thanks to @JosephAmalfitanoSSA and @KaliVi for contributions to this release.
Assets
2
Download on NuGet
- Breaking Remove
MySqlClientFactory.Register
: #654- Replace calls to this method with
DbProviderFactories.RegisterFactory("MySqlConnector", MySqlClientFactory.Instance)
instead.
- Replace calls to this method with
- Breaking Return type of
MySqlConnection.BeginTransactionAsync
changed toValueTask<MySqlTransaction>
(to match .NET Core 3.0 APIs). - Breaking Various
XyzAsync
method overloads that did not take aCancellationToken
were removed. - Breaking Throw
InvalidOperationException
fromMySqlDataReader.GetSchemaTable
when there is no result set: #678. - Experimental Implement the new ADO.NET
DbBatch
API: #650.- This API is not finalised and may change in the future.
- Add
netstandard2.1
andnetcoreapp3.0
platforms. - Implement .NET Core 3.0 ADO.NET API.
- Add .NET Core 3.0 async methods: #642.
- Allow
MySqlDataReader.GetDouble
andGetFloat
onDECIMAL
columns: #664. - Allow narrowing conversions in
MySqlDataReader.GetByte
: #695. - Add
MySqlGeometry
andMySqlDataReader.GetMySqlGeometry
: #677.- The API is deliberately different than Connector/NET, which assumes a
MySqlGeometry
can only be a simple point.
- The API is deliberately different than Connector/NET, which assumes a
- Use
sql_select_limit
whenCommandBehavior.SingleRow
is specified: #679. - Use batching in
MySqlDataAdapter
whenUpdateBatchSize
is set: #675. - Support
utf8mb4_0900_bin
collation introduced in MySQL Server 8.0.17: #670. - Add
MySqlConnection.CloseAsync
: #467. - Throw
InvalidOperationException
fromMySqlConnection.EnlistTransaction
instead ofNullReferenceException
. - Fix
NullReferenceException
thrown fromMySqlConnection.ConnectionTimeout
: #669. - Fix connection timeout when executing a stored procedure: #672.
- Fix incorrect exception being thrown after a timeout occurs executing a stored procedure: #667.
- Fix exception deserializing an
OUT BOOL
parameter from a stored procedure: #682. - Fix exception deserializing an
OUT TIME
parameter from a stored procedure: #680. - Fix
MySqlConnection.State
not being set toConnectionState.Closed
when a failure occurs if pooling is disabled: #674. - Fix exception when executing a prepared statement if
MySqlParameter.MySqlDbType
was set: #659. - Handle error packet being sent out-of-order: #662.
- Use
MySqlErrorCode.UnableToConnectToHost
in more situations when connecting fails: #647. - Add some nullable annotations; these are primarily on internal types and not in the public API.
- Reduce allocations on some common code paths.
- Improve performance of
MySqlDataReader
; reduce memory allocations. - Thanks to @joshdrees for contributions to this release.
Assets
2
bgrainger released this
Download on NuGet
- Support
client_ed25519
authentication plugin for MariaDB: #639.- This is implemented in a new NuGet package, MySqlConnector.Authentication.Ed25519, and must be activated by calling
Ed25519AuthenticationPlugin.Install
.
- This is implemented in a new NuGet package, MySqlConnector.Authentication.Ed25519, and must be activated by calling
Assets
2
bgrainger released this
Download on NuGet
- Support
client_ed25519
authentication plugin for MariaDB: #639.- This is implemented in a new NuGet package, MySqlConnector.Authentication.Ed25519, and must be activated by calling
Ed25519AuthenticationPlugin.Install
.
- This is implemented in a new NuGet package, MySqlConnector.Authentication.Ed25519, and must be activated by calling
Assets
2
Download on NuGet
- Breaking
MySqlBulkLoader
(for local files) andLOAD DATA LOCAL INFILE
are disabled by default.- Set
AllowLoadLocalInfile=true
in the connection string to enable loading local data. - This is a security measure; see https://fl.vu/mysql-load-data for details.
- Set
- Add
AllowLoadLocalInfile
connection string option: #643. - Add
SslCert
andSslKey
connection string options to specify a client certificate using PEM files: #641. - Add
SslCa
alias for theCACertificateFile
connection string option: #640.
Assets
2
Download on NuGet
- Implement batch updates in
MySqlDataAdapter
: #635.- See Performing Batch Operations Using DataAdapters for information about the API.
- Improve compatibility with latest Azure Database for MySQL changes.
Assets
2
Download on NuGet
- Breaking
MySqlDataReader.GetTextReader()
will throw anInvalidCastException
if the field value is NULL. Previously, it would return aStringReader
wrapping an empty string. - Add
MySqlDataReader.GetTextReader(string name)
. - Implement
MySqlDataReader.GetFieldValue<T>
andGetFieldValueAsync<T>
forTextReader
andStream
: #631.
Assets
2
Download on NuGet
- Add support for
Memory<byte>
andArraySegment<byte>
asMySqlParameter.Value
values. - Fix exception when setting
MySqlParameter.Value
toReadOnlyMemory<byte>
when using prepared commands.
Assets
2
Download on NuGet
- Add
MySqlClientFactory.Register()
for integration withDbProviderFactories
innetcoreapp2.1
: #526. - Use more efficient "Reset Connection" for MariaDB 10.2.4 and later: #613.
- Ignore
MySqlConnection.EnlistTransaction
called more than once for the same transaction: #619. MySqlConnection.ConnectionString
will always be coerced fromnull
to the empty string.- Use
ReadOnlySpan<byte>
in more places when parsing server responses. - Fix multiple
NullReferenceException
errors that could occur in edge cases.
Assets
2
Assets
2
Assets
2
Assets
2
Download on NuGet
- Breaking Disallow duplicate parameter names after normalization: #591.
- Potentially breaking Change default connection collation from
utf8mb4_bin
toutf8mb4_general_ci
: #585. - Potentially breaking Update stored procedure metadata cache to use
mysql.proc
when available: #569.- This provides higher performance, but is a potentially-breaking change for any client using stored procedures.
- Change
System.Transactions
support: - Add
MySqlConnection.InfoMessage
event: #594. - Implement
ICloneable
onMySqlCommand
: #583. - Fix logic for detecting variable names in SQL: #195, #589.
- Fix
NullReferenceException
when attempting to invoke a non-existent stored procedure. - Support MySQL Server 5.1 (and earlier) by using
utf8
ifutf8mb4
isn't available. - Reduce log message severity for session discarded due to
ConnectionLifeTime
: #586. - Optimise
MySqlDataReader.GetStream
: #592. - Use latest dotnet SourceLink package.
Assets
2
Download on NuGet
- Support MariaDB GSSAPI authentication: #577.
- Log received error payloads at
Debug
level. - Thanks to @vaintroub for contributions to this release.
Assets
2
Download on NuGet
- Add first version of prepared commands: #534.
- Only single statements (and not stored procedures) are preparable.
- The (new)
IgnorePrepare
connection string option defaults totrue
and must be set tofalse
to use prepared commands.
- Add
CertificateStore
andCertificateThumbprint
connection string options: #536. - Fix bug that rejected sessions from the connection pool if
ChangeDatabase
had been called: #515. - Don't map
TINYINT(1) UNSIGNED
asbool
: #530. - Thanks to @hajekj for contributions to this release.
Watchers:76 |
Star:924 |
Fork:228 |
创建时间: 2016-04-01 05:54:37 |
最后Commits: 7天前 |
许可协议:MIT |
0527ba2
Compare
Verified
MySqlException.IsTransient
: #849.MySqlTransaction.Dispose
: #923.MySqlException.ErrorCode
property.