Skip to content

Commit db5a3db

Browse files
committed
MySQL/MariaDB now use CLIENT_FOUND_ROWS capability so that UPDATE command return is consistent with PostgreSQL
Signed-off-by: Soblow "Opale" Xaselgio <[email protected]>
1 parent 1ef43d2 commit db5a3db

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mysql/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ impl AsyncConnection for AsyncMysqlConnection {
5757
.map_err(|e| diesel::result::ConnectionError::InvalidConnectionUrl(e.to_string()))?;
5858
let builder = OptsBuilder::from_opts(opts)
5959
.init(CONNECTION_SETUP_QUERIES.to_vec())
60-
.stmt_cache_size(0); // We have our own cache
60+
.stmt_cache_size(0) // We have our own cache
61+
.client_found_rows(true); // This allows a consistent behavior between MariaDB/MySQL and PostgreSQL (and is already set in `diesel`)
6162

6263
let conn = mysql_async::Conn::new(builder).await.map_err(ErrorHelper)?;
6364

0 commit comments

Comments
 (0)