Repository navigation
Releases
3.2.0
Ready-built dox_mysql_native libraries. See SHA256SUMS.
Read before you update
- Native ABI 4. The build hook gets the new library for you. Update
dox_mysql_nativeand your app together. - With
serverKillon (the default), each new connection runs one small query that names the server. You may see it in the server's general log or audit log.
New
- A query over its timeout, or a cancelled query, now gets a
KILLon the server, so it stops running there. Turn it off withserverKill: false(URL optionserver_kill), for example behind a load balancer. - The
KILLonly goes to the same server as the query. It can never stop a session on another server. - New optional pool settings:
requestTimeout(default 300 s),maxConnectionAgeandidleTimeout(default 12 hours).
Fixes
- Fuzz tests found and fixed several crashes and wrong reads on bad server data. Examples: a process abort in the RSA login, a bad DATETIME fraction, huge TIME values, bad UTF-8 text and bad JSON values.
- If Dart can not read one result, only that request fails. Before, the batch never finished.
- Very large packets or results from a broken server now fail cleanly.
Full list: CHANGELOG
3.0.3
What is new
Skip the download. An app that does not use MySQL can now turn off the download of this driver's native library. Add this to the app's root pubspec.yaml:
hooks:
user_defines:
dox_mysql_native:
skip: trueWithout it, nothing changes. If the app opens a pool while skip is set, the error says the library is not in the build and tells you to remove skip.
Fixed
The download tries again. The build hook now tries the download up to 3 times (waits 1 s, then 3 s). Before, one bad answer from GitHub (for example a 503) meant no native library, and the app stopped at start.
Ready-built libraries for each platform are attached below. See SHA256SUMS.
3.0.2
New
sslRootCertoption ofMysqlNativePool.open()(URL optionssl_ca). It takes a PEM file with more CA certificates, for example a private CA.
Fixes
- On MySQL 8.4, the same SQL with a number param first and a text param later gave wrong rows. Now each set of param types gets its own prepared statement.
- On MySQL 8.4, a text param could be stored with the wrong type after a table was changed. Now a
CREATE,ALTER,DROPorRENAMEmakes every connection prepare its statements again. - A pool that can not open now says why.
- Opening a pool no longer blocks the other isolates while it looks up the host.
sslRootCertwithoutsecurenow prints one warning that it is ignored.
The native ABI is now 3.
See SHA256SUMS for the library hashes.
Docs: MySQL native
Full list: the CHANGELOG.
v3.0.1
Faster: MySQL on the isolate thread
- A new MySQL client in Rust runs on the thread of the Dart isolate, like
dox_http_native. There is no tokio thread any more, so a query no longer moves between threads. - Queries are pipelined: many go down one connection at once.
GET /dbon 2 cores: 111k → 242k requests per second (Bun: 195k).GET /queries?n=20: 7.0k → 12.3k requests per second.
Same API, no breaking changes
MysqlNativePoolworks as before. Your code does not change.- Works with MySQL 8.4 and MariaDB 11. Login with
mysql_native_passwordandcaching_sha2_password, with or without TLS. - The connection limit is still for the whole process. Isolates share connections fairly.
- A transaction can still be used from any isolate.
Other
- A dead isolate gives its connections back at once. Its open transactions roll back.
mysql_asyncand tokio are gone.- A stress test (
tool/stress.dart) kills random connections under load. About 5.5 million requests per 2-minute run, 0 hangs. - The
compressionURL option is accepted but does nothing now. A few other rarely used options are also ignored; the README lists them. - Native ABI 2. The build hook downloads the matching library by itself.
Ready-built libraries for Linux (x64, arm64), macOS (x64, arm64) and Windows (x64). See SHA256SUMS.
v3.0.0
The first stable release of dox_mysql_native.
A native MySQL and MariaDB driver for Dox, written in Rust and used through dart:ffi. dox_orm uses it by default. You do not need Rust: the build hook downloads the ready library for your platform.
Ready-built libraries for Linux (x64, arm64), macOS (x64, arm64) and Windows (x64). See SHA256SUMS.
v3.0.0-alpha.7
Ready-built dox_mysql_native libraries. See SHA256SUMS.