Skip to content

fix(sql-editor): skip Safe mode confirm for SELECT/JOIN reads - #245

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/safe-mode-select-joins-847b
Aug 13, 2026
Merged

fix(sql-editor): skip Safe mode confirm for SELECT/JOIN reads#245
cursor[bot] merged 1 commit into
mainfrom
cursor/safe-mode-select-joins-847b

Conversation

@huyplb

@huyplb huyplb commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Problem

Safe mode’s Tables≥ threshold treated every statement that referenced enough tables as confirmation-worthy — including read-only SELECT … JOIN … JOIN … queries. That dialog is meant to suggest wrapping related writes in a transaction; a multi-table SELECT is not a write.

Change

  • New collectMultiTableWriteWarnings(statements, threshold) skips statements that are not writes (isWriteStatement).
  • SELECT / JOIN / WITH … SELECT reads no longer open the Safe mode dialog.
  • UPDATE / DELETE / INSERT / SELECT … INTO (and other writes) that meet the threshold still warn.
  • Toolbar tooltip and comments updated to match.

Tests

Unit coverage in sql-splitter.test.ts for SELECT joins, mixed batches, SELECT INTO, and threshold 0.

Open in Web Open in Cursor 

The Tables≥ threshold was prompting on any statement that referenced
enough tables, including read-only SELECT joins. Multi-table confirm
now applies only to write statements (UPDATE/DELETE/INSERT/DDL).

Co-authored-by: huy.phan9 <huyplb@users.noreply.github.com>
@huyplb
huyplb marked this pull request as ready for review August 13, 2026 06:09
@cursor

cursor Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_4f059373-111d-4b5b-b3b0-2bcdedbfe26e)

@cursor
cursor Bot merged commit b5ca350 into main Aug 13, 2026
11 checks passed
@cursor
cursor Bot deleted the cursor/safe-mode-select-joins-847b branch August 13, 2026 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants