blackbeam / rust-mysql-simple

Mysql client library implemented in rust.
Apache License 2.0
665 stars 146 forks source link

MySqlError { ERROR 1295 (HY000): This command is not supported in the prepared statement protocol yet } #192

Closed nbari closed 5 years ago

nbari commented 5 years ago

How could I run UNLOCK TABLES not getting an ERROR 1295, currently I am trying:

 if let Err(e) = pool.prep_exec("UNLOCK TABLES", ()) {
    eprintln!("{}", e);
}

What is the way to run the queries not using prepared statements?

blackbeam commented 5 years ago

Hi.

First you need to get a specific connection from the pool (using Pool::get_conn). Then you can run text protocol queries using PooledConn::query.

nbari commented 5 years ago

many thanks 👍