You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use sqlx::sqlite::{SqliteConnectOptions,SqliteJournalMode,SqlitePool};#[tokio::main]asyncfnmain() -> anyhow::Result<()>{let options = SqliteConnectOptions::new().filename("d1.sqlite").create_if_missing(true).journal_mode(SqliteJournalMode::Wal);let pool = SqlitePool::connect_with(options).await?;
sqlx::query("create table if not exists t1 (a text);").execute(&pool).await?;
sqlx::query("insert into t1 (a) values (?)").bind("aaa").execute(&pool).await?;
pool.close().await;Ok(())}
Info
SQLx version: 0.6.2
SQLx features enabled: "runtime-tokio-rustls", "sqlite"
Database server and version: SQLite 3.31.1
Operating system: Ubuntu 20.04.5 LTS
rustc --version: rustc 1.66.0
The text was updated successfully, but these errors were encountered:
Bug Description
As in code example below I open db in WAL mode, and after closing pool, "-wal" and "-shm" files not deleted (which sqlite deletes when last connection closes). I've looked at source code and only place calling sqlite3_close is:
https://github.com/launchbadge/sqlx/blob/v0.6.2/sqlx-core/src/sqlite/connection/handle.rs#L99
but it looks like it never called (I've made simple test by putting
panic!
in start ofConnectionHandle::drop
)related issue: #272
Minimal Reproduction
Cargo.toml:
main.rs:
Info
rustc --version
: rustc 1.66.0The text was updated successfully, but these errors were encountered: