Skip to content

Transaction starts prematurely during "did you mean" suggestion, causing database open failure #183

@Tangruilin

Description

@Tangruilin

What happens?

Related to: duckdb/duckdb#21618

When a table is not found in an attached SQLite database, DuckDB Core iterates through all attached databases to generate "did you mean" suggestions. This triggers
GetCatalogTransaction() which calls Transaction::Get(), and for SQLite extension, this starts a transaction and opens the database file.

If a previously attached database file has been deleted, opening it fails with an error like:

Unable to open database "/path/to/deleted.db": unable to open database file

To Reproduce

look at duckdb/duckdb#21618

OS:

Mac

SQLite Version:

main

DuckDB Version:

1.5.1

DuckDB Client:

1.5.1

Full Name:

Tangruilin

Affiliation:

Alibaba Cloud

Have you tried this on the latest main branch?

  • I agree

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • I agree

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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