-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #351 from blackbeam/release-v24.0.0
Release v24.0.0
- Loading branch information
Showing
20 changed files
with
1,249 additions
and
500 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,15 +18,16 @@ Features: | |
* MySql binary protocol support, i.e. support of prepared statements and binary result sets; | ||
* support of multi-result sets; | ||
* support of named parameters for prepared statements (see the [Named Parameters](#named-parameters) section); | ||
* optional per-connection cache of prepared statements (see the [Statement Cache](#statement-cache) section); | ||
* per-connection cache of prepared statements (see the [Statement Cache](#statement-cache) section); | ||
* buffer pool (see the [Buffer Pool](#buffer-pool) section); | ||
* support of MySql packets larger than 2^24; | ||
* support of Unix sockets and Windows named pipes; | ||
* support of custom LOCAL INFILE handlers; | ||
* support of MySql protocol compression; | ||
* support of auth plugins: | ||
* **mysql_native_password** - for MySql prior to v8; | ||
* **caching_sha2_password** - for MySql v8 and higher. | ||
* **caching_sha2_password** - for MySql v8 and higher; | ||
* **mysql_clear_password** - opt-in (see [`Opts::get_enable_cleartext_plugin`]. | ||
|
||
### Installation | ||
|
||
|
@@ -109,9 +110,10 @@ fn main() -> std::result::Result<(), Box<dyn std::error::Error>> { | |
|
||
* feature sets: | ||
|
||
* **default** – includes default `mysql_common` features, `native-tls`, `buffer-pool` | ||
and `flate2/zlib` | ||
* **default** – includes default `mysql_common` features, `native-tls`, `buffer-pool`, | ||
`flate2/zlib` and `derive` | ||
* **default-rustls** - same as `default` but with `rustls-tls` instead of `native-tls` | ||
and `flate2/rust_backend` instead of `flate2/zlib` | ||
* **minimal** - includes `flate2/zlib` | ||
|
||
* crate's features: | ||
|
@@ -122,6 +124,7 @@ fn main() -> std::result::Result<(), Box<dyn std::error::Error>> { | |
(see the [SSL Support](#ssl-support) section) | ||
* **buffer-pool** (enabled by default) – enables buffer pooling | ||
(see the [Buffer Pool](#buffer-pool) section) | ||
* **derive** (enabled by default) – reexports derive macros under `prelude` | ||
|
||
* external features enabled by default: | ||
|
||
|
@@ -176,7 +179,14 @@ let _ = Opts::from_url("mysql://user:pass%[email protected]:3307/some_db?")?; | |
Supported URL parameters (for the meaning of each field please refer to the docs on `Opts` | ||
structure in the create API docs): | ||
|
||
* `prefer_socket: true | false` - defines the value of the same field in the `Opts` structure; | ||
* `user: string` – MySql client user name | ||
* `password: string` – MySql client password; | ||
* `db_name: string` – MySql database name; | ||
* `host: Host` – MySql server hostname/ip; | ||
* `port: u16` – MySql server port; | ||
* `pool_min: usize` – see [`PoolConstraints::min`]; | ||
* `pool_max: usize` – see [`PoolConstraints::max`]; | ||
* `prefer_socket: true | false` - see [`Opts::get_prefer_socket`]; | ||
* `tcp_keepalive_time_ms: u32` - defines the value (in milliseconds) | ||
of the `tcp_keepalive_time` field in the `Opts` structure; | ||
* `tcp_keepalive_probe_interval_secs: u32` - defines the value | ||
|
@@ -188,6 +198,10 @@ structure in the create API docs): | |
* `tcp_user_timeout_ms` - defines the value (in milliseconds) | ||
of the `tcp_user_timeout` field in the `Opts` structure; | ||
* `stmt_cache_size: u32` - defines the value of the same field in the `Opts` structure; | ||
* `enable_cleartext_plugin` – see [`Opts::get_enable_cleartext_plugin`]; | ||
* `secure_auth` – see [`Opts::get_secure_auth`]; | ||
* `reset_connection` – see [`PoolOpts::reset_connection`]; | ||
* `check_health` – see [`PoolOpts::check_health`]; | ||
* `compress` - defines the value of the same field in the `Opts` structure. | ||
Supported value are: | ||
* `true` - enables compression with the default compression level; | ||
|
@@ -646,6 +660,16 @@ assert!(conn_2.exec_drop(&stmt_1, ("foo",)).is_err()); | |
|
||
#### Statement cache | ||
|
||
##### Note | ||
|
||
Statemet cache only works for: | ||
1. for raw [`Conn`] | ||
2. for [`PooledConn`]: | ||
* within it's lifetime if [`PoolOpts::reset_connection`] is `true` | ||
* within the lifetime of a wrapped [`Conn`] if [`PoolOpts::reset_connection`] is `false` | ||
|
||
##### Description | ||
|
||
`Conn` will manage the cache of prepared statements on the client side, so subsequent calls | ||
to prepare with the same statement won't lead to a client-server roundtrip. Cache size | ||
for each connection is determined by the `stmt_cache_size` field of the `Opts` structure. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.