Releases: mysql-d/mysql-native
Detect stale connections
This release adds a new exception, MYXStaleConnection
which is thrown when a connection appears to be stale. A stale connection can happen because the server closed the connection (maybe it restarted, maybe the network failed briefly, or the server just closed it for whatever reason).
The idea is that you catch this exception and then can retry your SQL calls.
In a future release, this retry might become automatic and the exception removed.
Allow large column counts
This release allows larger column counts in queries. There was an old assert (11 years old) that for some reason required the column count to be 250 or less. I believe this was added in error when adding asserts to the original code.
This release fixes that. It also (unofficially) now passes on my local mysql-8 server (using the native authentication, not SHA2).
Allow byte[] blobs for unsafe mysql package
The previous minor release allowed byte[] blobs, whereas 3.2.0 did not, even for the unsafe version.
In this bugfix release, byte[] blobs are supported, but only for unsafe code. Any code using byte[] for blobs should migrate to using ubyte[] instead.
Work with DMD 2.101
DMD 2.101 moved std.experimental.logger to std.logger, and also changed some fundamental pieces of it, namely that the shared logger is now actually shared
. This release should work with 2.101, and also be backwards compatible with all our supported compilers.
This also fixes a bug in the protocol that didn't properly send doubles on the wire for prepared statements.
Also fixed some internal details for sockets to prepare for DIP1000
Safe Usage
Mysql-native is now usable in @safe
code, via the mysql.safe
package. See Safe Migration Document for more details on how to use it.
Logging
This release adds logging! Vibe logging for builds that use vibe, and std.experimental.logger otherwise.
Note that if you are using DMD prior to version 2.099.0 (or a compiler based on such a front end), the default log level for std.experimental.logger was to log everything (including trace messages). Therefore, just using the library will spew all trace and debug messages unless you either use version 2.099 or later, or set the default logger level before using the library. If you use vibe with mysql-native, this should not apply to you. For this reason, even though there are no API changes in this revision, it is a minor version bump so as not to surprise those depending on the prior release.
Thanks to @SingingBush for the efforts to add logging!
Minor updates
A couple minor updates, including a fixed bug in column names when the result columns are null, and removing Nagle's algorithm by default. See changelog for details.
The big CI change
This new release uses github actions to run all CI. It also works around a recent issue with dub changing the way it interprets mainSourceFile. It turns out this was not needed if the dub file was set up properly.
Thanks to @SingingBush and @kubo39 for their contributions!
See the Changelog for details.
Fix issue with auto purge
Hot fix for an issue I'm having with autoPurge not always running properly in a vibe-d environment, causing out-of-order server packets.