-
released this
2025-11-17 21:01:19 -06:00 | 268 commits to main since this releaseBackwards 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 timestamps0000-00-00and0000-00-00 00:00:00. In MySQL, zero time has the timestamp0000-00-00 00:00:00; this is impossible to achieve in Go. We were previously usingtime.Unix(-62167219200, 0).UTC(), which has the timestamp0000-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:00is also a non-zero timestamp in MySQL, and this conflict resulted in bugs such asdate('0000-01-01')returning0000-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-29is a valid date in Go but not in MySQL so dates before0000-03-01have 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:00and 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
0andfalse
Fixes dolthub/dolt#10075
Our datetime functions were not returning the correct results for0andfalse. This was because we were using0000-01-01aszeroTime(which evaluates to true using Go'stime.IsZero) and then extracting datetime information from that timestamp. Using0000-01-01aszeroTimewas also giving incorrect results for some functions when the input timestamp was actually0000-01-01, since it was being equated aszeroTime.
Also, depending on whetherfalsewas read asfalseor0, we were also not able to convert it tozeroTime.
This fix involves updatingzeroTimetotime.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 forzeroTimeto make sure functions return the correct value fromzeroTimeinstead 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
DAYOFMONTHResult
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
- 10085: Allow DOLT_LOG table function to defer parsing of arguments until row iteration.
-
released this
2025-11-17 12:34:29 -06:00 | 300 commits to main since this releaseBackwards 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 thedoltrun.
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 thatdolt checkoutandcall dolt_checkout()are sticky across SQL sessions. This causes agents to often write tomaininstead 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 inconfig.yamlto 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 thego-mysql-serverpackage, but the tests live in thedoltpackage. In the future, it would be ideal to move these tests to live in and run withgo-mysql-serverand then get reused to testdoltas 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 anEXISTSorINsubquery context should be treated the same as false. When hoisted out of the subquery, nullable filters need to be wrapped in anIsTrueexpression 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 fromNOT EXISTSif the filter evaluated to null. Since the filter expression was evaluated to null, theNOTexpression 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 withIsTrueensures that nulls are then evaluated to false, which will then evaluate to true withNOT. - 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
Downloads
- 10082: go: sqle/dsess: autoincrement_tracker.go: Fix race condition in initialization.
-
released this
2025-11-12 17:56:07 -06:00 | 330 commits to main since this releaseMerged PRs
dolt
go-mysql-server
- 3302: Wrap nullable hoisted filter in IsTrue
fixes dolthub/dolt#10070
Filters that evaluate to null in anEXISTSorINsubquery context should be treated the same as false. When hoisted out of the subquery, nullable filters need to be wrapped in anIsTrueexpression 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 fromNOT EXISTSif the filter evaluated to null. Since the filter expression was evaluated to null, theNOTexpression 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 withIsTrueensures that nulls are then evaluated to false, which will then evaluate to true withNOT. - 3300: Move
hoistOutOfScopeFiltersrule toDefaultRules
fixes dolthub/dolt#10064
hoistOutOfScopeFilterswas not running as part offinalizeUnions, causing us to not correctly analyze queries that were parts of unions - 3297: dolthub/dolt#10050: Fix JSON conversion for
doltwhen usingTextStorage
Fix dolthub/dolt#10050- Extended
JsonType.Convertto unwrapsql.StringWrappervalues before decoding. - Add
convertJSONValueto handlestringand[]bytelike inputs.
- Extended
- 3296: use type switch instead of
Fprintffor grouping key
FPrintfis slow; it's quicker to usestrconvforints/floats +hash.WriteStringandSprintf+hash.WriteStringfor all other types.
benchmarks: https://github.com/dolthub/dolt/pull/10054#issuecomment-3518575696
Closed Issues
Downloads
- 3302: Wrap nullable hoisted filter in IsTrue
-
released this
2025-11-10 21:29:12 -06:00 | 339 commits to main since this releaseMerged PRs
dolt
- 10055: Respect
sql-serverDockerfile.yamland.jsonsupport
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.
Withdolt 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:- 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. - 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.
- When we create a journal file, we must be its actual creator. O_EXCL will
- 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 ofNextValueRow()iterator object already being consumed byqueueRows(). - Remove
NextValueRow()forprollyKeylessIndexIterbecause it conflicts with goroutine functionqueueRows()forNext().
- Fix wildcard
- 10029: Pass
tree.Nodeas 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 implementsql.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
doltwhen usingTextStorage
Fix dolthub/dolt#10050- Extended
JsonType.Convertto unwrapsql.StringWrappervalues before decoding. - Add
convertJSONValueto handlestringand[]bytelike inputs.
- Extended
- 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 ofPlainTextStorage,CachedStorage, andHashStorageto 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 themysql.usersystem table.
MySQL documentation onCREATE USERSSL/TLS options
Example:
CREATE USER user1@localhost REQUIRES X509;
Related to https://github.com/dolthub/dolt/issues/10008 - 3279: dolthub/dolt#9887: Add
BINLOGandmariadb-binlogsupport
Fixes dolthub/dolt#9887- Add
BinlogConsumerandBinlogConsumerCataloginterfaces. - Add
BINLOGstatement that decodes base64 encoded event strings and runs them ondolt's binlog replica applier usingBinlogConsumerinterface. - Add support for
mariadb-binlogutility with new format support forsql_mode,collation_database,collation_connection, andcollation_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
Binlogstatement and new privilege typesbinlog_admin,replication_applier. - Other system variables have been added as no-ops for
mariadb-binlogcompatibility:skip_parallel_replication,gtid_domain_id,gtid_seq_no,check_constraint_checks,sql_if_exists,system_versioning_insert_history, andinsert_id. - Add separate MariaDB-specific system variables array and a new getter that pulls from both system variable arrays.
- Add
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
BINLOGsupport andmariadbexecutable comments
Fixes dolthub/dolt#9887- Add
TypeName()tobinlogEventobjects for error message creation on the frontend, i.e.go-mysql-server. - Add
ERBase64DecodeError = 1575,ERNoFormatDescriptionEventBeforeBinlogStatement = 1609, andEROnlyFDAndRBREventsAllowedInBinlogStatement = 1730forBinlogstatements error handling. - Add
Binlogstatement parser support. - Add
mariadbexecutable comment support and fix handling of empty comments, i.e./*!*/and/*M!*/.
- Add
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_onlysystem 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
- 10055: Respect
-
released this
2025-11-05 18:12:04 -06:00 | 358 commits to main since this releaseMerged PRs
dolt
- 10035: Set
BATS_TEST_RETRIESto be higher for flakydocker-entrypoint.batsbuild tests
Add $BATS_TEST_RETRIES tolatestand specific version buildbatstests for pageNot Founderror that sometimes happens from GitHub API call. - 10033: dolthub/dolt#10015: Support
read_onlyto 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, namelyread_only.- Support
read_onlyto always be set to true in standby mode. - When using ClusterController,
read_onlysetting is indirectly delegated to standby callback.
- Support
- 10026: Fixed anyMatch operator
There was a bug during matching where we did not consider the children of a node when we encountered theanyMatchoperator. 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.TupleDescas 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-binlogtest andBinlogConsumerimplementation
Fixes dolthub/dolt#9887
Companion dolthub/go-mysql-server#3279 dolthub/vitess#439 dolthub/docs#2710
Add support forBINLOG 'base64data'statement, which replays binary log events. Tools likemysqldumpandmariadb-binloguse 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:
BINLOGstatement support requires aBinlogConsumerimplementation.go-mysql-serverprovides the interface and execution framework, but does not include a default implementation. This feature only works with Dolt or other integrators that implement theBinlogConsumerinterface.
⚠️ Note: ConcurrentBINLOGstatements can corrupt each others states; only execute through one connection/client.- Add
BinlogConsumerinterface implementation sogo-mysql-serverBINLOGstatement can feeddolt's binlog replica applier events sequentially. - Add tests for
Binlogrelated queries with complementary handler that sets the engine to able to execute the queries withdolt. - Add
binlog-maker.batsto generateBinlogstatement only test files inbinlogreplication/testdatausingmariadb-binlogwhich later are run using new test handler. - Modified
mysql-client-teststo includemariadb-binlog.batswhich generates*.binfiles with amariadbserver first to then pipe them into adolt sql-serverusing amariadbclient. - Moved session handling when processing events to caller to prevent session wrap when calling from
Binlogstatements.
- Add
go-mysql-server
- 3279: dolthub/dolt#9887: Add
BINLOGandmariadb-binlogsupport
Fixes dolthub/dolt#9887- Add
BinlogConsumerandBinlogConsumerCataloginterfaces. - Add
BINLOGstatement that decodes base64 encoded event strings and runs them ondolt's binlog replica applier usingBinlogConsumerinterface. - Add support for
mariadb-binlogutility with new format support forsql_mode,collation_database,collation_connection, andcollation_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
Binlogstatement and new privilege typesbinlog_admin,replication_applier. - Other system variables have been added as no-ops for
mariadb-binlogcompatibility:skip_parallel_replication,gtid_domain_id,gtid_seq_no,check_constraint_checks,sql_if_exists,system_versioning_insert_history, andinsert_id. - Add separate MariaDB-specific system variables array and a new getter that pulls from both system variable arrays.
- Add
- 3248: Implement
sql.ValueRow
sql.ValueRowis the reincarnation ofsql.Row2.
This is an optimization to the sqlengine that eliminates interface boxing by never placing variables into a[]interface.
sql.ValueRowIteris 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 SELECTsupport
Fixes dolthub/dolt#9316
Companion dolthub/go-mysql-server#3283 - 439: dolthub/dolt#9887: Fix empty executable comments and add
BINLOGsupport andmariadbexecutable comments
Fixes dolthub/dolt#9887- Add
TypeName()tobinlogEventobjects for error message creation on the frontend, i.e.go-mysql-server. - Add
ERBase64DecodeError = 1575,ERNoFormatDescriptionEventBeforeBinlogStatement = 1609, andEROnlyFDAndRBREventsAllowedInBinlogStatement = 1730forBinlogstatements error handling. - Add
Binlogstatement parser support. - Add
mariadbexecutable comment support and fix handling of empty comments, i.e./*!*/and/*M!*/.
- Add
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_onlysystem variable should always be true. - 9887: Support MariaDB
mariadb-binlogwhich translates a MariaDB binlog to SQL queries
Downloads
- 10035: Set
-
released this
2025-11-03 19:35:26 -06:00 | 394 commits to main since this releaseMerged 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 theirdolt_branch_controltable was in a corrupted state, as they could not delete a row even though running the appropriateDELETE FROM dolt_branch_controlwould report that 1 row was affected. RunningSELECTshowed 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_controlhandles 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 anUPDATEin such cases. This will prevent that failure mode from occurring. - 9994: use unsafe pointer for TextStorage
unsafe.Pointergets strings from []byte without allocating memory.
This is especially beneficial for operations that pass around strings.
Dolt already usesunsafe.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 indolt_nonlocal_tablesand 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 thedolt_nonlocal_tablestable 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 calleddoltdb.TableResolver, which has the methodGetDoltTableInsensitiveWithRoot, 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 todoltdb.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
Makesdolt_diff_summarytable function respectdolt_ignorepatterns to matchdolt diffcommand behavior.Changes
- Added ignore pattern filtering to
dolt_diff_summary - Tables matching
dolt_ignorepatterns 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
- Added ignore pattern filtering to
- 9906: Implement
sql.ValueRow
This PR implementssql.ValueRow, which is a server output friendly version ofsql.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- fixes broken ld tests (dolthub/ld#21555)
- 3248: Implement
sql.ValueRow
sql.ValueRowis the reincarnation ofsql.Row2.
This is an optimization to the sqlengine that eliminates interface boxing by never placing variables into a[]interface.
sql.ValueRowIteris 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
- 441: dolthub/dolt#9316: Add
CREATE TABLE ... AS SELECTsupport
Fixes dolthub/dolt#9316
Companion dolthub/go-mysql-server#3283 - 438: /go.mod: add patch version
- 437: docker-entrypoint.sh: Add VERSIONING to non-reserved
Closed Issues
Downloads
- 10022: go: libraries/doltcore/dbfactory: Do not use EventsUnaryClientInterceptor when interacting with remotestorage.
-
released this
2025-10-27 16:30:34 -05:00 | 472 commits to main since this releaseMerged 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_activitytable 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
- 10001: : - )
Downloads
-
released this
2025-10-23 16:29:10 -05:00 | 507 commits to main since this releaseMerged 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
-
released this
2025-10-22 18:36:48 -05:00 | 515 commits to main since this releaseMerged PRs
dolt
go-mysql-server
- 3278: Respect precision when casting to datetime
Also explicitly cast datetime to max precision during comparisons- fixes broken ld tests (dolthub/ld#21555)
- 3277: dolthub/dolt#9984: Fix
nildereference byDispose()inGROUP BYiterator whenNext()is never called
Fixes dolthub/dolt#9984 - 3276: Truncate strings for datetime conversion
fixes dolthub/dolt#9917
Closed Issues
Downloads
- 3278: Respect precision when casting to datetime
-
released this
2025-10-21 20:17:21 -05:00 | 520 commits to main since this releaseBackwards Incompatible Changes
This version makes the Docker entry point script for
dolt-sql-serverexecuteinitdb.d/scripts after the server is started. This means if theDOLT_USERorDOLT_DATABASEenvironment 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_DIFFtest withINandNOT IN - 9978: Replace uses of io.EOF in merge logic with an explicit return value.
Previously, methods inpatch_generator.gowould returnio.EOFto 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 beio.EOFand 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 returnio.EOFinstead 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#9955docker-entrypoint.shnow matches the order of operations of MySQL's entry point, user and database environment variables are configured before thedocker-entrypoint-init.d/directory.- Added missing dependencies for SQL file extraction inside of
serverDockerfile. docker-entrypoint-initdb.dfiles are now piped directly intodolt sqlto fixArgument list too longerror when parsing a large dump.docker-entrypoint-initdb.dfiles now output their query results.- Some status messages have changed to match MySQL's entry point.
- Increased timeout on
run_containerinbatsintegration tests to reduce false positives.
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 BYignoring terminator inside of field when usingLOAD 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:
INsubquery predicate withNOT INincorrectly returns rows when queryingDOLT_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
- 9979: dolthub/dolt#9977: Add
mirror of
https://github.com/dolthub/dolt.git
synced 2025-12-16 20:25:20 -06:00