Skip to content

Multi-threaded access to encrypted database #73

@LarsKloseV

Description

@LarsKloseV

Is there anything to be regarded when using sqlite3mc in a multi-threaded context where each thread accesses a single database using its own connection? I assumed that compiling with SQLITE_THREADSAFE=1 should be sufficient but in reality I get random access violations in a situation where multiple threads open their database simultaneously (I also tested with SQLITE_THREADSAFE=2 which made no difference).

To rule out sqlite3mc-specific code I tested the identical situation with the same databases but removed encryption beforehand.
The access violations are then gone, so it seems there might indeed be some code in encryption, cipher/key setup which is not thread-safe?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions