Skip to content

Commit aee0e18

Browse files
authored
Remove incorrect CAST in test database cleanup for MySQL. (launchbadge#2599)
* Remove incorrect CAST in test daatbase cleanup for MySQL. * Not sure how this ever really worked.
1 parent 3db1675 commit aee0e18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sqlx-mysql/src/testing/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ async fn test_context(args: &TestArgs) -> Result<TestContext<MySql>, Error> {
178178
async fn do_cleanup(conn: &mut MySqlConnection, created_before: Duration) -> Result<usize, Error> {
179179
let delete_db_ids: Vec<u64> = query_scalar(
180180
"select db_id from _sqlx_test_databases \
181-
where created_at < (cast(from_unixtime($1) as timestamp))",
181+
where created_at < from_unixtime(?)",
182182
)
183183
.bind(&created_before.as_secs())
184184
.fetch_all(&mut *conn)

0 commit comments

Comments
 (0)