+1
−1
+12
−7
+4
−1
Loading
NewConnector parsed the query string itself to reject a malformed dsn early.
getVFSName is what newConn calls for the same purpose, and it does strictly
more: the same url.ParseQuery, plus a check for conflicting vfs parameters.
Calling it instead drops an import, removes the repeated parse, and keeps what
NewConnector rejects aligned with what opening a connection rejects by
construction rather than by matching two call sites by hand.
The eager contract widens accordingly: "file:x?vfs=a&vfs=b" is now reported by
NewConnector rather than by the first Connect. It was already an error either
way, so no dsn changes from accepted to rejected. Everything a connection must
exist to check - unknown parameters, out-of-range values - is still reported by
Connect, as documented.
v1.56.0 is not tagged, so no release shipped the narrower behavior.
Co-Authored-By:
Claude Opus 5 (1M context) <noreply@anthropic.com>