Skip to content

decision: is the Read-only connection mode a guarantee or a hint? #1773

Closed

Description

@ZhuchkaTriplesix

For PostgreSQL and MySQL, Read-only in the SQL editor sets `default_transaction_read_only = ON` (resp. the MySQL session transaction mode) on a pooled session. It is a default, not an enforcement: a script can run `BEGIN READ WRITE` or `SET default_transaction_read_only = off` and then write, and the pool slot stays writable for later tabs. SQLite opens the file read-only, so it is a guarantee there; MCP has its own statement guard.

Decide which it is:

  1. A hint: say so in the UI text and the docs.
  2. A guarantee: refuse mutating statements in the editor while the toggle is on (`containsMutatingSql` exists), including `SET ... read_only`, `BEGIN READ WRITE` and `SET TRANSACTION READ WRITE`, and reset the slot's setting when it is taken from the pool.

Found in the review of the SQL safety layer.

Activity

  1. added
    questionFurther information is requested
    P3Low priority / Polish & Enhancements
    on Oct 25, 2026
  2. added a commit that references this issue on Oct 25, 2026
  3. ZhuchkaTriplesix commented on Oct 25, 2026

    @ZhuchkaTriplesix
    MemberAuthor

    Fixed on dev in #1804 (merged). Closing by hand: the PRs target dev, so GitHub would only close this when dev is merged into main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low priority / Polish & EnhancementsquestionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions