Skip to content

Commit

Permalink
Remove incorrect CAST in test database cleanup for MySQL. (#2599)
Browse files Browse the repository at this point in the history
* Remove incorrect CAST in test daatbase cleanup for MySQL.

* Not sure how this ever really worked.
  • Loading branch information
fd authored Jul 14, 2023
1 parent 3db1675 commit aee0e18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sqlx-mysql/src/testing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ async fn test_context(args: &TestArgs) -> Result<TestContext<MySql>, Error> {
async fn do_cleanup(conn: &mut MySqlConnection, created_before: Duration) -> Result<usize, Error> {
let delete_db_ids: Vec<u64> = 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)
Expand Down

0 comments on commit aee0e18

Please sign in to comment.