Skip to content

classify db vs non-db files accordingly #3821

@Pavan-Nambi

Description

@Pavan-Nambi

if a file has content and we try to make a db with it we report it as corrupted but sqlite just says file aint no db

❯ cargo run asdfg.sql
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.26s
     Running `target/debug/tursodb asdfg.sql`
Error: Corrupt database: invalid page size in database header: 0
❯ sqlite3 asdfg.sql
SQLite version 3.50.4 2025-07-30 19:33:53
Enter ".help" for usage hints.
sqlite> .tables
Error: file is not a database
 cat asdfg.sql
create me%                                                                      

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions