Skip to content

2.7.8

Latest

Choose a tag to compare

@github-actions github-actions released this 01 Dec 00:25

Merged PRs

dolt

  • 12698: Fix dolt_merge panic when flags are given without a branch name
    • Fixes #12668: CALL DOLT_MERGE('-m', 'msg') panicked with index out of range because the missing-branch check looked at the raw arguments rather than the parsed positional arguments. It now returns error: Please specify a branch to merge.
  • 12694: Remove dolt assist command
    Removes the hidden dolt assist command.
  • 12691: Test filtered index statistics across Dolt branches
    Add a regression test for the branch-qualified index statistics fix in go-mysql-server#4241, now included on main.
    The test queries a populated feature branch from an empty main session and checks the result and merge join. Changing the SKU predicate from an in-range value to an out-of-range value changes the selected index, demonstrating that the optimizer uses the feature branch’s histogram.
  • 12689: cluster: Start each commit hook once when a database is created before replication starts
    A database created before RunCommitHooks, like the default database Doltgres creates during engine initialization, had its hook started both on creation and by RunCommitHooks, so two threads replicated it to the same standby. Hooks registered before RunCommitHooks are now left for it to start.
  • 12655: Roll back transactions that commit to a deleted branch
    Writing a branch's working set now requires the branch to exist, so a commit can no longer report success while orphaning its changes. A session that deletes a branch drops its own state for it.
  • 12654: Read other sessions' active heads under their session lock
    Fixes the concurrent map access crash in dolt_branch('-d') and dolt_branch_activity (#12264), and dolt_branch_activity failing for every session once any session's checked out branch is deleted.
  • 12650: jwtauth: Bound MultiJWKS fetches with a timeout and return from GetKey as soon as any peer serves the key.
    Fixes #12633.
  • 12640: Make dolt_log('--all') match git log --all
    • Fixes #12157: dolt_log('--all') ignored --all and returned only HEAD's history. It now walks HEAD and every ref that points to a commit (local and remote tracking branches, tags, workspaces), like git log --all, and works with revision ranges, --not and --tables.
    • dolt log --all faked the flag by passing branch names as revisions, so it missed tags and failed on A..B and A...B. It now passes --all through.
  • 12573: Fewer requests when opening a blobstore remote
    • Opening an archive on a blobstore remote read its footer and then its index. Both now come from a single suffix read sized from the manifest's chunk count, with a second read only when the archive's metadata is unusually large.
    • S3, OCI and git remotes now write new table files as archives and look for the archive first when opening, so most opens no longer start with a failed lookup.
    • Suffix ranges longer than a blob now return the whole blob in every blobstore, as HTTP does; the in-memory blobstore panicked and the git blobstore errored.
    • Limit the number of parallel requests (surge in issue is what throttled them)
    • Buffers used to read archive indexes and metadata from a remote are now taken from the memory quota and released once decoded.
      GETs for a fresh clone of an s3:// remote (MinIO behind a counting proxy):
      | Remote | before #12563 | main | this PR | this PR vs main |
      |---|---|---|---|---|
      | 157 archives + 157 table files (shaped like the remote in #12558) | 1,415 | 944 | 787 | -17% |
      | 314 archives (what new pushes produce with this PR) | 2,200 | 1,258 | 630 | -50% |
      Fixes: #12558
      Fixes: #12570
  • 12547: dolt_status: match dolt_ignore patterns per schema
    dolt_status and dolt_status_ignored matched ignore patterns against the schema-qualified name and only read the default schema's patterns, so ignored tables in Doltgres showed up in dolt_status. Each new table is now matched against its own schema's patterns. Doltgres test updates: dolthub/doltgresql#3906. Takes over #12446.
  • 12540: Apply UCA ignorable character rules to Dolt indexes
    Dolt storage and index comparisons now skip ignorable characters like zero-width spaces, joiners, and control characters in Unicode Collation Algorithm (UCA) collations such as utf8mb4_unicode_ci and utf8mb4_0900_ai_ci. This keeps index lookups, range scans, and UNIQUE constraints consistent with query execution.
    -- 0x62E2808B6F62 is 'b' + zero-width space + 'ob'
    CREATE TABLE t (id INT PRIMARY KEY, v VARCHAR(64) COLLATE utf8mb4_unicode_ci, UNIQUE KEY (v));
    INSERT INTO t VALUES (1, 'bob');
    INSERT INTO t VALUES (2, CAST(0x62E2808B6F62 AS CHAR));
    -- ERROR: Duplicate entry 'bob' for key 't.v'
    Strings indexed under PAD SPACE UCA collations also treat trailing spaces followed by ignorable characters as insignificant during lookups. NO PAD UCA 9.0.0, non-UCA, and binary indexes are unchanged.

    [!NOTE]
    Existing UCA indexes that contain ignorable characters or trailing spaces in PAD SPACE collations need to be rebuilt.

    ALTER TABLE t DROP INDEX v, ADD UNIQUE INDEX v (v);
    Blocked by dolthub/go-mysql-server#4180
    Fixes #12342
    Closes #12702

go-mysql-server

  • 4241: Use the resolved database for filtered index statistics
    Filtered index costing used the underlying table’s database name to request statistics. In Dolt, that can discard an explicit branch qualifier and cost a populated branch using statistics from the session’s empty branch.
    Request statistics using the database from the resolved table node. Match the returned index statistics under either database name, and reuse the resolved table’s row estimate when an index histogram is missing.
  • 4240: Require SUPER to name another account as an event's DEFINER
    CREATE EVENT and ALTER EVENT accepted any DEFINER, and the scheduler runs events as their definer, so any account with EVENT on a database could run SQL as root. They now fail with ER_SPECIFIC_ACCESS_DENIED_ERROR unless the definer is the current user or the caller has SUPER, as in MySQL.
  • 4239: sql/rowexec: Fix secure_file_priv check admitting sibling paths with the same name prefix.
    sql/rowexec: Fix secure_file_priv check admitting sibling paths with the same name prefix.
  • 4232: Return a signed result from TIME_TO_SEC
    Fixes: #12609
  • 4223: Allow calling external procedures when the current database doesn't resolve
    An integrator's procedure can be what repairs the current database, like Dolt's dolt_checkout() after the session's checked out branch is deleted.
  • 4218: Support registering computed global status variables
    Add AddStatusVariables so engines can register status variables during initialization. A global variable can supply a getter that SHOW GLOBAL STATUS evaluates on each query.
  • 4216: Allow integrator IN subquery expressions to be unnested into semi joins
    Allows integrator IN subquery expressions to be unnested into semi joins, and fixes keyless update joins with duplicate rows.
    Companion PR: dolthub/doltgresql#3951
    Fixes dolthub/doltgresql#3863
  • 4214: Return NULL for invalid FROM_BASE64 input and ignore whitespace
    FROM_BASE64() now returns NULL instead of an error for invalid base64 inputs and is marked nullable, so IS NULL filters and CREATE TABLE ... AS SELECT produce nullable columns even over NOT NULL inputs.
    SELECT FROM_BASE64('!!!!'), FROM_BASE64('YQ'), FROM_BASE64('YQ==='), FROM_BASE64('YQ==YQ==');
    -- NULL, NULL, NULL, NULL
    Whitespace bytes (space, tab, LF, CR, vertical tab, form feed, and Latin-1 0xA0) are stripped before decoding, so whitespace anywhere in the input is ignored.
    SELECT FROM_BASE64(' YQ=='), FROM_BASE64('   ');
    -- 'a', ''
    Non-UTF-8 binary values now return NULL instead of failing UTF-8 conversion with invalid type: string. ENUM, SET, numeric, and multi-byte character set inputs convert to their ASCII-compatible byte representation before decoding.
    SELECT FROM_BASE64(x'ff'), FROM_BASE64(_utf16 0x00a000590051003d003d);
    -- NULL, 'a'

    [!NOTE]
    RangeMap.Encode now bounds rune lookups against len(str) so unencodable trailing characters return (nil, false) safely when fewer bytes remain than the longest mapping.
    Fixes #12606

  • 4213: Return an error when ALTER TABLE changes whether a column is virtual
    Fixes #12268. Changing a column between VIRTUAL and non-VIRTUAL now returns MySQL's error 3106 instead of corrupting data, and changing a plain column to STORED now recomputes its values.
  • 4212: Add left outer merge join test with a residual filter
    Adds a test for left outer merge joins with a single right match per key and a residual filter.
    Companion PRs: #12632 dolthub/doltgresql#3944
    Fixes dolthub/doltgresql#3939
  • 4211: Truncate CAST/CONVERT to CHAR(n) and BINARY(n) for string literals
    Fixes truncation of CAST(x AS CHAR(n)) and BINARY(n) when the input already has the conversion's type.
    Fixes #12624
  • 4210: Support SUBSTRING(str FROM pos) without FOR
    Supports SUBSTRING(str FROM pos) and SUBSTR(str FROM pos) without FOR.
    Companion PR: dolthub/vitess#515
    Fixes #12623
  • 4197: Don't use correlated subqueries as join keys on the wrong side
    • #12551: a correlated subquery in a join filter could be chosen as a hash (or range) join key for the side that doesn't provide its outer columns, so it was evaluated against the wrong row. Depending on the row layout this gave unable to find field with index N in row of M columns or silently wrong results. satisfiesScalarRefs now requires a subquery's correlated columns to come from the side it is assigned to.
  • 4191: Preserve SET values when modifying columns with ALTER TABLE
    ALTER TABLE MODIFY on a SET column now re-encodes stored bitmasks by member name when members are reordered, inserted before existing members, removed, or given a new collation. Unchanged and append-only SET definitions continue to skip rewriting the table.
    CREATE TABLE t (id INT PRIMARY KEY, s SET('a','b','c'));
    INSERT INTO t VALUES (1, 'a'), (2, 'a,c');
    ALTER TABLE t MODIFY s SET('c','b','a');
    SELECT id, s FROM t ORDER BY id;
    -- (1, 'a'), (2, 'c,a')
    Removing an unused SET member succeeds in both strict and non-strict mode without warnings. Removing a SET or ENUM member that is still in use fails with a data truncation error (1265) in strict mode without modifying the table; in non-strict mode, the removed value is dropped with a truncation warning instead.
    Generated columns and default expressions that depend on a modified SET or ENUM column re-encode their values consistently while preserving NULL values. Comma-separated SET strings are no longer interpreted as numeric bitmasks.
    For #12013
  • 4180: Skip ignorable characters in UCA string comparisons
    Unicode Collation Algorithm (UCA) collations, including utf8mb4_unicode_ci, utf8mb4_unicode_520_ci, and utf8mb4_0900_ai_ci, now skip ignorable characters like zero-width spaces, joiners, and control characters during string comparison, sorting, grouping, and joins.
    -- 0x62E2808B6F62 is 'b' + zero-width space + 'ob'
    SELECT
    CAST(0x62E2808B6F62 AS CHAR) COLLATE utf8mb4_unicode_ci = 'bob' COLLATE utf8mb4_unicode_ci AS uca_equal,
    CAST(0x62E2808B6F62 AS CHAR) COLLATE utf8mb4_general_ci = 'bob' COLLATE utf8mb4_general_ci AS general_equal;
    -- uca_equal: 1, general_equal: 0
    Strings that differ only by invisible formatting characters now compare equal and land in the same groups and join buckets under UCA collations. Non-UCA collations (utf8mb4_general_ci, latin1_swedish_ci), binary collations, and character-level operators like LIKE and INSTR remain unchanged.
    In PAD SPACE UCA collations (UCA 4.0.0 and 5.2.0), trailing spaces followed by ignorable characters are also insignificant, while NO PAD UCA 9.0.0 collations still preserve trailing spaces.
    -- 0x6120E2808B is 'a ' + zero-width space
    SELECT
    CAST(0x6120E2808B AS CHAR) COLLATE utf8mb4_unicode_ci = 'a' COLLATE utf8mb4_unicode_ci AS pad_space,
    CAST(0x6120E2808B AS CHAR) COLLATE utf8mb4_0900_ai_ci = 'a' COLLATE utf8mb4_0900_ai_ci AS no_pad;
    -- pad_space: 1, no_pad: 0
    Blocks #12540
  • 4172: Enforce max_allowed_packet limits in SPACE, REPEAT, LPAD, and RPAD
    SPACE(), REPEAT(), LPAD(), and RPAD() now enforce @@max_allowed_packet before allocating output strings.
    SET @@max_allowed_packet = 1024;
    SELECT SPACE(1025);
    -- NULL
    -- Warning (Code 1301): Result of space() was larger than max_allowed_packet (1024) - truncated
    INSERT INTO t VALUES (SPACE(1025));
    -- ERROR 1301 (HY000): Result of space() was larger than max_allowed_packet (1024) - truncated
    INSERT IGNORE INTO t VALUES (SPACE(1025));
    -- Query OK, 1 row affected, 1 warning
    -- Warning (Code 1301): Result of space() was larger than max_allowed_packet (1024) - truncated
    Fixes #12514
  • 4153: Support window frame exclusion
    Supports window frame exclusion clauses (EXCLUDE CURRENT ROW / GROUP / TIES).
    Companion PRs: dolthub/vitess#507, dolthub/doltgresql#3847

vitess

  • 515: Support SUBSTRING(str FROM pos) without FOR
    Supports SUBSTRING(str FROM pos) and SUBSTR(str FROM pos) without FOR.
    Companion PR: dolthub/go-mysql-server#4210
    Fixes #12623
  • 514: go/mysql: fix server-side cursor fetches hanging; send cursor status flags on fetch
    Builds on #495, keeping its commit.
    • Server-side cursor fetches hang when the client pauses between them (Dolt 2.1.11+). The cursor's query outlives COM_STMT_EXECUTE, so go-mysql-server's client-activity watcher Peeks the connection while the command loop reads the next COM_STMT_FETCH, and that packet is lost. The watcher now stays off the reader while a cursor is open.
    • Fetch EOFs on an open cursor carried no cursor status bit. They now carry SERVER_STATUS_CURSOR_EXISTS, and the exhausting fetch carries SERVER_STATUS_LAST_ROW_SENT alone, as MySQL does.
  • 513: allow expressions for EVERY clause in CREATE EVENT
    Any valid expression can be used in the EVERY clause for the CREATE EVENT syntax.
  • 507: Add frame exclusion to window Frame AST
    Adds window frame exclusion (EXCLUDE CURRENT ROW / GROUP / TIES) to the Frame AST.
    Companion PRs: dolthub/go-mysql-server#4153, dolthub/doltgresql#3847
  • 499: Support reading and writing transaction IDs (XID) in binary log events
    Expose 8-byte transaction IDs (XID) in binary log events to allow tracking and construction of specific committed transactions.

Closed Issues

  • 12342: utf8mb4_unicode_ci does not ignore U+200B ZERO WIDTH SPACE in equality
  • 12157: dolt_log('--all') ignores --all
  • 12668: CALL DOLT_MERGE('-m', 'msg') with no branch name panics with index out of range and closes the client connection
  • 12558: S3 clone bursts ranged GETs and fails with proxy HTTP 429; configurable remote-open rate/concurrency?
  • 12520: Support cheaperinference or custom OpenAI-compatible endpoints in dolt assist
  • 12669: TRUNCATE of a DOUBLE outside the DECIMAL range panics (unchecked *apd.Decimal assertion in truncate.go)
  • 12514: SPACE() with a huge count panics ("makeslice: len out of range"); INSERT drops the connection (ERROR 2013)
  • 12609: TIME_TO_SEC() of a negative time returns an unsigned 64-bit wrap-around value (TIME_TO_SEC('-00:00:05') is 18446744073709551611, MySQL returns -5)
  • 12570: Archive index loading reads into buffers allocated outside the memory quota provider
  • 12606: FROM_BASE64() returns ERROR 1105 ("illegal base64 data at input byte N" or "invalid type: string") for invalid input where MySQL returns NULL, and rejects leading whitespace that MySQL ignores
  • 12551: ER_UNKNOWN_ERROR: unable to find field with index 64 in row of 6 columns.
  • 12268: MODIFY of a VIRTUAL column to STORED moves the next column's values into it
  • 12633: sql-server cluster: a standby cannot authenticate a restarted primary while another peer is unreachable (JWKS fetch has no timeout and GetKey waits for every peer)
  • 3706: Constraint-violation errors return SQLSTATE HY000 instead of 23000 (MySQL parity gap)