sql(mysql): accept any spelling of ON DUPLICATE KEY UPDATE in the update helper - #32040
Open
robobun wants to merge 2 commits into
Open
sql(mysql): accept any spelling of ON DUPLICATE KEY UPDATE in the update helper#32040robobun wants to merge 2 commits into
robobun wants to merge 2 commits into
Claude / Claude Code Review
completed
Jun 12, 2026 in 11m 24s
Code review found 1 potential issue
Found 1 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 0 |
| 🟣 Pre-existing | 1 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟣 Pre-existing | src/js/internal/sql/mysql.ts:282-286 |
isUpsertUpdate still requires exact single-space whitespace between keywords |
Annotations
Check notice on line 286 in src/js/internal/sql/mysql.ts
claude / Claude Code Review
isUpsertUpdate still requires exact single-space whitespace between keywords
nit (pre-existing, non-blocking): this still requires exactly one ASCII space between each keyword. `detectCommand()` tokenizes on any whitespace, so `... ON DUPLICATE KEY\n UPDATE ${sql(data)}` (or double spaces / tabs) is detected as `SQLCommand.update`, fails this 23-char tail match, and gets the same spurious ` SET ` this PR fixes for lowercase. Since this line is being rewritten anyway, testing the trimmed tail against `/on\s+duplicate\s+key\s+update$/i` would close the whole class — but t
Loading