github dolthub/dolt v2.3.4
2.3.4

4 hours ago

Merged PRs

dolt

  • 11796: go/store/nbs: journal_writer.go: Fix a rare race where the journal_writer entered a weird state because its caller context Canceled as it was bootstraping.
  • 11791: Warn about session-only checkout in noninteractive SQL
    Warns when a lone dolt_checkout() call in noninteractive SQL changes only the SQL session's branch, leaving the CLI branch unchanged.
    Fixes #6876
  • 11790: Add virtual name indexes for tags and branches
    Adds virtual name indexes with cached ref lookups for dolt_tags and dolt_branches.
    Fixes #10365
    Companion PR: dolthub/doltgresql#3342
  • 11788: Persist sql_mode as string and reload on server startup
    Fix #11776
  • 11785: Validate vector index creation without restricting schema loading
    Preserves existing vector index schemas while validating new index creation, with Dolt commit/reset regression tests and shared DDL coverage in dolthub/go-mysql-server#3858.
    Fixes #10448
  • 11782: Omit generated columns from SQL diff assignments
    Omits generated columns from SQL diff assignments and suppresses updates with no assignable columns, carrying forward #11476 with Elian's review feedback addressed.
    Fixes #11445
  • 11780: Handle statement cancellation in the SQL shell
    Supports \c cancellation in the interactive SQL shell, carrying forward #11291 with regression coverage verifying canceled single-line and multiline inserts leave the table empty.
    Fixes #10867
  • 11772: Fix foreign keys with dropped columns
    Changes are used by:
  • 11755: build(deps): bump google.golang.org/grpc from 1.83.1 to 1.83.2 in /integration-tests/go-sql-server-driver
    Bumps google.golang.org/grpc from 1.83.1 to 1.83.2.
    Release notes

    Sourced from google.golang.org/grpc's releases.

    Release 1.83.2

    Security

    • server: Reject requests missing both :authority and Host headers with HTTP 400 and status Internal. (grpc/grpc-go#9365)
    Commits

    [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google.golang.org/grpc&package-manager=go_modules&previous-version=1.83.1&new-version=1.83.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
    Dependabot commands and options
    You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/dolthub/dolt/network/alerts).
  • 11303: sql: fix empty/comment-only query handling in interactive shell

    What

    In the interactive dolt sql shell, two related edge cases around empty/comment-only statements produced confusing output instead of clear, MySQL-consistent behavior:
    1. A bare empty query (e.g. typing just ;) silently printed Empty set, 1 warning with a warning body of query was empty after trimming comments, instead of a clear client-side error.
    2. A comment-only query (e.g. -- foo ;) behaved the same way — a spurious "empty" warning — instead of being silently skipped the way dolt sql < file.sql (batch mode) already treats it.
      This PR makes the shell branch on sqlparser.ErrEmpty explicitly in execShell's Uninterpreted callback (go/cmd/dolt/commands/sql.go):
    • A truly empty statement (nothing left after ; is stripped) now prints a MySQL-style No query specified error, matching how the real mysql CLI responds to a bare ;.
    • A comment-only statement (non-empty input that parses to ErrEmpty because it's all comment) is now skipped silently — no output, no warning — which mirrors the existing behavior of execBatchMode, where err == sqlparser.ErrEmpty is already a silent continue.

    Why

    Batch mode (execBatchMode, sql.go) and processQuery (used by scripting/non-interactive paths) both already treat sqlparser.ErrEmpty as "silently skip." The interactive shell was the only place papering over this with a fake Empty set, 1 warning result, which is misleading — there's no result set, and the "warning" concept here doesn't correspond to anything the query actually did. This change brings the shell in line with the rest of the codebase's handling of empty statements while adding a genuinely useful error for the truly-empty case (bare ;), since that's a real MySQL client-side error dolt users would expect to see.
    Closes #10864
    Closes #10863
    Thanks to angelamayxie for the original reports.

    Test plan

    • go build ./cmd/dolt/... — passes
    • go vet ./cmd/dolt/... — passes
    • gofmt -l go/cmd/dolt/commands/sql.go — clean
    • New bats regression tests added in integration-tests/bats/sql-shell.bats:
    • sql-shell: bare empty query gives MySQL-style error, not a warning (uses new sql-shell-empty-query.expect)
    • sql-shell: comment-only query is skipped silently, no warning (uses new sql-shell-comment-only-query.expect)
    • Both new bats tests run locally against a freshly built dolt binary and pass:
    ok 1 sql-shell: bare empty query gives MySQL-style error, not a warning
    ok 1 sql-shell: comment-only query is skipped silently, no warning
    
    • Full sql-shell.bats suite regression run was kicked off locally to check for unrelated breakage; not gating this PR description on it since the two new/targeted cases already passed cleanly and no other test in the file touches this code path.

go-mysql-server

  • 3858: Cover vector index nullability across DDL paths
    Extends vector-index nullability regression coverage to JSON columns and ALTER TABLE, complementing Dolt's engine coverage in #11785.
    Fixes #10448
  • 3857: Set return type for population statistic aggregate functions
    Fixes #11391
  • 3855: Implement Numeric to Date conversions
    Implements conversions from numeric types (int, float, decimal) to DATETIME types.
    Partially addresses: #10278
    Fixes: #10088
  • 3852: Reject unsupported DISTINCT window aggregates
    Rejects DISTINCT window aggregates with MySQL 8.4-compatible error 1235 / SQLSTATE 42000 for COUNT, SUM, and AVG, including multi-argument COUNT, while preserving accepted MIN and MAX behavior.
    Adds engine coverage for the exact customer reproduction and adjacent aggregate behavior.
    Fixes #11392
  • 3847: Remove schema length check when analyzing subquery aliases
    Fixes #11501
    When analyzing subquery aliases, checking if the child schema length matched the ColumnNames length was too strict. In nested subqueries, it's possible the child schema length was already reduced due to table pruning when the child subquery was analyzed. This check was removed altogether because we don't have any tests that actually rely on this check happening.
  • 3845: Fix CHAR values differing only in trailing space to be equal
    Fix #11464
  • 3841: Delimit window partition and order expressions in PartitionId
    Fix #11461
  • 3840: Support pluggable UPDATE assignment evaluation
    Adds an UpdateExpressionApplier engine override for PostgreSQL assignment semantics in dolthub/doltgresql#3300 while preserving MySQL evaluation by default.
    Fixes dolthub/doltgresql#3092
  • 3836: [4/6] Test grouped windows and iterator cleanup
    Adds regression coverage for grouped windows, HAVING order, and iterator cleanup already fixed on main, stacked on #3835 with compatibility in #11753 and dolthub/doltgresql#3291.
  • 3835: [3/6] Fix user-variable strings and prepared bindings
    Fixes UserVar SQL quoting and prepared lookup by variable name, stacked on #3834 with compatibility in #11753 and dolthub/doltgresql#3291.
  • 3834: [2/6] Fix subquery strings and scalar alias resolution
    Fixes Subquery and InSubquery SQL strings while preserving scalar alias resolution, stacked on #3833 with compatibility in #11753 and dolthub/doltgresql#3291.
  • 3833: [1/6] Fix independent expression strings and descriptions
    Fixes independent expression SQL strings and descriptions from #3803, with follow-ups starting at #3834 and compatibility in #11753 and dolthub/doltgresql#3291.
  • 3832: Always return transform.NewTree when replacing GetField with aliased projection expression
    Fixes #11407
    When pushing filters below a subquery alias, we were only returning transform.NewTree when an aliased expression mapped to a GetField has been recursively transformed. However the GetField gets replaced with the aliased expression regardless if it gets transformed recursively, this is incorrect, and we should always be returning transform.NewTree. Not returning transform.NewTree was causing us to not be able to find the correct field index for certain expressions.
  • 3825: Support multi-byte strings and collation derivation in LPAD and RPAD
    • Derive output collation and coercibility from string operand.
    • Replace byte-level padding with code-point counting.
    • Add CharSetHandler for multi-byte handling.
    • Fix invalid Go error formatting when during evaluation.
      Fix #11380
      Blocked by dolthub/go-mysql-server#3824
  • 3824: Fix collation coercibility resolution and binary collation detection
    • Add CollationID.IsBinary
    • Align coercibility resolution to MySQL precedence rules for explicit conflicts, binary precedence, and charset conversion.
    • Add ResolveCoercibilityExpressions for future correctness and reduce boilerplate.
      Block dolthub/go-mysql-server#3825
  • 3823: Fix BIGINT arithmetic overflow handling
    Dolt currently allows BIGINT arithmetic to wrap at signed and unsigned boundaries. This applies MySQL integer result typing, performs checked native addition, subtraction, and multiplication, and honors NO_UNSIGNED_SUBTRACTION. MySQL-only engine scripts cover literal, stored-column, mixed-sign, SQL mode, and prepared execution paths, while protocol errors preserve MySQL error 1690 and SQLSTATE 22003.
    Fixes #11411
  • 3822: Fix empty inserts with generated columns
    Preserve implicit all-empty VALUES rows as zero-width sources so insert analysis materializes defaults and generated expressions against the complete destination schema. Reject mixed empty and non-empty tuple widths to match MySQL, with coverage for generated, invisible, auto-increment, atomic, and prepared cases.
    Fixes #11388
  • 3820: Added DESC indexes and NULL ordering
    This implements DESC indexes and NULL ordering (nulls can be set to be first or last). NULL ordering is primarily used by integrators.
    Related PRs:
  • 3807: Fix SELECT list alias resolution in window clauses
    Fixes an issue where window function clauses could incorrectly resolve or shadow column references using SELECT list aliases.
    • Allow expressions in window clauses to reference SELECT list aliases while preserving resolution to underlying table columns.
    • Normalizes SELECT list alias lookup keys to lower case for consistent case-insensitive matching.
      Fix #11502
  • 3780: Fix EXISTS over ungrouped aggregate subqueries
    Ungrouped aggregates produce one row even when their input is empty. Preserve that cardinality when simplifying EXISTS subqueries so correlated forms retain correct results without suppressing aggregate expression evaluation.
    Teach TableCopier to expose its independently analyzed create and source trees, accept integrator-owned create destinations through the standard sql.Nameable contract, and close the create iterator before copying rows. Adds coverage for SELECT and write statements, including CTAS, plus HAVING / LIMIT / OFFSET boundaries.
    Companion: dolthub/doltgresql#3274
    Fixes #11489
    Fixes #11477
    Fixes #11508

Closed Issues

  • 11399: Dolt raises an internal field-index error for sibling SUM/AVG windows
  • 11396: Dolt RANGE BETWEEN 1 PRECEDING AND CURRENT ROW over BIGINT UNSIGNED loses the current row at the lower boundary.
  • 11545: Dolt swallows a child-expression evaluation error in SUM
  • 11460: Dolt forms incorrect RANGE boundaries for a correlated computed order key
  • 11425: Dolt reports an internal row-index bug for invalid NTILE(column).
  • 10365: dolt_tags system table missing index on tag_name - causes O(n) lookup
  • 6876: Warn users about running dolt sql -q "call dolt_checkout(...);"
  • 11391: Dolt computes population statistical aggregates incorrectly for INT input.
  • 11776: SET PERSIST sql_mode does not survive a sql-server restart ("value N was not found in the set")
  • 10448: VECTOR INDEX: batch inserts fail with NULL embeddings after ~83 rows
  • 10088: allow for times between 0000-00-00 and 0000-01-01
  • 11445: dolt diff -r sql emits statements that assign generated columns
  • 10867: Dolt shell doesn't handle \c
  • 10863: Do not emit warnings for empty query after trimming comments
  • 10864: MySQL has error for empty delimited queries whereas Dolt has misleading warning
  • 11411: Dolt arithmetic on BIGINT UNSIGNED values wraps into signed negative values.
  • 11388: Dolt raises an internal row-index error for emptyINSERT ()
  • 11392: Dolt silently ignores DISTINCT for COUNT and SUM window aggregates.
  • 11747: sql-server auto-GC published a manifest whose root chunk was not preserved; only dolt_ignore'd (working-set-only) tables were lost
  • 11501: Nested multi-column VIEW + self EXISTS → ERROR 1105 column-count mismatch
  • 11464: CHAR PAD SPACE values split a window partition
  • 11502: Dolt reaches an internal error on invalid window ORDER BY alias.
  • 11407: if(<cond>, <literal>, <column>) in a WHERE over a view raises internal error
  • 11741: git remotes: a cancelled push/fetch wedges sql-server indefinitely — CommandContext kills only the direct git child, and the orphaned transport holds the pipe Wait() reads
  • 11508: Correlated EXISTS loses an empty aggregate row
  • 11477: Wrong results: EXISTS/NOT EXISTS over an un-grouped aggregate subquery is mis-evaluated in a WHERE filter
  • 11489: Silent data loss: EXISTS/NOT EXISTS over an un-grouped aggregate subquery corrupts DELETE/UPDATE/INSERT-SELECT/CREATE-TABLE-AS write paths (uncorrelated form deletes the whole table)
  • 11380: RPAD()/LPAD() has unexpected behvior
  • 11461: Distinct window partition/order shapes collide in PartitionId

Don't miss a new dolt release

NewReleases is sending notifications on new releases.