mysql_async
mysql_async copied to clipboard
sql_mode=ANSI_QUOTES causes `UnknownStatusFlags(32770)` error when trying to connect to MariaDB 11.2
I've been experiencing this error when I try to connect to MariaDB with a pool:
Io(Io(Custom { kind: InvalidData, error: UnknownStatusFlags(32770) }))
I think I have narrowed it down to the sql_mode option, and only when it has ANSI_QUOTES set.
To reproduce:
pushd "$(mktemp -d)"
cat <<'EOD' >mariadb.cnf
[mariadb]
sql_mode=ANSI_QUOTES
EOD
docker run --name repro --rm -d \
-e MARIADB_ROOT_PASSWORD=test \
-e MARIADB_DATABASE=test \
-e MARIADB_USER=test \
-e MARIADB_PASSWORD=test \
-v ./mariadb.cnf:/etc/mysql/conf.d/repro.cnf \
-p 3306:3306 \
mariadb:11.2
cargo init --bin --name a .
cargo add tokio --features full
cargo add mysql_async
cat <<'EOD' >src/main.rs
#[tokio::main]
async fn main() {
let pool = mysql_async::Pool::new("mysql://test:[email protected]:3306/test");
let mut conn = pool.get_conn().await.unwrap();
}
EOD
cargo run
docker rm -fv repro
I'm not sure if this also applies to MySQL. Once ANSI_QUOTES is removed, everything works great, including other sql_mode options, mutual TLS, etc.
Thanks for report. I'll add the flag