From aee0e18b0bf31a6379f23dd73d6427acd13a820f Mon Sep 17 00:00:00 2001 From: Simon Menke Date: Fri, 14 Jul 2023 19:38:12 +0200 Subject: [PATCH] Remove incorrect CAST in test database cleanup for MySQL. (#2599) * Remove incorrect CAST in test daatbase cleanup for MySQL. * Not sure how this ever really worked. --- sqlx-mysql/src/testing/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlx-mysql/src/testing/mod.rs b/sqlx-mysql/src/testing/mod.rs index 81077bc1..2840cc7e 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)