github dolthub/dolt v2.7.9
2.7.9

48 minutes ago

Merged PRs

dolt

  • 12730: integration-tests/go-sql-server-driver: Test that reading and writing server files requires the FILE privilege.
    Covers LOAD_FILE, SELECT ... INTO OUTFILE/DUMPFILE and LOAD DATA against sql-server's default empty secure_file_priv, for accounts with and without FILE.
  • 12727: Use dolthub/readline for the SQL shell
    Fixes #5824: the SQL shell no longer erases output above the prompt when editing a query that wraps. Switches from abiosoft/readline to dolthub/readline (via dolthub/ishell#14), which fixes cursor placement for wrapped lines, double-width characters, and prompts wider than the terminal. Based on the fix in dolthub/ishell#12 from @DavidLokison.
  • 12713: go/go.mod: Bump dolthub/dolt-mcp version.
  • 12712: fix nil value store in diff table indexes for adaptive-encoded keys
  • 12704: Add allow_ddl_in_prepared_statements system variable
    Adds the allow_ddl_in_prepared_statements system variable and fixes DDL execution in prepared statements.
    Companion PR: dolthub/go-mysql-server#4244
  • 12703: Support deleting remote tags with dolt push
    Fixes #12673: dolt push <remote> :refs/tags/<tag> and CALL dolt_push('<remote>', ':refs/tags/<tag>') now delete the tag on the remote instead of failing with unsupported mapping. The local tag is kept. Takeover of #12674
  • 12688: sqlserver: Add mcp_server.host and default the MCP listener to localhost
    The MCP server previously listened on all interfaces regardless of the SQL listener's host; it now binds mcp_server.host (or --mcp-host). It dials the SQL listener's configured host, or loopback for a wildcard, instead of always 127.0.0.1, and no longer sets DOLT_ROOT_HOST to change how the root user is created.
    sql-server also now warns at startup that the MCP endpoint is unauthenticated and points to the standalone dolt-mcp-server for authenticated access.
  • 12658: Test dolt_commit_diff tables filtered by subqueries
    Tests dolt_commit_diff tables filtered by subqueries.
    Companion PRs:
  • 12595: Fix duplicate and missing rows from lossy index range lookups
    • Lookups on a prefix index with several ranges that share a prefix (e.g. s = 'abc' or s = 'abd' on index (s(2))) returned each row once per range.
    • Range lookups on a prefix index with an exclusive lower bound that got trimmed (e.g. s > 'abc') missed rows sharing the bound's prefix.
    • IN / OR lookups on a geometry column in a non-spatial index returned rows twice when two values shared a spatial cell.
    • Follow-up to @fulghum's review comment on #12587: #12587 (comment)
  • 11936: Remove the transaction-disable switch
    Removes dolt_transactions_disabled and runs filter-branch queries with normal transactions on a scratch branch.

go-mysql-server

  • 4257: Return MySQL error 3594 for window aliases in aggregated HAVING
    Fixes #12283: an aggregated query whose HAVING referenced a window function alias failed with "unable to find field with index". It now returns MySQL's error 3594.
  • 4256: Fix SUBSTRING panic on huge length
    Fixes #12678
    startIdx + length can cause integer overflow, which can break this check. This just rearranges the math.
  • 4251: sql/planbuilder: Require the FILE privilege for LOAD_FILE and SELECT ... INTO OUTFILE/DUMPFILE.
    LOAD DATA already checked FILE, but LOAD_FILE and INTO OUTFILE/DUMPFILE let any user read or create files the server process can access. The check goes through the AuthorizationHandler, so integrators with their own handler, such as Doltgres, must handle AuthType FILE.
  • 4245: Unquote string defaults and format BIT literals in SHOW COLUMNS and DESCRIBE
    SHOW [FULL] COLUMNS, DESCRIBE, and information_schema.columns now format string, ENUM, SET, temporal, BIT, BINARY, and expression defaults consistently without SQL quoting or extraneous parentheses.
    Blocks dolthub/doltgresql#4015
    Fixes #12663
  • 4244: Preserve prepared statement SQL text and add allow_ddl_in_prepared_statements
    Preserves prepared statement SQL text across EXECUTE and adds the allow_ddl_in_prepared_statements system variable.
    Companion PR: #12704
  • 4243: Return MySQL error codes 1364, 3819, and 1067 with SQLSTATEs for default and CHECK constraint errors
    Fixes #12665
  • 4242: Fix JSON function panics on NULL, non-string, and wrapped string arguments
    Fixes #12626
    JSON functions type-asserted their string arguments, which panicked on NULL or non-string paths and on wrapped TEXT values from Dolt. They now use types.ConvertToString, and a NULL path returns NULL.
  • 4237: Truncate DOUBLE values that are too large for a DECIMAL
    TRUNCATE(1e300, 1) and TRUNCATE(1.7976931348623157e308, 1.7976931348623157e308) fail with panic recovered: interface conversion: interface {} is nil, not *apd.Decimal. Truncate.Eval converts its argument to a DECIMAL and asserted the result without checking it; a DOUBLE, or a string holding one, above the DECIMAL range converts to nil.
    When the value does not fit in a DECIMAL it is now truncated in floating point arithmetic. truncateFloat64 follows the approach of MySQL's my_double_round for DOUBLE arguments: divide or multiply by a power of ten, truncate toward zero, and scale back, returning 0 when a negative scale's power of ten overflows and the value itself when the scaled value overflows.
    Tests: four FunctionQueryTests queries and four unit test cases in truncate_test.go. They panic without the fix. go test ./sql/... ./enginetest/... ./server/... passes locally on macOS arm64.
    I did not have a MySQL server available to compare results, so the expected values in the tests are ones where the answer does not depend on rounding (TRUNCATE(1e300, 1) is 1e300, TRUNCATE(-1.5e300, -300) is -1e300).
    Fixes #12669

    This change was prepared with the help of an AI coding assistant.
  • 4236: Return an error for a NULL json_value coercion type
    JSON_VALUE(doc, path, NULL) panics while planning with interface conversion: interface {} is nil, not string, which drops the client connection on a server. getJsonValueTypeLiteral converts the coercion type literal to text and asserted the result to be a string, but a NULL literal converts to nil.
    It now returns invalid type for json_value: NULL, the same error an unknown type name such as 'bogus' gets.
    Tests: a JsonScripts case covering 'bogus', NULL and JSON_VALUE(NULL, NULL, NULL). It panics without the fix. go test ./sql/... ./enginetest/... ./server/... passes locally on macOS arm64.
    This is separate from #12626, which is about a non-string path argument and is not touched here.
    Fixes #12670

    This change was prepared with the help of an AI coding assistant.
  • 4225: Return error when converting to JSON if input value is too large to be represented
    Fixes: dolthub/go-mysql-server#4200
    If a parsed number is too large to be represented as a float64, we should fail to parse it instead of parsing it as +Infinity.
  • 4224: Plan scalar subquery filters as lookup joins on tables that require an index
    Scalar subqueries compared to columns of tables that require an index lookup, such as Dolt's dolt_commit_diff tables, are now planned as lookup joins, and scalar subqueries that return more than one row now return an error.
    Companion PRs:
  • 4182: Return error 3636 with iteration count and preserve sessions on streamed CTE errors
    ErrCteRecursionLimitExceeded now returns MySQL error 3636 with the iteration count from recursiveCteIter.resetIter instead of generic error 1105.
    WITH RECURSIVE cte(n) AS (SELECT 1 UNION ALL SELECT n + 1 FROM cte) SELECT * FROM cte;
    -- ERROR 3636 (HY000): Recursive query aborted after 10002 iterations
    Blocked by dolthub/vitess#509
    Close #4258
  • 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

vitess

  • 509: Return SQL errors and keep sessions open when streamed queries fail
    Streamed queries, prepared statements, and server cursors that fail after sending initial rows now end the partial result set with a MySQL ERR_Packet and keep the session open instead of dropping the connection with ERROR 2013.
    WITH RECURSIVE cte(n) AS (SELECT 1 UNION ALL SELECT n + 1 FROM cte) SELECT * FROM cte;
    -- ERROR 3636 (HY000): Recursive query aborted after 10002 iterations
    SELECT 42;
    -- 42
    In multi-statement requests, an error packet also stops any remaining statements from running, whether the failure occurs before column headers or mid-stream.
    SELECT 1; <failing query>; SELECT 3;
    -- returns 1, then the error; SELECT 3 is not executed
    Connections still close when a socket write fails mid-packet or when an error arrives after a rowless command such as INSERT has already sent its completion response. In Vitess's streaming client (Conn.ExecuteStreamFetch and Conn.FetchNext), receiving an error packet now clears stored column metadata so subsequent queries do not block.
    Blocks dolthub/go-mysql-server#4182
    Fixes #12504
  • 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

  • 12582: CREATE EVENT with a huge EVERY interval never returns: the statement spins at 100% of a CPU core, survives the client disconnect and KILL QUERY
  • 5824: Dolt SQL REPL sometimes eats up preceding lines in terminal when query is being edited
  • 12678: SUBSTR()/SUBSTRING()/MID() with a huge length panics with "slice bounds out of range"
  • 12626: JSON_VALUE(json, NULL) and JSON_VALUE(json, 1) fail with "panic recovered: interface conversion: interface {} is nil, not string" in (*JsonValue).Eval (MySQL rejects a non-literal path)
  • 12670: JSON_VALUE with a NULL third (return type) argument panics while planning and closes the connection
  • 12283: Count dolt_history with LAG
  • 12663: SHOW COLUMNS reports string defaults wrapped in quotes and BIT defaults as decimal
  • 12504: Recursive CTE that hits the iteration limit while streaming drops the client connection (ERROR 2013) instead of returning an error
  • 12551: ER_UNKNOWN_ERROR: unable to find field with index 64 in row of 6 columns.
  • 12558: S3 clone bursts ranged GETs and fails with proxy HTTP 429; configurable remote-open rate/concurrency?
  • 12673: dolt push can't delete a tag on a remote
  • 12665: Missing NOT NULL value, CHECK violation and invalid default return generic error 1105 instead of MySQL's error numbers
  • 4200: JSON conversion emits invalid +Inf for exponent overflow

Don't miss a new dolt release

NewReleases is sending notifications on new releases.