Releases: vapor/mysql-nio
1.8.0 - Finally make non-TLS connections work with modern MySQL
What's Changed
Finally make non-TLS connections work with modern MySQL by @gwynne in #114
Some time ago, when I was last actively working on the rewrite for this package, I had written working code which leverages the RSA implementation that’s been available in
swift-crypto
‘s_CryptoExtras
for quite some time now to make MySQL’scaching_sha2_password
authentication work for non-TLS connections. However, because at that time I had expected to finish the rewrite in short order, I never bothered to include that code in the current version of the package. And now here we are, a downright embarrassing length of time later, and it finally occurred to me to just do it. So here you go, non-TLS connections are now functional with MySQL 9.Oh, and the package has been bumped to require Swift 5.10. It was a long, long, long way behind…
This patch was released by @gwynne
Full Changelog: 1.7.3...1.8.0
1.7.3 - Fix crash when parsing timestamps with microsecond text
What's Changed
Fix crash when parsing timestamps with microsecond text by @wlsdms0122 in #101
Crash occurred even parsing logic enhanced by #72.
When you get rows from the simple query with
TIMESTAMP
column like this.
id … created_at 1 … 1970-01-01 00:00:01.000000 Application crashed at
MySQLData.swift:459
due to forced unwrapping oftime
with a value ofnil
.457: ... 458: case .datetime, .timestamp: 450: return (self.time!.date ?? Date(timeIntervalSince1970: 0)).descriptionIf we follow the logic of the
MySQLTime
conversion ofTIMESTAMP
text toMySQLTime
, we can find that point of crash.public init?(_ string: String) { ... guard parts.count >= 6, let year = UInt16(parts[0]), let month = UInt16(parts[1]), let day = UInt16(parts[2]), let hour = UInt16(parts[3]), let minute = UInt16(parts[4]), let second = UInt16(parts[5]) // <- `parts[5]` is "01.000000" actually. Conversion to `UInt16` fails because of microseconds. else { return nil } ... }…
This patch was released by @gwynne
Full Changelog: 1.7.2...1.7.3
1.7.2 - Avoid double-logging queries
What's Changed
Avoid double-logging queries by @gwynne in #110
This logging is handled in MySQLKit and should not be present at the MySQLNIO layer.
Reviewers
Thanks to the reviewers for their help:
This patch was released by @gwynne
Full Changelog: 1.7.1...1.7.2
1.7.1 - Tidy up package a bit
Parse timestamp columns in text format. Fixes vapor/mysql-nio#71
Several very long overdue crash fixes
This patch was authored and released by @gwynne.
Items of note:
- Replaced all the
assert()
s,precondition()
s, andfatalError()
s with thrown errors as appropriate. Removes almost every source of crashes - especially ones caused by input the user has no control over - in the package. - Fixes #87 (unexpected packets with no active command cause an assertion failure)
- Fixes #91 (server error before handshake throws
invalidProtocolVersion()
instead of the appropriate.server(ERR_Packet)
) - CI and README updates
- Fixes the unit tests so they don't leave stale tables lying around.
With the rewrite finally back to being actively worked on, it became really obvious how easy these fixes were to make even in the existing code, and I decided users shouldn't have to wait any longer for them, even if the rewrite drops the next day.
Update min Swift version to 5.6 and make platform versions consistent
This patch was authored and released by @gwynne.
Add package minimum versions for all platforms
This patch was authored by @elGeekalpha and released by @0xTim.
Adds the correct platform versions to match the Swift Crypto dependency to enable building on all platforms.
Solves #81
Improve error handling
This patch was authored and released by @gwynne.
- "Connection closed" errors are now correctly reported when trying to issue queries on closed connections, instead of throwing various NIO errors.
- Query syntax errors are now explicitly reported.
- Unique constraint violation errors are now more consistently reported.
semver-minor
due to adding a new case on MySQLError
.
Widen our pin on Crypto versions: `"1.0.0" ..< "3.0.0"`
This patch was authored by @fabianfett and released by @gwynne.
Needs patch release.