Skip to content

Releases: vapor/mysql-nio

1.8.0 - Finally make non-TLS connections work with modern MySQL

01 Sep 09:03
853b434
Compare
Choose a tag to compare

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’s caching_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

28 Aug 14:29
257e719
Compare
Choose a tag to compare

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 of time with a value of nil.

457:            ...
458:            case .datetime, .timestamp:
450:                return (self.time!.date ?? Date(timeIntervalSince1970: 0)).description

If we follow the logic of the MySQLTime conversion of TIMESTAMP text to MySQLTime, 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

29 May 17:08
d60444d
Compare
Choose a tag to compare

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

17 Jan 22:58
605fe1d
Compare
Choose a tag to compare

What's Changed

Tidy up package a bit by @gwynne in #103

Fixes #102.

Also does some rather overdue general cleanup of the repo. No functional changes.

Reviewers

Thanks to the reviewers for their help:

This patch was released by @gwynne

Full Changelog: 1.7.0...1.7.1

Parse timestamp columns in text format. Fixes vapor/mysql-nio#71

09 May 17:33
4d2aa38
Compare
Choose a tag to compare
This patch was authored by @samalone and released by @gwynne.

Add support for reading timestamp columns in text format.

Fixes #71

Several very long overdue crash fixes

09 May 16:36
12f282b
Compare
Choose a tag to compare
This patch was authored and released by @gwynne.

Items of note:

  • Replaced all the assert()s, precondition()s, and fatalError()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

14 Apr 01:00
fee3f5f
Compare
Choose a tag to compare

Add package minimum versions for all platforms

24 Jan 15:03
aa71663
Compare
Choose a tag to compare
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

06 Dec 19:42
f0e8ad7
Compare
Choose a tag to compare
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"`

23 Sep 15:33
eab410d
Compare
Choose a tag to compare
This patch was authored by @fabianfett and released by @gwynne.

Needs patch release.