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.
This commit is contained in:
Simon Menke 2023-07-14 19:38:12 +02:00 committed by GitHub
parent 3db16751a0
commit aee0e18b0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)