sql(mysql): retry a failed prepare instead of caching the error forever - #33189
Open
robobun wants to merge 5 commits into
Open
sql(mysql): retry a failed prepare instead of caching the error forever#33189robobun wants to merge 5 commits into
robobun wants to merge 5 commits into
Claude / Claude Code Review
completed
Jul 1, 2026 in 34m 12s
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/sql_jsc/mysql/MySQLQuery.rs:341-351 |
Concurrent query attached to a Parsing statement whose prepare fails hangs forever (pre-existing) |
Annotations
Check notice on line 351 in src/sql_jsc/mysql/MySQLQuery.rs
claude / Claude Code Review
Concurrent query attached to a Parsing statement whose prepare fails hangs forever (pre-existing)
Pre-existing (not introduced here), but relevant to the "queries that attached to the statement before the failure … still observe the error" claim: if two identical queries are issued concurrently on one connection (`Promise.all([sql`SELECT * FROM t`, sql`SELECT * FROM t`])`) and the shared prepare fails, the second query's promise never settles. `advance()` re-runs it, the general `Failed` match arm throws, `JSMySQLQuery::run`'s errguard sets its status to `Fail` on unwind, and `reject_with_js
Loading