diff --git a/sqlx-mysql/src/testing/mod.rs b/sqlx-mysql/src/testing/mod.rs index 81077bc10b..2840cc7ec3 100644 --- a/sqlx-mysql/src/testing/mod.rs +++ b/sqlx-mysql/src/testing/mod.rs @@ -178,7 +178,7 @@ async fn test_context(args: &TestArgs) -> Result, Error> { async fn do_cleanup(conn: &mut MySqlConnection, created_before: Duration) -> Result { let delete_db_ids: Vec = query_scalar( "select db_id from _sqlx_test_databases \ - where created_at < (cast(from_unixtime($1) as timestamp))", + where created_at < from_unixtime(?)", ) .bind(&created_before.as_secs()) .fetch_all(&mut *conn)