DotRocks 1.3.0
A minor release of DotRocks — a native .NET driver, Entity Framework Core provider, and Roslyn analyzer suite built specifically for StarRocks. It implements its own managed StarRocks client protocol and takes no runtime dependency on any MySQL driver. This release comes from a deep correctness and security review of the whole stack: it hardens the driver's connection lifecycle and protocol edge cases, closes literal-escaping gaps in the EF Core provider, and tightens the release pipeline, which now gates publishing on the StarRocks 3.5.5 and 4.0.7 integration matrix.
Added
DotRocksStreamLoadException.ResponseBodycarries the raw server response body on Stream Load HTTP failures, so diagnostic detail (auth, label, and format errors) is no longer discarded. The exception message itself still never embeds untrusted server text.
Changed
DotRocks.Analyzers.CodeFixesnow declares a NuGet dependency onDotRocks.Analyzers, so installing the code-fix package alone no longer yields a code-fix assembly whose analyzer dependency cannot load in the IDE.- The release workflow validates the tag format and the matching
CHANGELOG.mdsection, and gates NuGet publishing on the full StarRocks 3.5.5 / 4.0.7 integration matrix; all GitHub Actions are pinned to commit SHAs.
Fixed
- Commands whose payload spans multiple protocol packets (≥ 16 MiB) no longer fail with an out-of-order sequence error: the response reader continues from the writer's final sequence id.
- Disposing a partially-read data reader drains the remaining result set and leaves the connection open and usable instead of closing the logical connection;
CommandBehavior.SingleRowandCommandBehavior.SchemaOnlyare now honored. - A benign server error (for example a SQL typo) no longer closes the logical connection when the session has run
SET/USEor the physical connection has exceeded its lifetime — only genuinely broken connections are closed. - A server error arriving mid result set on the prepared (binary) protocol now surfaces the real server error code and message instead of a malformed-protocol failure, and the connection stays usable.
TIMEvalues beyond theTimeSpan.Parserange (up to MySQL's838:59:59, including negative and fractional values) parse correctly on the text protocol, and binary-protocolYEARvalues box asint, matchingGetFieldType.GetString/GetFieldValue<string>on binary columns throwInvalidCastExceptioninstead of silently returning"System.Byte[]".- Cancellation during
COM_STMT_CLOSEmarks the physical connection broken so a desynchronized connection can never return to the pool, and a pool-creation race no longer leaks the losing pool's idle-eviction timer. - A plain
decimalproperty with precision beyond the native range maps through adecimal↔DotRocksDecimalvalue converter instead of a converter-less mapping with a mismatched CLR type. - Scaffolding round-trips no longer lose table shape: the design-time annotation code generator emits
DistributedRandomly(...)for random distribution (previously a broken zero-column hash-distribution call),HasSortKey(...), andHasStarRocksProperty(...). - The multi-row
SaveChangesanalyzer (DTR0007) only pairs a range operation with aSaveChangescall on the sameDbContextinstance and ignores mutually exclusive branches, removing false positives.
Security
DotRocksDataSource.ConnectionStringreturns the redacted connection string (password omitted), matchingDotRocksConnection.ConnectionString; created connections still authenticate with the original credentials.- Connection-string values containing
;, quotes, or=are serialized with properDbConnectionStringBuilderquoting instead of a backslash escape the parser does not understand, closing an option-injection hole (including a potential TLS downgrade) on the serialize → reparse round-trip. - EF Core string literals and migration
PROPERTIESkeys/values escape backslashes and control characters the same way the driver's literal formatter does, closing a literal-corruption gap for values ending in\; single quotes in table properties are now escaped rather than rejected.
Compatibility
- .NET 10 / C# 14. Source-compatible with 1.2.0; the only public API addition is
DotRocksStreamLoadException.ResponseBody. Behavioral changes to note:DotRocksDataSource.ConnectionStringno longer returns the password, disposing a partially-read reader keeps the connection open,GetStringon binary columns now throws, andDotRocks.Analyzers.CodeFixesnow installsDotRocks.Analyzersas a dependency.
Full Changelog: v1.2.0...v1.3.0