Skip to content

Commit 51e8026

Browse files
committed
chore(raw_sql): create regression test
1 parent 3e140ba commit 51e8026

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

sqlx-core/src/raw_sql.rs

+22
Original file line numberDiff line numberDiff line change
@@ -267,3 +267,25 @@ impl<'q> RawSql<'q> {
267267
executor.fetch_one(self).await
268268
}
269269
}
270+
271+
#[cfg(test)]
272+
mod tests {
273+
use sqlx::{Connection, SqliteConnection};
274+
275+
#[test]
276+
fn issue_3150() {
277+
tokio::runtime::Builder::new_current_thread()
278+
.enable_all()
279+
.build()
280+
.unwrap()
281+
.block_on(async {
282+
tokio::spawn(async {
283+
let mut db = SqliteConnection::connect(":memory:").await.unwrap();
284+
sqlx::raw_sql("").execute(&mut db).await.unwrap();
285+
db.close().await.unwrap();
286+
})
287+
.await
288+
})
289+
.ok();
290+
}
291+
}

0 commit comments

Comments
 (0)