Skip to content

Attempting to write to a table in a reader instance leads to repeated error messages on subsequent valid queries. #30

@knowthen

Description

@knowthen

I configured a reader as shown below and attempted to insert a new row.
The insert failed as expected, however, subsequent valid queries repeated the same error message.
I closed and reopened the read-only database, and I continue to receive errors Error: attempt to write to a read-only database
If I open the reader.db without our extension, I'm able to query the table.

sqlite> .load ./target/release/libmycelite 
sqlite> .open reader.db
sqlite> .load ./target/release/libmycelite mycelite_config
sqlite>  insert into mycelite_config values
    ('endpoint', 'https://us-east-1.mycelial.com'),
    ('domain', 'my-public-domain'),
    ('client_id', 'client_id'),
    ('secret', 'secret');
sqlite> select * from a;
name
-----
James
sqlite> insert into a(name) values ('John');
Runtime error: attempt to write a readonly database (8)
sqlite> select * from a;
Runtime error: attempt to write a readonly database (8)

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