Repository navigation
feat(datagrid): refuse a grid save that would send an UPDATE or DELETE without a WHERE - #3700
Merged
Merged
Conversation
…E without a WHERE
datlechin
enabled auto-merge (squash)
October 20, 2026 14:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SQLUnfilteredWrite(TableProSQLGrammar) decides whether a WHERE is the statement's own. A WHERE in a comment, a literal, a quoted identifier, a subquery or a bind parameter name does not count. It reads every statement in the text, one T-SQL runs without a;, a CTE-led one, a writing CTE body, and ClickHouse'sALTER TABLE ... UPDATE/DELETE.WITH ... DELETE FROM t, and a DELETE whose only WHERE sits in a subquery, now ask first.WHERE(id = 1)no longer does.IS NULL..claude/rules/tests.md, Where a test goes), so the host gate is their test.apple/scripts/probes/check-mysql-enum-set-save.shsaves ENUM and SET edits with the statements the save sends and reads them back. It passes on MySQL 8.4.11 and MariaDB 11.8.9.Test plan
RowChangeStatementFactoryUnfilteredWriteTests: a driver's UPDATE or DELETE with no WHERE, or with its only WHERE in a comment, a literal or a subquery, is refused. On main it is sent.SQLUnfilteredWriteTests,QueryClassifierUnfilteredDeleteTests,SpannerRowEditSQLRowMatchTests,ClickHouseDMLStatementTests, everyQueryClassifier*suite and the save coverage suites.verify.sh pluginsbuilds every registry plugin.Fixes #3664
Docs: TableProApp/docs#63