You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[P1] [bug] handleSave toasts "Applied N change(s)" even when rows_affected = 0 — silent partial-success
Context
handleSave (ResultsGrid.tsx:288-307) builds N statements, sends as a transactional batch via one api.executeQuery call. Result includes rows_affected per statement, but the handler ignores it.
Problem
Per docs/audits/results.md F23.
If the WHERE matches 0 rows (per F1/F7), MySQL returns rows_affected: 0. Toast says "Applied 1 change(s)" but no row changed. Worse: START TRANSACTION + COMMIT succeeds with 0-rows-affected UPDATE — user thinks data changed, then re-run shows the original value.
Files
src/components/grid/ResultsGrid.tsx:288-307
Repro (if applicable)
Static analysis only.
Expected
Editing name on a row whose id was deleted by another connection → "Saved but 1 of 1 changes may not have applied". Editing the same row when it exists → "Applied 1 change(s)".
Proposed fix
Scope M. Inspect rows_affected from each statement's QueryResult; if any is 0, show a warning toast and optionally mark cells as "save failed" with red border.
Acceptance
0-rows-affected UPDATE shows a warning; non-zero shows success.
Fixed by #529 (commit dc1f76c). handleSave in src/components/grid/ResultsGrid.tsx now sums rows_affected across the statements it issues and warns on a shortfall, so an UPDATE that matched nothing no longer reports success.
Not auto-closed because the PR body wrote Refs #419 rather than a closing keyword.
Activity
fix(grid): write edits to the right table, addressed by the real key (#…
EVWorth commentedon Sep 4, 2026
Fixed by #529 (commit dc1f76c).
handleSavein src/components/grid/ResultsGrid.tsx now sumsrows_affectedacross the statements it issues and warns on a shortfall, so an UPDATE that matched nothing no longer reports success.Not auto-closed because the PR body wrote
Refs #419rather than a closing keyword.