Skip to content

encode-db writes a Version-1 header the library itself rejects (invalid version) #81

Description

@arnoldwolfe

Version: ltx CLI v0.5.2 release binary (darwin-arm64), library at the same tag.

ltx encode-db sets Version: 1 in the header it passes to the encoder (cmd/ltx/encode_db.go), but Header.Validate requires Version == 3, so the command always fails:

$ sqlite3 t.db "PRAGMA page_size=4096; CREATE TABLE x(a); INSERT INTO x VALUES (1);"
$ ltx encode-db -o out.ltx t.db
encode ltx header: invalid version

Expected: encode-db writes a version-3 header (the only version the library accepts).
Actual: the command cannot produce any output the library itself would read.

Found while validating an independent implementation of the format against the reference CLI. Happy to provide more detail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions