Skip to content

Weasel 9.27.1

Choose a tag to compare

@jeremydmiller jeremydmiller released this 30 Aug 21:33
0dfcd24

One fix since 9.27.0, and it is the same shape as the nine that release carried: a path that failed without saying so.

#526 — a parameterless statement in a batch could be silently discarded. BatchBuilder.AppendWithParameters, in both the PostgreSQL and SQL Server dialects, wrote its SQL into the shared builder but created the underlying batch command only as a side effect of appending a parameter. A statement with no placeholders never reached that code, so the next StartNewCommand() cleared the builder and the SQL was gone — no exception, no log.

Whether it bit you depended on the caller's loop, not on the SQL. Callers that call StartNewCommand() ahead of every operation (Marten) were never affected. Callers that only separate operations were: polecat#517, where a statement queued through IDocumentSession.QueueSqlCommand disappeared whenever the same session also carried a document operation, while SaveChangesAsync reported success.

AppendWithParameters now pins the command down before writing anything — the same guard Append, AppendParameter and AddParameters have always carried. Nothing to do on upgrade.

Full notes: https://weasel.jasperfx.net/release-9-27