Skip to content

SQLite Connect Options for Memory DB Panics when Building URL #4327

Description

@nlordell

I have found these related issues/pull requests

I did not find any related issues or pull requests (searched by the panic message).

Description

The ConnectOptions::to_url_lossy implementation for :memory: SQLite connect options panics with BUG: generated un-parseable URL: InvalidPort.

Reproduction steps

use sqlx::ConnectOptions as _;
use std::str::FromStr as _;

let _ = sqlx::sqlite::SqliteConnectOptions::from_str("sqlite::memory:")
    .unwrap()
    .to_url_lossy();

SQLx version

v0.9.0

Enabled SQLx features

sqlite, runtime-tokio

Database server and version

SQLite (bundled)

Operating system

Debian 13

Rust version

1.96.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions