• Stable

    aronwk released this 2025-11-17 21:01:19 -06:00 | 268 commits to main since this release

    Backwards Incompatible Changes

    New Representation of Zero Time

    This version of Dolt changes how zero time is represented. Zero time refers to datetime values converted from 0, false, and the timestamps 0000-00-00 and 0000-00-00 00:00:00. In MySQL, zero time has the timestamp 0000-00-00 00:00:00; this is impossible to achieve in Go. We were previously using time.Unix(-62167219200, 0).UTC(), which has the timestamp 0000-01-01 00:00:00, to represent zero time, but this was caused us to return incorrect values for some datetime-related functions. 0000-01-01 00:00:00 is also a non-zero timestamp in MySQL, and this conflict resulted in bugs such as date('0000-01-01') returning 0000-00-00.

    Starting in this version of Dolt, zero time is represented by time.Date(0, 0, 0, 0, 0, 0, 0, time.UTC), which in Go underflows to have the timestamp -0001-11-30 00:00:00 . Since negative years are not valid in MySQL, this new value does not conflict with any valid non-zero timestamps. We have also done an audit and update of our datetime-related functions to ensure that they return the same results as MySQL for zero time, with the exception of any functions related to days of the week — 0000-02-29 is a valid date in Go but not in MySQL so dates before 0000-03-01 have differing days of the week.

    Any previous values of zero time stored in Dolt will still have a timestamp of 0000-01-01 00:00:00 and will no longer be considered zero time.

    Merged PRs

    dolt

    • 10085: Allow DOLT_LOG table function to defer parsing of arguments until row iteration.
      This allows us to implement correct behavior for a DOLT_LOG table function in a subquery or lateral join with references to the outside scope.
    • 10084: Dolt bump for gms zeroTime update
      depends on dolthub/go-mysql-server#3305
      Changes how ZeroTime dates are written to storage

    go-mysql-server

    • 3305: Fix datetime functions to return correct results for 0 and false
      Fixes dolthub/dolt#10075
      Our datetime functions were not returning the correct results for 0 and false. This was because we were using 0000-01-01 as zeroTime (which evaluates to true using Go's time.IsZero) and then extracting datetime information from that timestamp. Using 0000-01-01 as zeroTime was also giving incorrect results for some functions when the input timestamp was actually 0000-01-01, since it was being equated as zeroTime.
      Also, depending on whether false was read as false or 0, we were also not able to convert it to zeroTime.
      This fix involves updating zeroTime to time.Date(0, 0, 0, 0, 0, 0, 0, time.UTC), which has the timestamp -0001-11-30. Since negative years are not valid in MySQL, this timestamp would not conflict with a non-zero timestamp. We also add in checks for zeroTime to make sure functions return the correct value from zeroTime instead of simply extracting datetime information from the timestamp.
      Dolt bump PR: dolthub/dolt#10084
    • 3298: Validate connection security properties
      Extends authentication handlers to validate additional connection properties (e.g. SSL, X509 client cert, cert issuer, cert subject) when additional connection constraints have been configured for a user.
      Note: tests for this functionality are in https://github.com/dolthub/dolt/pull/10067
      Related to https://github.com/dolthub/dolt/issues/10008

    Closed Issues

    • 10075: Unexpected DAYOFMONTH Result

    Performance

    Read Tests MySQL Dolt Multiple
    covering_index_scan 1.82 0.55 0.3
    groupby_scan 13.7 13.7 1.0
    index_join 1.5 2.07 1.38
    index_join_scan 1.47 1.34 0.91
    index_scan 34.33 28.67 0.84
    oltp_point_select 0.2 0.28 1.4
    oltp_read_only 3.82 5.18 1.36
    select_random_points 0.35 0.57 1.63
    select_random_ranges 0.39 0.57 1.46
    table_scan 34.95 28.16 0.81
    types_table_scan 75.82 92.42 1.22
    reads_mean_multiplier 1.12
    Write Tests MySQL Dolt Multiple
    oltp_delete_insert 8.43 6.55 0.78
    oltp_insert 4.18 3.19 0.76
    oltp_read_write 9.22 11.65 1.26
    oltp_update_index 4.25 3.25 0.76
    oltp_update_non_index 4.25 3.19 0.75
    oltp_write_only 5.28 6.32 1.2
    types_delete_insert 8.58 6.91 0.81
    writes_mean_multiplier 0.9
    TPC-C TPS Tests MySQL Dolt Multiple
    tpcc-scale-factor-1 92.8 36.2 2.56
    tpcc_tps_multiplier 2.56
    Overall Mean Multiple 1.53
    Downloads
  • Stable

    aronwk released this 2025-11-17 12:34:29 -06:00 | 300 commits to main since this release

    Backwards Incompatible Changes

    This version adds support for mutual TLS authentication. Because Dolt SQL server now requests an optional client certificate, and will validate it if a client sends one, if customers have been sending an invalid client cert when connecting to a Dolt SQL server, that cert will now be validated and the connection will be refused.

    Per Dolt’s versioning policy, this is a minor version bump because these changes may impact existing applications. Please reach out to us on GitHub or Discord if you have questions or need help with any of these changes.

    Merged PRs

    dolt

    • 10082: go: sqle/dsess: autoincrement_tracker.go: Fix race condition in initialization.
      When initializing the autoincrement_tracker, we look at the current value of the autoincrement sequence on the table across every branch. We do this concurrently, and take the highest value we find as the initial value to use across the dolt run.
      This fixes a race condition which would cause us to calculate the wrong highest value across all branches.
    • 10077: unsafe Tuple methods
      Use the unsafe packages to read from ItemAccess and Tuple.GetField.
      Additionally removes intermediate buffers when not necessary.
    • 10076: Add a dolt checkout section to AGENT.md
      Coding agents seem to assume that dolt checkout and call dolt_checkout() are sticky across SQL sessions. This causes agents to often write to main instead of their intended branch. This is an attempt to mitigate that behavior.
    • 10072: Optionally enable branch activity stats
      The branch_activity_table slows down the sql-server by 3%, so now you need to enable it if you want it to be functional.
    • 10067: Add support for configuring a server's CA cert, and BATS tests for client-cert auth
      Adds a new field in config.yaml to specify the certificate authority for a Dolt sql-server to use when validating client certificates. Also adds BATS tests for testing client-cert based authentication.
      Note: the authentication logic for client-cert based auth lives in the go-mysql-server package, but the tests live in the dolt package. In the future, it would be ideal to move these tests to live in and run with go-mysql-server and then get reused to test dolt as well.
      Depends on: https://github.com/dolthub/go-mysql-server/pull/3298
      Related to: https://github.com/dolthub/dolt/issues/10008

    go-mysql-server

    • 3304: Support table functions with non-literal arguments in subqueries and lateral joins
      This PR fixes several issues that prevent table functions from evaluating correctly when they take non-literal arguments and appear in subqueries or lateral joins.
      • 8a5f5821120ca8b5306628cd18ad493f87a28413 fixes a problem where references to an outer scope that appear in the topmost scope of a subquery won't cause the subquery to be marked as containing out-of-scope references.
      • This caused the subquery to be seen as cacheable even though it isn't, which could cause incorrect query results
      • This also caused the analyzer to incorrectly generate a CrossJoin instead of a LateralCrossJoin, which would then cause the join planner to commute the join children even though it was not safe to do so. This would ultimately cause an out-of-bounds field access while building the table function.
      • 0147ad3c3e522fa36552944d15adb1425cb22c1c fixes two other issues where join planning would drop the Lateral marker during join planning, resulting in generating a CrossJoin instead of a LateralCrossJoin
      • 0e2b6da9d20228a9f3255b2b532f97eae9f34b80 fixes an oversight in the LateralCrossJoin RowIter that was causing rows from the parent and left scopes to not be passed into the right child
        All three of these changes are required together in order to properly evaluate the newly added test queries.
    • 3302: Wrap nullable hoisted filter in IsTrue
      fixes dolthub/dolt#10070
      Filters that evaluate to null in an EXISTS or IN subquery context should be treated the same as false. When hoisted out of the subquery, nullable filters need to be wrapped in an IsTrue expression to ensure that they are still treated the same as false when they evaluate to null.
      Not doing so was causing a bug where rows were being dropped from NOT EXISTS if the filter evaluated to null. Since the filter expression was evaluated to null, the NOT expression wrapping it would evaluate to null as well. This caused the filter iterator to reject the row because it did not evaluate to true. Wrapping the filter expression with IsTrue ensures that nulls are then evaluated to false, which will then evaluate to true with NOT.
    • 3298: Validate connection security properties
      Extends authentication handlers to validate additional connection properties (e.g. SSL, X509 client cert, cert issuer, cert subject) when additional connection constraints have been configured for a user.
      Note: tests for this functionality are in https://github.com/dolthub/dolt/pull/10067
      Related to https://github.com/dolthub/dolt/issues/10008

    Closed Issues

    • 10079: Audit EXTRACT function to ensure it returns the correct values for 0, false, and true
    • 9735: log function doesn't handle strings the same as MySql
    • 10070: Unexpected Result in ANTI-JOIN
    Downloads
  • Stable

    aronwk released this 2025-11-12 17:56:07 -06:00 | 330 commits to main since this release

    Merged PRs

    dolt

    go-mysql-server

    • 3302: Wrap nullable hoisted filter in IsTrue
      fixes dolthub/dolt#10070
      Filters that evaluate to null in an EXISTS or IN subquery context should be treated the same as false. When hoisted out of the subquery, nullable filters need to be wrapped in an IsTrue expression to ensure that they are still treated the same as false when they evaluate to null.
      Not doing so was causing a bug where rows were being dropped from NOT EXISTS if the filter evaluated to null. Since the filter expression was evaluated to null, the NOT expression wrapping it would evaluate to null as well. This caused the filter iterator to reject the row because it did not evaluate to true. Wrapping the filter expression with IsTrue ensures that nulls are then evaluated to false, which will then evaluate to true with NOT.
    • 3300: Move hoistOutOfScopeFilters rule to DefaultRules
      fixes dolthub/dolt#10064
      hoistOutOfScopeFilters was not running as part of finalizeUnions, causing us to not correctly analyze queries that were parts of unions
    • 3297: dolthub/dolt#10050: Fix JSON conversion for dolt when using TextStorage
      Fix dolthub/dolt#10050
      • Extended JsonType.Convert to unwrap sql.StringWrapper values before decoding.
      • Add convertJSONValue to handle string and []byte like inputs.
    • 3296: use type switch instead of Fprintf for grouping key
      FPrintf is slow; it's quicker to use strconv for ints/floats + hash.WriteString and Sprintf + hash.WriteString for all other types.
      benchmarks: https://github.com/dolthub/dolt/pull/10054#issuecomment-3518575696

    Closed Issues

    • 10070: Unexpected Result in ANTI-JOIN
    • 10064: Unexpected UNION ALL Result of INNER JOIN and ANTI JOIN
    • 10050: TEXT doesn't convert properly to JSON
    Downloads
  • Stable

    aronwk released this 2025-11-10 21:29:12 -06:00 | 339 commits to main since this release

    Merged PRs

    dolt

    • 10055: Respect sql-server Dockerfile .yaml and .json support
      Reset CONFIG_PROVIDED after applying /etc/dolt/doltcfg.d/config.json so subsequent YAML lookup runs.
    • 10048: go/store/nbs: Fix race in chunk journal initialization.
      With dolt gc, the store journal can be deleted and recreated as part of normal operation. When we bootstrap a new chunk journal, we always write 1MB of 0 bytes and a root hash record, reflecting the current root hash, at offset 0.
      ChunkJournal takes an advisory exclusive lock when it opens the database data directory. It will operate in a read-only mode when it cannot take this lock.
      Due to a bug, even when operating in read-only mode, the chunk journal bootstrap code would run if the store was requested to open the chunk journal but there were was no existing chunk journal on disk. This meant there was a race condition if a Dolt process opened the store in read-only mode while another process was going to GC the store. If the read-only store tried to open the journal file and did not find it, it could end up overwriting the beginning of the contents of a just-created journal file.
      This PR adds two fixes:
      1. When we create a journal file, we must be its actual creator. O_EXCL will
        cause os.Open() to return an error if this syscall did not create the file,
        which means we are not in charge and we need to bail.
      2. When running in read-only mode, we should never create the journal file. We
        can try to read its contents if we learn of its existence, but if there is
        no file and we have been requested to open it, we should return an error.
    • 10043: dolthub/dolt#10038: Fix the SELECT * vs LIKE no result mismatch with case-insensitive collation
      Fixes dolthub/dolt#10038
      • Fix wildcard SELECT * being EOF as a result of NextValueRow() iterator object already being consumed by queueRows().
      • Remove NextValueRow() for prollyKeylessIndexIter because it conflicts with goroutine function queueRows() for Next().
    • 10029: Pass tree.Node as pointer

    go-mysql-server

    • 3299: Prevent panic when using table functions in joins and subqueries
      This prevents the panic seen in https://github.com/dolthub/dolt/issues/10051
      The join planner assumed that every instance of TableAlias wrapped an implementer of sql.TableNode.
      Only tables that support lookups implement sql.TableNode. Table functions that are not backed by an actual table and don't support lookups do not implement this interface.
      This panic is happening when testing to see whether we can optimize a join into a RightSemiJoin. The table needs to support lookups for this optimization to be allowed. So if it doesn't implement sql.TableNode, it suffices to skip this join plan, since we wouldn't be able to produce it away.
      This does not fix the broader issue of https://github.com/dolthub/dolt/issues/10051, which is that it is currently impossible for table functions that accept non-literal arguments to support efficient lookups. I'm not currently aware of any use cases where this is required, but I'll keep the issue open to track it in case we need to support that in the future.
    • 3297: dolthub/dolt#10050: Fix JSON conversion for dolt when using TextStorage
      Fix dolthub/dolt#10050
      • Extended JsonType.Convert to unwrap sql.StringWrapper values before decoding.
      • Add convertJSONValue to handle string and []byte like inputs.
    • 3293: Don't make string unless in Debug mode
      Even though this isn't getting logged anywhere, generating the DebugString for CostedIndexScans is costly enough to show in the profiler.
      Also specify capacity for rows in Result.
      benchmarks:
      https://github.com/dolthub/dolt/pull/10039#issuecomment-3499431486
    • 3292: Updating auth interfaces to pass connection
      Allows implementations of PlainTextStorage, CachedStorage, and HashStorage to receive the connection, so that they can check connection properties, such as SSL/TLS.
      Depends on: https://github.com/dolthub/vitess/pull/443/files
      Related to: https://github.com/dolthub/dolt/issues/10008
    • 3291: Add support for configuring a user's TLS connection requirements
      Adds support for creating users with TLS connection requirements, and displaying those settings via the mysql.user system table.
      MySQL documentation on CREATE USER SSL/TLS options
      Example:
      CREATE USER user1@localhost REQUIRES X509;
      Related to https://github.com/dolthub/dolt/issues/10008
    • 3279: dolthub/dolt#9887: Add BINLOG and mariadb-binlog support
      Fixes dolthub/dolt#9887
      • Add BinlogConsumer and BinlogConsumerCatalog interfaces.
      • Add BINLOG statement that decodes base64 encoded event strings and runs them on dolt's binlog replica applier using BinlogConsumer interface.
      • Add support for mariadb-binlog utility with new format support for sql_mode, collation_database, collation_connection, and collation_server, which can use bitmasks and IDs tied to system variable values.
      • Add new format int support for lc_time_names; this remains a no-op.
      • Add authentication handler for Binlog statement and new privilege types binlog_admin, replication_applier.
      • Other system variables have been added as no-ops for mariadb-binlog compatibility: skip_parallel_replication, gtid_domain_id, gtid_seq_no, check_constraint_checks, sql_if_exists, system_versioning_insert_history, and insert_id.
      • Add separate MariaDB-specific system variables array and a new getter that pulls from both system variable arrays.

    vitess

    • 443: Updating auth interfaces to pass connection
      Enables implementations to have access to the connection. Needed as part of mutual TLS auth work so that implementations can validate connection properties. Also matches the interface definitions in the official vitess repo.
    • 439: dolthub/dolt#9887: Fix empty executable comments and add BINLOG support and mariadb executable comments
      Fixes dolthub/dolt#9887
      • Add TypeName() to binlogEvent objects for error message creation on the frontend, i.e. go-mysql-server.
      • Add ERBase64DecodeError = 1575, ERNoFormatDescriptionEventBeforeBinlogStatement = 1609, and EROnlyFDAndRBREventsAllowedInBinlogStatement = 1730 for Binlog statements error handling.
      • Add Binlog statement parser support.
      • Add mariadb executable comment support and fix handling of empty comments, i.e. /*!*/ and /*M!*/.

    Closed Issues

    • 10050: TEXT doesn't convert properly to JSON
    • 10053: docker sql-server automatic config file usage is busted
    • 10038: Inconsistent Behavior: COUNT Returns 1 but SELECT Returns Empty Set with Same LIKE Condition
    • 10015: Feature: cluster replication: When the server is in standby mode, the read_only system variable should always be true.

    Performance

    Read Tests MySQL Dolt Multiple
    covering_index_scan 1.82 0.67 0.37
    groupby_scan 13.7 15.0 1.09
    index_join 1.52 2.14 1.41
    index_join_scan 1.5 1.39 0.93
    index_scan 34.33 29.19 0.85
    oltp_point_select 0.2 0.29 1.45
    oltp_read_only 3.82 5.18 1.36
    select_random_points 0.35 0.61 1.74
    select_random_ranges 0.39 0.61 1.56
    table_scan 34.33 28.67 0.84
    types_table_scan 75.82 94.1 1.24
    reads_mean_multiplier 1.17
    Write Tests MySQL Dolt Multiple
    oltp_delete_insert 8.43 6.55 0.78
    oltp_insert 4.18 3.25 0.78
    oltp_read_write 9.22 11.65 1.26
    oltp_update_index 4.25 3.3 0.78
    oltp_update_non_index 4.25 3.25 0.76
    oltp_write_only 5.28 6.32 1.2
    types_delete_insert 8.58 7.04 0.82
    writes_mean_multiplier 0.91
    TPC-C TPS Tests MySQL Dolt Multiple
    tpcc-scale-factor-1 94.24 36.34 2.59
    tpcc_tps_multiplier 2.59
    Overall Mean Multiple 1.56
    Downloads
  • Stable

    aronwk released this 2025-11-05 18:12:04 -06:00 | 358 commits to main since this release

    Merged PRs

    dolt

    • 10035: Set BATS_TEST_RETRIES to be higher for flaky docker-entrypoint.bats build tests
      Add $BATS_TEST_RETRIES to latest and specific version build bats tests for page Not Found error that sometimes happens from GitHub API call.
    • 10033: dolthub/dolt#10015: Support read_only to always be true in standby mode
      Fixes dolthub/dolt#10015
      Dolt exposes the current server's current cluster role in @@GLOBAL.dolt_cluster_role, which will be either the string standby or the string primary. MySQL has a standard system variable to expose read-only status of the server, namely read_only.
      • Support read_only to always be set to true in standby mode.
      • When using ClusterController, read_only setting is indirectly delegated to standby callback.
    • 10026: Fixed anyMatch operator
      There was a bug during matching where we did not consider the children of a node when we encountered the anyMatch operator. Interestingly, this was never found as we never mixed the singular operator (%) with a diverging match ('%wy) in a test scenario, so the column marker (separates each column) was always in the sort order slice instead of being a child.
    • 10025: Pass val.TupleDesc as pointer
    • 10024: go/store/nbs: planRangeCopyConjoin: Account for quota when building the merged index.
      In contexts where memory usage is quota'd and allocation is failable, ConjoinAll should take quota when building up O(n) data structures like the merged prefix index. This change reworks planRangeCopyConjoin so that large in-memory structures are allocated through or accounted in the memory quota provider.
      This change should not have an impact on Dolt's current behavior, since Dolt currently always run stoage with a non-failable memory quota provider.
    • 10004: dolthub/dolt#9887: Add mariadb-binlog test and BinlogConsumer implementation
      Fixes dolthub/dolt#9887
      Companion dolthub/go-mysql-server#3279 dolthub/vitess#439 dolthub/docs#2710
      Add support for BINLOG 'base64data' statement, which replays binary log events. Tools like mysqldump and mariadb-binlog use it to output database changes as base64-encoded events that can be replayed on another server.
      mariadb-binlog mariadb-bin.000001 mariadb-bin.000002 | mariadb -u root -p -h 127.0.0.1 --skip-ssl
      

      ⚠️ Note: BINLOG statement support requires a BinlogConsumer implementation. go-mysql-server provides the interface and execution framework, but does not include a default implementation. This feature only works with Dolt or other integrators that implement the BinlogConsumer interface.
      ⚠️ Note: Concurrent BINLOG statements can corrupt each others states; only execute through one connection/client.

      • Add BinlogConsumer interface implementation so go-mysql-server BINLOG statement can feed dolt's binlog replica applier events sequentially.
      • Add tests for Binlog related queries with complementary handler that sets the engine to able to execute the queries with dolt.
      • Add binlog-maker.bats to generate Binlog statement only test files in binlogreplication/testdata using mariadb-binlog which later are run using new test handler.
      • Modified mysql-client-tests to include mariadb-binlog.bats which generates *.bin files with a mariadb server first to then pipe them into a dolt sql-server using a mariadb client.
      • Moved session handling when processing events to caller to prevent session wrap when calling from Binlog statements.

    go-mysql-server

    • 3279: dolthub/dolt#9887: Add BINLOG and mariadb-binlog support
      Fixes dolthub/dolt#9887
      • Add BinlogConsumer and BinlogConsumerCatalog interfaces.
      • Add BINLOG statement that decodes base64 encoded event strings and runs them on dolt's binlog replica applier using BinlogConsumer interface.
      • Add support for mariadb-binlog utility with new format support for sql_mode, collation_database, collation_connection, and collation_server, which can use bitmasks and IDs tied to system variable values.
      • Add new format int support for lc_time_names; this remains a no-op.
      • Add authentication handler for Binlog statement and new privilege types binlog_admin, replication_applier.
      • Other system variables have been added as no-ops for mariadb-binlog compatibility: skip_parallel_replication, gtid_domain_id, gtid_seq_no, check_constraint_checks, sql_if_exists, system_versioning_insert_history, and insert_id.
      • Add separate MariaDB-specific system variables array and a new getter that pulls from both system variable arrays.
    • 3248: Implement sql.ValueRow
      sql.ValueRow is the reincarnation of sql.Row2.
      This is an optimization to the sqlengine that eliminates interface boxing by never placing variables into a []interface.
      sql.ValueRowIter is implemented by:
      • TransactionCommittingIter
      • TrackedRowIter
      • TableRowIter
      • FilterIter
        Comparison should only use CompareValue when left and right are both NumericType, so Integers, Floats, Decimal, Bit64, and Year types.

    vitess

    • 442: Additional tests for SSL requirements on created users
    • 441: dolthub/dolt#9316: Add CREATE TABLE ... AS SELECT support
      Fixes dolthub/dolt#9316
      Companion dolthub/go-mysql-server#3283
    • 439: dolthub/dolt#9887: Fix empty executable comments and add BINLOG support and mariadb executable comments
      Fixes dolthub/dolt#9887
      • Add TypeName() to binlogEvent objects for error message creation on the frontend, i.e. go-mysql-server.
      • Add ERBase64DecodeError = 1575, ERNoFormatDescriptionEventBeforeBinlogStatement = 1609, and EROnlyFDAndRBREventsAllowedInBinlogStatement = 1730 for Binlog statements error handling.
      • Add Binlog statement parser support.
      • Add mariadb executable comment support and fix handling of empty comments, i.e. /*!*/ and /*M!*/.

    Closed Issues

    • 10012: How to Properly Identify Read/Write and Read-Only Nodes in Dolt Cluster for ProxySQL Setup
    • 10015: Feature: cluster replication: When the server is in standby mode, the read_only system variable should always be true.
    • 9887: Support MariaDB mariadb-binlog which translates a MariaDB binlog to SQL queries
    Downloads
  • Stable

    aronwk released this 2025-11-03 19:35:26 -06:00 | 394 commits to main since this release

    Merged PRs

    dolt

    • 10022: go: libraries/doltcore/dbfactory: Do not use EventsUnaryClientInterceptor when interacting with remotestorage.
      This events source is too detailed and emits too many events to be appropriate for our usage metrics. It is useful in an operational context for DoltHub and Hosted, but it should be used by default in Dolt itself. We will revisit this events source if we need it for internal infrastructure, but for now we should disable it.
    • 10020: refactor: make dolt_diff_summary respect dolt_ignore patterns
      User Contributed PR: https://github.com/dolthub/dolt/pull/9946
      Closes: https://github.com/dolthub/dolt/issues/5861
    • 10016: Fixed branch control insertion bug
      A user reported that their dolt_branch_control table was in a corrupted state, as they could not delete a row even though running the appropriate DELETE FROM dolt_branch_control would report that 1 row was affected. Running SELECT showed that it was still there.
      I was able to replicate a way of getting the table into that state, which is to insert the exact same row as an existing row but with a larger permission set. dolt_branch_control handles primary key conflicts differently than other tables, as we throw a conflict when a subset is inserted. For example, '%' will match all entries that 's%' can match, so 's%' is a subset of '%'. Of course, when taking permissions into account, 's%' may not be a subset if it has a broader permission set than '%', in which case we want to allow the insertion of 's%'.
      The failure case was with exact matches. An exact match is still a subset when the permissions are as restrictive or more restrictive than the original, however it's not a subset when the permissions are broader, and this would result in allowing the insertion of the exact match. We convert all expressions into a specialized integer format, and store those integers in a prefix tree. Since the format will be the exact same, we end up overwriting the old entry, which is an implicit deletion without the accompanying bookkeeping in the rest of the data structure. This is what causes the mismatch, and creates the failure state.
      To prevent this, we never allow insertion when there's an exact match, so you must use an UPDATE in such cases. This will prevent that failure mode from occurring.
    • 9994: use unsafe pointer for TextStorage
      unsafe.Pointer gets strings from []byte without allocating memory.
      This is especially beneficial for operations that pass around strings.
      Dolt already uses unsafe.Pointers in other places and this is within an immutable context.
    • 9989: Allow foreign keys on nonlocal tables
      This change allows users to add foreign key relations on nonlocal tables (table names that match entries in dolt_nonlocal_tables and resolve to tables on other branches).
      The biggest obstacle was that the foreign key verification logic operates on the DB directly, but resolving the references in the dolt_nonlocal_tables table requires a Dolt SQL engine. Because we now use the engine for most operations, the engine is guaranteed to exist, but it wasn't obvious how to allow the storage code to access the engine in a way that didn't break encapsulation or create dependency cycles.
      The way this PR accomplishes this is by creating a new interface called doltdb.TableResolver, which has the method GetDoltTableInsensitiveWithRoot, which can resolve table names at a supplied root value. This object can be instantiated by the Dolt Session and passed into the DB layer.
      I'm not thrilled about adding the extra confusingly similar methods to doltdb.Database, but hopefully the differences between them are clear.
    • 9971: Relax column tag uniqueness requirement
      Instead of requiring column tags to be unique across all tables in a branch, this change only requires column tags to be unique within each table.
      Column tags are intended to be an internal only, implementation detail of Dolt, but if a conflict occurred (two columns in the same branch having the same column tag), then it blocked customers and often required expert help to resolve. This change greatly reduces the chance of hitting a column tag conflict, since it reduces the scope across which a column tag must be unique.
    • 9946: #5861 refactor: make dolt_diff_summary respect dolt_ignore patterns

      Summary

      Makes dolt_diff_summary table function respect dolt_ignore patterns to match dolt diff command behavior.

      Changes

      • Added ignore pattern filtering to dolt_diff_summary
      • Tables matching dolt_ignore patterns are now filtered out
      • Added system table filtering for dolt_* prefixed tables
      • Applied filtering to both general and specific table queries
      • ensure dolt_ignore table itself is still shown in dolt_diff_summary

      Testing

      • Added 5 integration tests and 4 bats tests

      Questions/Misc

      @macneale4 I think I got this change good for #5861, finally (sorry took me awhile, went out of country and was busy with work to jump back on it immediately). two things to call out for clarity:
      • dolt_ignore table itself should be included dolt_diff_summary (like .gitignore, for example), right?
      • there are two failing bats tests, I'm not sure why exactly since couldn't repro on my side locally.
        Closes: https://github.com/dolthub/dolt/issues/5861
    • 9906: Implement sql.ValueRow
      This PR implements sql.ValueRow, which is a server output friendly version of sql.Row.
    • 9477: Faster storage chunk iteration
      Currently we have two access patterns where we need to iterate over all chunks in a storage file: Archive/Unarchive and FSCK. In both cases, we are loading one chunk at a time and disk IO becomes a bottleneck. This change updates the iteration methods to iterate over the data blocks of table files and archive files such that we can load data in larger batches.
      There are not new tests for this. archive and fsck tests should cover this.
      Testing on a 500Mb database: 8.7s to fsck before change, 5.0s after change.

    go-mysql-server

    • 3284: Use IndexedTableAccess for Sorts over a SubqueryAlias
    • 3283: dolthub/dolt#9316: Fix PK setting and add new fields for CREATE TABLE ... SELECT
      Fixes dolthub/dolt#9316
    • 3282: /.github/workflows/bump-dependency.yaml: sanatize stuff
    • 3280: Allow string truncation when casting to date
    • 3278: Respect precision when casting to datetime
      Also explicitly cast datetime to max precision during comparisons
    • 3248: Implement sql.ValueRow
      sql.ValueRow is the reincarnation of sql.Row2.
      This is an optimization to the sqlengine that eliminates interface boxing by never placing variables into a []interface.
      sql.ValueRowIter is implemented by:
      • TransactionCommittingIter
      • TrackedRowIter
      • TableRowIter
      • FilterIter
        Comparison should only use CompareValue when left and right are both NumericType, so Integers, Floats, Decimal, Bit64, and Year types.

    vitess

    Closed Issues

    • 5861: dolt_diff_summary system table should hide tables ignored by dolt_ignore
    • 9316: Support CREATE TABLE (...) AS SELECT
    • 3273: how to disable some features?
    Downloads
  • Stable

    aronwk released this 2025-10-27 16:30:34 -05:00 | 472 commits to main since this release

    Merged PRs

    dolt

    • 9993: go/store/nbs: tableReader: Account for allocated table index prefixes in a tableReader's quota usage.
    • 9988: Add dolt_branch_activity table
      dolt_branch_activity table shows the last read and write time, and the active sessionse for each active branch in a given sql-server proces
    • 9694: chore(workflows): remove cd-bump-homebrew
      cd-bump-homebrew has not been running for quite some time, and the release bumps are handled on the homebrew side, thus removing the workflow.

    Closed Issues

    Downloads
  • Stable

    aronwk released this 2025-10-23 16:29:10 -05:00 | 507 commits to main since this release

    Merged PRs

    dolt

    • 9991: go: sqle/dsess/session.go: VisitGCRoots: Fix GC failures reporting missing hashes.
    • 9990: go/store/nbs: store.go: Fix a bug which caused dolt gc --full to not collect new data sometimes.
    • 9987: go/store/nbs: archive_writer.go: Fix problem with archive stream writer where we did not remove temptf files when we were pushing changes.

    Closed Issues

    • 9984: mysql client report error

    Performance

    Read Tests MySQL Dolt Multiple
    covering_index_scan 1.86 0.65 0.35
    groupby_scan 13.7 18.95 1.38
    index_join 1.52 2.39 1.57
    index_join_scan 1.47 1.37 0.93
    index_scan 34.33 30.81 0.9
    oltp_point_select 0.21 0.28 1.33
    oltp_read_only 3.82 5.37 1.41
    select_random_points 0.35 0.57 1.63
    select_random_ranges 0.39 0.62 1.59
    table_scan 34.95 33.72 0.96
    types_table_scan 74.46 130.13 1.75
    reads_mean_multiplier 1.25
    Write Tests MySQL Dolt Multiple
    oltp_delete_insert 8.43 6.55 0.78
    oltp_insert 4.18 3.25 0.78
    oltp_read_write 9.22 11.87 1.29
    oltp_update_index 4.25 3.3 0.78
    oltp_update_non_index 4.25 3.25 0.76
    oltp_write_only 5.28 6.43 1.22
    types_delete_insert 8.58 7.04 0.82
    writes_mean_multiplier 0.92
    TPC-C TPS Tests MySQL Dolt Multiple
    tpcc-scale-factor-1 92.9 35.51 2.62
    tpcc_tps_multiplier 2.62
    Overall Mean Multiple 1.60
    Downloads
  • Stable

    aronwk released this 2025-10-22 18:36:48 -05:00 | 515 commits to main since this release

    Merged PRs

    dolt

    go-mysql-server

    Closed Issues

    • 9984: mysql client report error
    • 5011: import of sql file with batched inserts has large memory footprint and writes excessive garbage
    • 9969: Enclosed fields not handled correctly in LOAD DATA
    Downloads
  • Stable

    aronwk released this 2025-10-21 20:17:21 -05:00 | 520 commits to main since this release

    Backwards Incompatible Changes

    This version makes the Docker entry point script for dolt-sql-server execute initdb.d/ scripts after the server is started. This means if the DOLT_USER or DOLT_DATABASE environment variables are specified and a later script tries to create the same items a conflict may occur.

    Per Dolt’s versioning policy, this is a minor version bump because these changes may impact existing applications. Please reach out to us on GitHub or Discord if you have questions or need help with any of these changes.

    Merged PRs

    dolt

    • 9979: dolthub/dolt#9977: Add DOLT_DIFF test with IN and NOT IN
    • 9978: Replace uses of io.EOF in merge logic with an explicit return value.
      Previously, methods in patch_generator.go would return io.EOF to indicate that it had finished diffing two branches and that there were no more differences.
      While this was a simpler interface, it meant that callers had to know whether or not it was possible for the returned error to be io.EOF and had to remember to check for it. Otherwise, that error could get propagated to the method's own caller.
      This caused a correctness bug, where a function was assumed to never return io.EOF instead of checking for it.
      A safer approach is to have a separate return value to indicate whether or not there can possibly be any more patches. That way, failing to check this value would become a compiler error.
    • 9961: docker-entrypoint.sh: Add missing dependencies for SQL file extraction and amend MySQL entry point behavior
      Fixes dolthub/dolt#9955
      • docker-entrypoint.sh now matches the order of operations of MySQL's entry point, user and database environment variables are configured before the docker-entrypoint-init.d/ directory.
      • Added missing dependencies for SQL file extraction inside of serverDockerfile.
      • docker-entrypoint-initdb.d files are now piped directly into dolt sql to fix Argument list too long error when parsing a large dump.
      • docker-entrypoint-initdb.d files now output their query results.
      • Some status messages have changed to match MySQL's entry point.
      • Increased timeout on run_container in bats integration tests to reduce false positives.
        image

    go-mysql-server

    • 3276: Truncate strings for datetime conversion
      fixes dolthub/dolt#9917
    • 3275: dolthub/dolt#9977: Prevent filter pushdown for Anti joins for NOT IN
      Fixes dolthub/dolt#9977
      Companion dolthub/dolt#9979
    • 3274: Do not convert full outer joins to cross joins
      fixes dolthub/dolt#9973
    • 3270: dolthub/dolt#9969: Fix ENCLOSED BY ignoring terminator inside of field when using LOAD DATA INFILE
      Fixes dolthub/dolt#9969
    • 3269: Add Grafana to listed Backends
    • 3267: Fix GroupBy validation for queries with Having
      fixes dolthub/dolt#9963
      In #3166, I had skipped adding aggregate function dependencies to the from scope of the Having node because they were being included in the select expressions during GroupBy validation. However, removing them caused other scoping issue.
      So I undid the skip, and instead of using the select expressions from the innermost Project node, we now use the select expressions from the innermost Project node that is not a direct child of a Having node. This exposed a bug where we were not able to resolve aliases in OrderBy expressions so I added Alias expressions to the select dependency map used for resolving OrderBy and Select expressions

    Closed Issues

    • 9917: Inconsistency of DATETIME between Dolt and MySQL
    • 9977: IN subquery predicate with NOT IN incorrectly returns rows when querying DOLT_DIFF
    • 9969: Enclosed fields not handled correctly in LOAD DATA
    • 9973: full (outer) join on empty table returns empty set
    • 3221: go-mysql-server can no longer claim to be "pure Go"
    • 3264: Panic When Comparing Decimal against NaN
    Downloads