Skip to content

DotRocks 1.3.0

Choose a tag to compare

@kidoz kidoz released this 01 Jul 22:11
· 143 commits to main since this release

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.ResponseBody carries 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.CodeFixes now declares a NuGet dependency on DotRocks.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.md section, 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.SingleRow and CommandBehavior.SchemaOnly are now honored.
  • A benign server error (for example a SQL typo) no longer closes the logical connection when the session has run SET / USE or 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.
  • TIME values beyond the TimeSpan.Parse range (up to MySQL's 838:59:59, including negative and fractional values) parse correctly on the text protocol, and binary-protocol YEAR values box as int, matching GetFieldType.
  • GetString / GetFieldValue<string> on binary columns throw InvalidCastException instead of silently returning "System.Byte[]".
  • Cancellation during COM_STMT_CLOSE marks 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 decimal property with precision beyond the native range maps through a decimalDotRocksDecimal value 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(...), and HasStarRocksProperty(...).
  • The multi-row SaveChanges analyzer (DTR0007) only pairs a range operation with a SaveChanges call on the same DbContext instance and ignores mutually exclusive branches, removing false positives.

Security

  • DotRocksDataSource.ConnectionString returns the redacted connection string (password omitted), matching DotRocksConnection.ConnectionString; created connections still authenticate with the original credentials.
  • Connection-string values containing ;, quotes, or = are serialized with proper DbConnectionStringBuilder quoting 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 PROPERTIES keys/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.ConnectionString no longer returns the password, disposing a partially-read reader keeps the connection open, GetString on binary columns now throws, and DotRocks.Analyzers.CodeFixes now installs DotRocks.Analyzers as a dependency.

Full Changelog: v1.2.0...v1.3.0