Releases: dolthub/dolt
1.57.3
Merged PRs
dolt
- 9587: Bug fix: Update secondary index correctly during a merge with a schema change
During a merge, Dolt applies diffs to existing indexes to sync their data with the changes being merged in. If the table schema has changed between the merge base and the left/right branches of the merge, Dolt was using the incorrect value tuple to remove the row from the index. This resulted in a customer issue where the secondary index still contained rows and the foreign key validation logic was incorrectly detecting FK violations, even though the child table was empty.
As a follow-up to this, we need to investigate other similar cases in the secondary index merger and see if other diff types have a similar issue. - 9585: Run gofmt and goimports on generated protobuf files to ensure clean diffs
This change addsgofmt
andgoimports
steps to the protobuf generation process to ensure that generated.pb.go
files are consistently formatted. - 9577: Remove broken symlink
- 9574: Fix dolt_preview_merge_conflicts for doltgres
- 9551: #9530 - Fix auto-increment display for SHOW CREATE TABLE
Fixes #9530
Companion PR: dolthub/go-mysql-server#3103
Fixed auto-increment display discrepancy in SHOW CREATE TABLE by adding type checking to prevent incrementing beyond integer type maximums.
go-mysql-server
- 3123: Support decimal unique keys
fixes #3071 - 3122: Allow SYSTEM as valid time zone
- 3119: Add test for setting time zone from table value
- 3118: Validate time zone before setting it
fixes #9559 - 3116: fix panic in stats histogram union and intersect
I'm not 100% how to repro this, but there is definitely something up with the Union and Intersect logic in stats histograms.
Based on the stack trace, there's a panic when attempting to Union histogram buckets.
It seems like the logic assumes that the histogram keys are always shorter than the number of buckets.
This PR fixes the Union and Intersect logic to compare the keys without the assumption, and adds some unit tests.
fixes: #9143 - 3114: #9511 - Fix SET type casting to CHAR and BINARY
Fixes #9511- Added convertSetToStringForStringContext() helper function following existing patterns
- Modified convertValue() to handle SET types in both CHAR and BINARY conversion cases
- 3109: #9544 - Fix time type foreign key constraints
Fixes #9544
Allows foreign key constraints to be created between time-related types (DATETIME, TIMESTAMP, TIME) with different precisions or cross-type references, matching MySQL behavior.
Closed Issues
- 9590: More granular control over restrictions
- 9544: time types and foreign keys
- 9530:
auto_increment
with max integers does not error properly - 9469: Support
SET
in string context - 9511:
SET
type does notcast
correctly to char or binary - 9143: index out of range panic on CTE
- 9559:
set time_zone
should validate timezone - 3071: In-memory tables don't support
DECIMAL(...) UNIQUE KEY
Performance
Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 1.86 | 0.68 | 0.37 |
groupby_scan | 13.46 | 19.65 | 1.46 |
index_join | 1.47 | 2.48 | 1.69 |
index_join_scan | 1.44 | 1.47 | 1.02 |
index_scan | 34.33 | 30.81 | 0.9 |
oltp_point_select | 0.2 | 0.29 | 1.45 |
oltp_read_only | 3.75 | 5.37 | 1.43 |
select_random_points | 0.35 | 0.61 | 1.74 |
select_random_ranges | 0.38 | 0.64 | 1.68 |
table_scan | 34.33 | 33.12 | 0.96 |
types_table_scan | 75.82 | 127.81 | 1.69 |
reads_mean_multiplier | 1.31 |
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 | 8.9 | 11.87 | 1.33 |
oltp_update_index | 4.18 | 3.3 | 0.79 |
oltp_update_non_index | 4.18 | 3.25 | 0.78 |
oltp_write_only | 5.28 | 6.55 | 1.24 |
types_delete_insert | 8.43 | 6.91 | 0.82 |
writes_mean_multiplier | 0.93 |
TPC-C TPS Tests | MySQL | Dolt | Multiple |
---|---|---|---|
tpcc-scale-factor-1 | 95.5 | 38.82 | 2.46 |
tpcc_tps_multiplier | 2.46 |
Overall Mean Multiple | 1.57 |
---|
1.57.2
Merged PRs
dolt
- 9568: added TestTimeQueries
- 9564: #9556 - Fix JSON path parsing for unnecessarily quoted field names
Fixes #9556
Fixed dolt's JSON path parser to accept unnecessarily quoted field names like $."a".
The issue was in the lexer logic that incorrectly detected empty quoted strings when processing unnecessarily quoted simple field names. - 9562: go: sqle: auto_gc.go: Add some simple ergonomics to Auto GC.
Previously auto gc would run anytime the store had grown 128MB. This change adds some simple heuristics which are used to keep auto gc from running when it is unlikely to collect much relative to the amount of work it will need to do.
In particular, the heuristics added are:- After GC has run, we will not run another GC until as much time as elapsed since the end of the GC as it took to run the GC itself.
- After GC has run, we will not run another GC until the store has grown in size by at least as many bytes as the new gen contained at the end of the last successful GC run.
- 9553: implement reversed merge_joins
companion pr: dolthub/go-mysql-server#3108
go-mysql-server
- 3116: fix panic in stats histogram union and intersect
I'm not 100% how to repro this, but there is definitely something up with the Union and Intersect logic in stats histograms.
Based on the stack trace, there's a panic when attempting to Union histogram buckets.
It seems like the logic assumes that the histogram keys are always shorter than the number of buckets.
This PR fixes the Union and Intersect logic to compare the keys without the assumption, and adds some unit tests.
fixes: #9143 - 3115: Bug fix: correctly parse/resolve trigger definitions across multiple databases
- 3113: Fix double counted time delta when converting time zones
Fixes #9555
We were double counting timezone differences because we did not take the time object's location into account when calculating the time delta.
Time conversion util functions work how they're supposed to. This fix relies on the incorrect behavior to get the correct time.
TODO: redo how we do time conversions and use time. We often ignore the location a given time object is set in and we frequently arbitrarily set the location to UTC even when it's not.
Also movedinternal/time/time.go
tosql/time.go
to avoid import cycle. - 3111: Enum and set conversions in comparison.Compare
Fixes #9510
Fixes #9468
part of #9469 - 3110: Use child column id's for union when assigning exec indexes
Fixes #9516
SetOp is a TableIdNode so ColumnIds were assigned based off SetOp.cols, which is a ColSet. However, ColSet stores ColumnIds as a bitmap, not in the order they appear, and iterates over them in increasing numerical order. This causes a problem when the ColumnIds are not arranged in increasing order.
For example, in(select 'parent' as tbl, id, words from t union select 'child' as tbl, id, words from t2) as combined
, the ColumnIds are3, 1, 2
but ColSet iterates over them as1, 2, 3
. As a result,combined.id
gets wrongly assigned the field index of0
, the wrong column is compared in the filter, and an empty result is returned.
This was fixed by adding a case for SetOp where ColumnIds are assigned based on the left child (a Project node for the above example).
Added TODOs:- It may not be necessary for SetOp to be a TableIdNode. It seems kinda hacky that it is.
- ColumnIds for TableIdNode probably shouldn't be assigned based on ColSet.ForEach (increasing order) since that might not reflect the actual order they are in.
create table as select...
currently failing in Doltgres (dolthub/doltgresql#1669)
- 3108: remove unnecessary sort over merge joins
This PR looks for Sort nodes over merge joins and removes them when applicable.
benchmarks: #9553
partially addresses: #8728
Closed Issues
- 9143: index out of range panic on CTE
- 9555:
now()
does not return the right time after setting time_zone to 'UTC' - 9510: Type conversion issues in
comparison.Compare
- 9468: Empty string in
SET
behavior differs from MySQL - 9556: JSON_SET() rejects unnecessarily quoted JSON path
Performance
Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 1.89 | 0.68 | 0.36 |
groupby_scan | 13.46 | 20.0 | 1.49 |
index_join | 1.5 | 2.48 | 1.65 |
index_join_scan | 1.44 | 1.47 | 1.02 |
index_scan | 34.33 | 31.37 | 0.91 |
oltp_point_select | 0.2 | 0.29 | 1.45 |
oltp_read_only | 3.75 | 5.37 | 1.43 |
select_random_points | 0.35 | 0.61 | 1.74 |
select_random_ranges | 0.38 | 0.64 | 1.68 |
table_scan | 34.95 | 33.12 | 0.95 |
types_table_scan | 75.82 | 127.81 | 1.69 |
reads_mean_multiplier | 1.31 |
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.06 | 11.87 | 1.31 |
oltp_update_index | 4.25 | 3.3 | 0.78 |
oltp_update_non_index | 4.18 | 3.25 | 0.78 |
oltp_write_only | 5.28 | 6.55 | 1.24 |
types_delete_insert | 8.58 | 7.04 | 0.82 |
writes_mean_multiplier | 0.93 |
TPC-C TPS Tests | MySQL | Dolt | Multiple |
---|---|---|---|
tpcc-scale-factor-1 | 95.02 | 38.79 | 2.45 |
tpcc_tps_multiplier | 2.45 |
Overall Mean Multiple | 1.56 |
---|
1.57.1
Merged PRs
dolt
- 9557: go: statspro: Ensure we Close() the DoltDB associated used for stats storage when we rotate storage.
Dolt previously leaked a file descriptor on certain platforms every time stats was garbage collected. By closing the DoltDB, we no longer leak the descriptor.
Closing is currently best effort, since certain in-flight file operations can actually cause closing to fail. - 9547: Fix off-by-one error in deciding whether to match keys or prefixes
-1
was causing us to try to match full keys when only a prefix was available. This lead to a panic when comparing tuples.
Panic exposed by dolthub/go-mysql-server#3099 because it caused us to pick lookup joins more frequently - 9542: Dolt ci view
Addsdolt ci view
Right now displays the yaml file for the associated workflow when used viadolt ci view <workflow name>
.
Can also display individual jobs via--job
option. - 9528: proto/third_party,go.mod: Bump grpc-go, protobuf and protobuf-go. Regenerate go/gen/proto.
- 9514: #9508 - Fix dolt_log table function to support bind variables in prepared statements
Fixes #9508
Fix dolt_log table function to support bind variables in prepared statements
Implemented deferred argument parsing to allow proper bind variable handling during prepare phase - 9490: Unskip feature version bats test that now passes
It looks like someone has fixed this feature version issue and Codex identified it:
#6303 - 9484: Fix sql-diff skipped tests
- 9463: Fixed Skipped bats test for fetching a tag ref
- 9460: Implement the @@read_only system variable
This fixes: #9176
This sets the system variable when the engine is created. There still is no ability to change the @@read_only flag while the server is running. - 9300: Implement tree-based merging
High Level Concept
We want to optimize merges by taking into account the shape of the prolly tree. In many cases we can assemble a merged tree out of nodes from either branch, and avoiding unnecessarily recursing into the leaf nodes. But in order for that to work, the diff and merge operations need to be able to operate on internal tree nodes, and not just on leaf key-value pairs.
This project contains several independent-but-related changes in order to make that possible.
The three-way merge process has three distinct stages:- The Two-Way Differ: compares two trees and produces an ordered stream of diffs describing the changes between them.
- The Three-Way Differ: Takes two two-way differs, each of which compares one of the branches with their common ancestor. Produces an ordered stream of patches, describing changes that must be applied to the
ours
tree in order to produce the merged tree. - The Three-Way Merger: Applies the patches from the previous stage.
This PR modifies each of these stages in order to make tree-based diffing possible.
Part 1: Two-Way Range Diffs
Relevant commit: 10e6cbb
If an internal tree node is added on one branch and has no conflicting changes on the other branch, that node will appear in the merged tree. We want to be able to treat that entire node as a single change, represented as a singleDiff
object.
This diff object is a new type of Diff called aRangeDiff
: a diff that represents a change to a range of keys. In addition to the typicalKey
field that all diffs have, the range diff also has aPreviousKey
field, which contains the key value that immediately precedes the beginning of the range. The diff thus represents changes on range(PreviousKey,Key]
where the lower bound is open and the upper bound is closed. TheTo
value of this diff is the hash address of the added tree node, ornil
if all keys in that range were deleted. Note that if the address is not nil, it is not possible to determine whether the diff contains an addition, a modification, or a deletion without loading the referenced node, and in fact a range diff may contain all of the above within its range. But in many cases loading the node is not necessary for the merge.
Range diffs make it possible for a differ to produce diffs based on an intermediate level of the tree without loading the levels beneath it. For non-leaf levels of the tree, all produced diffs have a DiffType ofRangeDiff
.
By default, differs do not produce range diffs. The newly added functionRangeDifferFromRoots
returns a differ that can return range diffs.
The user of this "Range Differ" can call two different methods in order to get the next diff:- Next(): returns the next diff, which may be at the same tree level as the previous diff, or a higher level.
- split(): recurses one level lower into the tree, returning a diff whose range is within the range of the previous diff. (If this causes the differ to reach level 0, it will start producing the standard AddedDiff, ModifiedDiff, and RemovedDiff values.)
When a call to Next hits a chunk boundary, it returns to the previous tree level. This results in the following invariant: - If you list every node returned by the differ except for the nodes that preceded a call to
split()
, then none of those nodes have overlapping ranges, those nodes appear in order, and they collectively describe every change between the two trees.
As a requirement for implementing this, I had to make some changes to the AddrDiff and JsonDiff types. These were built on top of differs, but directly accessed Differ internals and made assumptions about their behavior. Changing the internal behavior broke these types, so I changed them to no longer rely on internal differ state for correctness.
Part 2: Producing Three-Way Diffs (Range Patches)
Relevant commit: 02a242e
Part 1 only describes two-way diffing. We want to use that to achieve optimal three-way diffing and merging.
Dolt currently has two different algorithms for performing three-way merging:- The simpler
ThreeWayMerge
method, which takes two trees, and diffs them both against a common base tree. We use this for merging simple internal tree-based structures like artifact maps and commit closures. - The more complicated
ThreeWayDiffer
type, which is an iterator that producesThreeWayDiff
values.ThreeWayDiffs
contain additional information that is necessary to detect constraint violations, update artifact maps, etc. We use this for merging table data.
As of #9229, both approaches write a stream of Patch values to a channel, where a Patch is a key-value pair describing a change that must be made to the left branch in order to produce the merged tree. TheThreeWayDiffer
type does extra work before it produces these patches, but in both cases the patches are consumed and applied the same way.
In order to merge optimally, we need to allow Patches to represent a range, just like how Part 1 allows diffs to represent arrange. I accomplished this by just allowing a patch to wrap a diff.
If the table being merged has constraints, we have to look at every modified row to ensure that the constraints aren't being violated by the merge. So for now, we only allow for range patches in the case that there are no constraints to violate, and we can safely use the simplerThreeWayMerge
approach. We also currently only do this if there are no secondary indexes on the table, although we should be able to relax this in the future.
The new version ofThreeWayMerge
uses the new range differs to produce the smallest set of diffs that describe the merged tree: if a range diff produced by one branch does not overlap with any of the diffs produced by the other branch, we can pass that entire range as a single Patch. If the two branches have overlapping range diffs, we must callsplit()
on the differs to produce smaller range diffs that don't overlap.
Part 3: Apply Range Patches via the Chunker
Relevant commits:- 96889a8
- ffdce3f
Once we produce the stream of patches, we need to apply them to the tree. This is the most straightforward part of the PR: we change the API for the chunker to allow it to take a node address and write all of that node's rows into the new table. If the chunker is currently at a chunk boundary, it can write the address directly into the new tree without needing to load it. Otherwise, it loads the node and recursively writes it's children into the new tree.
Putting it all together during Merge
Relevant commit: 083fdbe
This commit contains the changes to table merger, built on top of all the previous changes. It checks whether or not the table merge meets the current limitations for tree-based merging, and picks which algorithm to use to produce the stream of patches, then usesApplyMutations
to apply those patches to theours
tree, producing the merged tree.Impact
The impact is best seen when the two branches are making changes to completely separate regions of the key space, for example if every key modified by branch A is less than every key modified by branch B. This isn't an unreasonable use case: imagine a bulk import job getting merged back into a main branch, where all the imported keys are contiguous.
I created a benchmark: a table with a single int column.
Ancestor table: empty
Left branch table: contains the values 0 <= pk < 1,000,000
Right branch table: contains the valu...
1.57.0
Backwards Incompatible Changes
This version introduces a change to the dolt ci
system tables that breaks import
and export
. Run the following command to update your tables:
dolt sql -q "alter table dolt_ci_workflow_saved_query_step_expected_row_column_results rename column expected_column_row_comparison_type to expected_row_count_comparison_type;"
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
-
9527: dolt_commit and dolt_add to target branch
Fixes: #9524
-
9526: Update GC docs to have correct max for archive level
Documentation bug. We have tests to ensure you can't specify--archive-level 2
Fixes: #9521 -
9525: return
io.EOF
for empty strict lookups
When there is no lookup key/value, we should returnio.EOF
for strict lookups.
Tests: dolthub/go-mysql-server#3097
Fixes: #9523 -
9517: Migrate dolt CI commands to query database
This PR migrates thedolt CI
subcommands to use SQL queries instead of directly modifying the database.
It also fixes an existing panic when you try to run the commands while a server is running.
There are several other small changes, fixing some typos and cleaning up functions.
go-mysql-server
- 3097: test aggregates over indexes with false filter
- 3095: Convert SetType to strings
Fixes most of the broken tests in #9469 (skipping tests related to #9510 and #9511)
also fixes #9473 - 3091: sql/types: JSONWrapper: Thread Context on some methods on JSON-related types, such as ToInterface and Compare.
Closed Issues
- 9523: SELECT COUNT WHERE query that should return zero results instead hangs indefinitely
- 9524: Calling dolt specific procedures on another branch
- 9521: "dolt gc --archive-level=" is missing 2nd archive level
Performance
Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 1.93 | 0.68 | 0.35 |
groupby_scan | 13.46 | 19.65 | 1.46 |
index_join | 1.47 | 2.48 | 1.69 |
index_join_scan | 1.44 | 1.44 | 1.0 |
index_scan | 34.33 | 31.37 | 0.91 |
oltp_point_select | 0.2 | 0.28 | 1.4 |
oltp_read_only | 3.75 | 5.37 | 1.43 |
select_random_points | 0.35 | 0.61 | 1.74 |
select_random_ranges | 0.38 | 0.63 | 1.66 |
table_scan | 34.33 | 34.33 | 1.0 |
types_table_scan | 75.82 | 130.13 | 1.72 |
reads_mean_multiplier | 1.31 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
oltp_delete_insert | 8.28 | 6.55 | 0.79 |
oltp_insert | 4.1 | 3.25 | 0.79 |
oltp_read_write | 9.06 | 11.65 | 1.29 |
oltp_update_index | 4.18 | 3.3 | 0.79 |
oltp_update_non_index | 4.18 | 3.25 | 0.78 |
oltp_write_only | 5.28 | 6.55 | 1.24 |
types_delete_insert | 8.43 | 6.91 | 0.82 |
writes_mean_multiplier | 0.93 |
TPC-C TPS Tests | MySQL | Dolt | Multiple |
---|---|---|---|
tpcc-scale-factor-1 | 95.32 | 39.2 | 2.43 |
tpcc_tps_multiplier | 2.43 |
Overall Mean Multiple | 1.56 |
---|
1.56.0
Backwards Incompatible Changes
We have been testing and matching MySQL's behavior for different types including enum
. We were also far too permissive on which columns were allowed to be auto_increment
. Dolt is now more strict with the types and constraints it allows you to define. It is also more strict with auto_increment
.
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
- 9505: Dolt diff --system flag
Adds a--system
flag todolt diff
that allows you to display system tables, such as the following: Dolt ci tables likedolt_ci_workflows
anddolt_ci_workflow_jobs
, anddolt_ignore
. - 9492: #9481 - Move auto_increment validation to GMS
Remove database-side auto_increment type validation to allow GMS to handle all validation logic.
Fixes #9481- Removed ErrNonAutoIncType error from col_coll.go
- Removed auto_increment validation logic from ValidateForInsert in schema_impl.go
- Removed unused helper functions isAutoIncrementKind and isAutoIncrementType
- Added comprehensive tests for auto_increment on various data types
- 9488: Optimize dolt_diff_ tables for lookups on primary key ranges.
Fortunately, 90% of the work for this happened to have been done last week with #9419
Thedolt_diff_
tables expose an index that matches the primary keys of the underlying table. We even already have tests that this index gets chosen for select expressions that limit the key to a specific value or range.
However, in practice this index wasn't actually used.
As of this PR, the index will actually be used to optimize the ranges that are scanned at each commit.
I'm not sure of an obvious way to test this: ordinarily I'd add a test that a query selects the index and returns the correct answer (and I added such a test for the index on thefrom_
keys)... but the engine was already using the index and then discarding it. - 9476: go/store/nbs: Improve GC behavior when non-persisted changes have been made to the store.
GC has a fast-path check so that it performs a noop if there have been no changes to the database since the last time GC ran successfully. This change improves those checks so that GC works appropriately in more cases. In particular:- When GC is running against a database that has in-flight writes, it will now still run, potentially collecting garbage created by the inflight writes, instead of not doing anything.
- When GC is running against a database that has a journal file, but where the journal file has never been persisted into the state of the manifest of the database because it only has inflight writes which have never committed or updated the root, GC will now run appropriately and will collect the contents of the journal file if it is appropriate to do so.
- 9436: Improve
dolt checkout
error handling for missing tables
Fix #9392Summary
Enhances the dolt_checkout stored procedure to handle missing table specifications
more gracefully by processing valid tables while providing detailed warnings for
invalid ones, instead of failing immediately on the first missing table.Changes Made
- Enhanced Error Handling: Modified checkoutTablesFromHead() to collect warnings
for missing tables instead of failing fast - Improved User Experience: Valid tables are now processed successfully even when
some specified tables don't exist - Better Error Reporting: Multiple missing tables now show aggregated error
messages - Added Test Coverage: Comprehensive tests for single and multiple missing table
scenarios
Behavior Changes
Before: calldolt checkout valid_table missing_table
would fail entirely
After: calldolt_checkout valid_table missing_table
processes valid_table
and returns warning about missing_table - Enhanced Error Handling: Modified checkoutTablesFromHead() to collect warnings
- 9435: go: statspro: Small cleanups in error handling and session command handling.
go-mysql-server
- 3093: go.mod: Bump to Go 1.24.0.
- 3092: add UTC() to unix time min and max Timestamp
- 3091: sql/types: JSONWrapper: Thread Context on some methods on JSON-related types, such as ToInterface and Compare.
- 3090: pull from main
- 3089:
DECIMALS
with foreign keys tests
This PR adds skipped tests for decimals in foreign keys. - 3087: Mixed Type Foreign Key
This PR adds some tests for foreign keys where the parent and child columns are of different types, some of which are actually compatible in MySQL. - 3085: Fix enum DEFAULT NULL validation in analyzer
Fixes #9491
Fix enum DEFAULT NULL validation - 3084: #9481 - Move auto_increment validation to GMS
Move auto_increment constraint validation entirely from Dolt to go-mysql-server for better separation of concerns and MySQL compatibility.
Fixes #9481
Fixes #9470- Add validateAutoIncrementType() function using existing type checking
- Fix validation order to prioritize auto_increment before index validation
- Unskip comprehensive test coverage for all invalid data types
- Fix bugs: YEAR and BIT types were incorrectly allowed
- 3083: Split function-specific engine test queries into their own file
- 3082: Allow GroupBy primary key (and some test clean up)
related to #4998
moved some passing tests from #1765, moved some queries to BrokenQueries section
added tests for #7095 - 3081: make_set and export_set functions
Documented here.
https://dev.mysql.com/doc/refman/8.4/en/string-functions.html
Already gave this a once-over, but see what you think. - 3080: add
auto_increment
tests with various types
This PR adds a bunch of skipped tests demonstrating MySQLauto_increment
behavior. - 3079: INSERT string function
- 3078: #8893 - Fix charset validation to match MySQL behavior for issue #8893
Fixes #8893- Fix charset validation error messages to show proper column names and row numbers.
- Add MySQL-compatible strict/non-strict mode behavior for invalid UTF-8 handling
- Preserve charset validation in ConvertToBytes() method (data insertion)
- Remove charset validation from SQL() method (query results)
This allows querying existing invalid UTF-8 data (enabling cleanup) while preventing new invalid data insertion with proper error messages.
- 3077: Add various
SET
type tests
This PR adds a bunch of tests forSET
andENUM
behavior, skipping ones that are currently broken.
Additionally, refactors/deduplicates the the tests. - 3076: #9425 - Fix enum zero validation in strict mode
Fixes #9425:- Add strict mode check for 0 values in EnumType.Convert()
- Return data truncation error for invalid 0 values in strict mode
- Allow 0 values when empty string is explicitly defined as enum value
- Add row number tracking in insertIter for accurate error reporting
- Enhance enum errors with column name and row number
- Fix ErrInvalidType formatting issues in enum expression
🤖 Generated with Claude Code
- 3074: #9424 - Fix enum foreign key constraints to match MySQL behavior
Fixes #9424- Allow enum types to reference each other in foreign keys regardless of string values
- MySQL allows enum foreign keys to match based on underlying numeric values
- Modified foreignKeyComparableTypes to handle enum types specially
- Updated test expectations to use correct error types (ErrForeignKeyChildViolation)
🤖 Generated with Claude Code
- 3070: Don't prune VirtualColumnTable tables
fixes #8968
Pruning columns in VirtualColumnTable tables causes indexing errors when VirtualColumnTable Projections are evaluated
Future work: prune VirtualColumnTable Projections so that VirtualColumnTable underlying table can be pruned - 3068: #9426 - Support enum string context in functions
Fixes #9426- Modified ConvertToCollatedString in sql/types/strings.go to handle enum types
- Updated CONCAT function to use type-aware string conversion
- Enabled and fixed "enum conversion to strings" test
🤖 Generated with Claude Code
- [3064](https://github.com/dolthub/go-m...
1.55.6
Merged PRs
dolt
- 9474: go/store/nbs: file_table_persister.go: Let PruneTableFiles clean up old archive files as well.
Fix a bug where a conjoin running during PruneTableFiles could cause errors, instead of the code correctly ignoring the removed files. - 9466: refactor(import): show actual arg count in import error messages
Update import command validation to display the number of arguments received when validation fails. Previously, errors only showed "expected 1 or 2 arguments" without indicating how many were actually provided. Now shows "expected 1 argument (for stdin) or 2 arguments (table and file), but received N" for clearer debugging.
The argparser already shows argument counts for too many arguments (e.g. "Expected at most 2, found 3"), but this change ensures consistent messaging for all validation cases.
Refs: #1083 - 9465: Bug fix: Copy lookup details for
dolt_commit_diff
When used in a join (e.g.LEFT JOIN
) that requires a table's partitions to be loaded multiple times, a bug in thedolt_commit_diff
was preventing the query from running. This change fixes that by making a copy of the lookup details before thedolt_commit_diff
system table alters them, so that the original lookup data can be preserved for any future calls to get table partitions. - 9443: Dolt Rm CLI command
Addsdolt rm
command for the cli. Uses thedolt_rm()
stored procedure and takes the same options (currently only--cached
). - 9433: --set-upstream and improved --track for dolt branch
Adds--set-upstream
as an option todolt branch
, alongside making--track
more ubiquitous.
Both now allow you to set the upstream remote for both an existing or new branch, along with or excluding a starting commit. - 9429: refactor(import): show actual arg count in import error messages
Description
This addresses the second comment/request in #1083. It improves the error messages for dolt table import when incorrect argument counts are provided.Problem
Previously, when users provided the wrong number of arguments to dolt table import, they would see:
expected 1 or 2 arguments
This message didn't indicate how many arguments were actually provided, making it difficult to debug command issues.Solution
Updated the argument validation to show the actual argument count:- For 0 arguments:
expected 1 argument (for stdin) or 2 arguments (table and file), but received 0
- For >2 arguments:
"expected at most 2 arguments (table and file), but received N
Additionally, the argparser now shows all provided arguments when there are too many, e.g.:
error: import has too many positional arguments.
Expected at most 2, found 3: year,state_fips, precinct_results, test.csv
Testing
Added bats tests to verify the improved error messages:- Test for 0 arguments case
- Test for valid 1 argument case (stdin)
- Test for the specific -pks flag issue mentioned in #1083
- For 0 arguments:
Closed Issues
1.55.5
Merged PRs
dolt
- 9461: Correctly delete rows from DOLT_CONFLICTS_ tables when the table schema has changed from the base.
The logic for marking conflicts as resolved had an implicit assumption that the table schema had not changed from the ancestor commit. If the schema had changed, then it would compute an incorrect key for the conflicts map, and would fail to remove conflicts. - 9459: Add @GLOBAL.dolt_auto_gc_enabled system variable to inspect whether auto GC is enabled.
The system variable is read-only. The only way to enable Auto GC remains setting:
behavior:
auto_gc_behavior:
enable: true
in the config.yaml file which is given todolt sql-server
in its--config
parameter. - 9446: Flush outputs in archive command. Fixes flaky test
Make lambabats more reliable.
Also, catch an error which was previously ignored. - 9445: Swallow gc NoOp err
Fixes: #9448 - 9441: Only print
Query Ok
results in interactive shell.
This PR changes the CLI so that we only print the "Query OK" and "Database Changed" messages when using the interactive shell; this matched MySQL behavior.
Additionally, it now caches the output of DDL iterators. This way, we are not dependent on the printing to complete to have the changes committed (rowIter.Close()
to be called).
companion pr: dolthub/go-mysql-server#3059
fixes: #9281
go-mysql-server
- 3070: Don't prune VirtualColumnTable tables
fixes #8968
Pruning columns in VirtualColumnTable tables causes indexing errors when VirtualColumnTable Projections are evaluated
Future work: prune VirtualColumnTable Projections so that VirtualColumnTable underlying table can be pruned - 3067: #9427 - Prevent user and system variables in column defaults and generated values
Fixes #9427
Adds validation to prevent user variables (@variable) and system variables (@@variable) from being used in column default value expressions and generated column expressions.
Modified validateColumnDefault function in sql/analyzer/resolve_column_defaults.go to detect UserVar and SystemVar expressions and return ErrColumnDefaultUserVariable error.
Added ErrColumnDefaultUserVariable error definition to sql/errors.go to match MySQL's error message format.
🤖 Generated with Claude Code - 3065: Fix enum columns cannot have auto_increment
Fixes #9423- Added ErrInvalidColumnSpecifier error message
- Added enum type validation in validateAutoIncrementModify and validateAutoIncrementAdd
- Enabled previously skipped test case for enum auto_increment validation
🤖 Generated with Claude Code
- 3063: Fix
count(*)
for added generated columns
Fixes #8959 - 3062: Allow DEFAULT keyword in UPDATE for generated columns (issue #9438)
Fixes #9438- Modified validation in dml.go to allow DEFAULT expressions for generated columns
- For generated columns, DEFAULT now correctly uses the generated expression
- Maintains existing validation that rejects non-DEFAULT values for generated columns
🤖 Generated with Claude Code
- 3060: Merge scopeColumn types in SetOp scope
fixes #9024
Previously, the scopeColumn type defaulted to that of the corresponding scopeColumn in the left scope. This would cause a type conversion error if the left scopeColumn was a less general type than the corresponding right scopeColumn.
The merged scopeColumn is also made nullable if one of the merging columns is nullable.
GeneralizeTypes also checks if two types are already equal. This prevents DolgresTypes from always being generalized as a LongText. - 3059: Fix SET statements to return OkResult instead of empty rows
brings back changes from: dolthub/go-mysql-server#3046 - 3054: Support for set-returning functions
Also includes small bug fix for CASE type conversion semantics (don't always convert to longtext)
Closed Issues
- 9426: Support
enum
string context - 6397: Allow table names with special characters when MySql allows them
- 6488: alias case sensitivity bug
- 6848: jsonpath lookup bug
- 8968: Generated columns not populated
- 9281:
CREATE TABLE
doesn't generateQuery OK
confirmation message - 9423:
enum
columns cannot haveauto_increment
- 9427: Prevent user and system variables in column
default
andgenerated
values - 9448: Multiple dolt_gc calls without changes result in error state
- 9330: Feature request : a way to stop tracking a table
- 8959: Generated Columns added to table result in index error
- 9438: Allow
default
keyword asupdate
value for generated columns - 9428: Allow
default
keyword as value to column withgenerated
constraint
Performance
Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 1.89 | 0.68 | 0.36 |
groupby_scan | 13.46 | 19.65 | 1.46 |
index_join | 1.52 | 2.48 | 1.63 |
index_join_scan | 1.47 | 1.44 | 0.98 |
index_scan | 34.33 | 31.37 | 0.91 |
oltp_point_select | 0.2 | 0.29 | 1.45 |
oltp_read_only | 3.75 | 5.37 | 1.43 |
select_random_points | 0.35 | 0.61 | 1.74 |
select_random_ranges | 0.39 | 0.64 | 1.64 |
table_scan | 34.95 | 33.12 | 0.95 |
types_table_scan | 75.82 | 130.13 | 1.72 |
reads_mean_multiplier | 1.3 |
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.06 | 11.87 | 1.31 |
oltp_update_index | 4.18 | 3.3 | 0.79 |
oltp_update_non_index | 4.18 | 3.25 | 0.78 |
oltp_write_only | 5.28 | 6.55 | 1.24 |
types_delete_insert | 8.43 | 6.91 | 0.82 |
writes_mean_multiplier | 0.93 |
TPC-C TPS Tests | MySQL | Dolt | Multiple |
---|---|---|---|
tpcc-scale-factor-1 | 94.85 | 38.99 | 2.43 |
tpcc_tps_multiplier | 2.43 |
Overall Mean Multiple | 1.55 |
---|
1.55.4
Merged PRs
dolt
- 9437: Match quoted and unquoted check definitions during merge.
When resolving check constraints, we perform string comparison against a check's definition in the schema and from the create table statement. Since updating the check constraints to include backquotes (in this PR dolthub/go-mysql-server#3040), it's possible older check constraint definitions do not have backquotes.
This PR makes it so the check considered the case where backquotes are missing and adds a backwards compatibility test. - 9419: Add indexes to dolt_commit_diff_ tables that include the primary key of the underlying table
Thedolt_commit_diff_
system tables allow for comparing a table at two different commits. They require a filter on theto_commit
andfrom_commit
fields, which the table exposes as an index.
This PR extends those indexes to have additional columns based on the primary keys of the underlying table. This allows a user to efficiently compare only a specific range of that table.
Specifically, if the table's primary key columns are namedpk1
,pk2
, ...pkN
, then the system table now provides two indexes:to_commit
,from_commit
,from_pk1
,from_pk2
...from_pkN
to_commit
,from_commit
,to_pk1
,to_pk2
...to_pkN
If the select filter uses a prefix of either of these indexes, then we can implement the select as a Diff on only the intended range.
Because theto_
columns are NULL for removed rows, and thefrom_
columns are NULL for inserted rows, a filter on thefrom_
columns will only return modifications and deletions, and a filter on theto_
columns will only return modifications and additions. In hindsight, perhaps the primary key rows should have appeared in the diff as a single column instead of both ato_
andfrom_
column, but that ship has sailed.
As for the implementation, I don't love the fact that code paths that diff the entire table without accepting a range pass around a zero-valuedsql.Lookup
, which we then detect by checking to see iflookup.index == nil
. It's a code smell for sure. But I couldn't think of a better way to do it.
- 9411: go: sqle/statspro: Rework the way stats manages its session in order to make it safe to continue collecting stats during a GC run.
Previously GC, even with the session-aware safepoint controller, such as is used with Auto GC, would cancel any ongoing stats work and would restart it at the end of the run. Because Auto GC can run quite frequently and because stats can take a while to run to completion, this meant that on some workloads stats would never successfully populate.
This PR changes stats so that it more correctly integrates with the session-safe GC safepoint controller. That allows GC to ensure that the stuff stats is currently working on gets carried over to the collected view of database, and stats itself has a chance to run to completion regardless of what GC work is going on.
This PR leaves the cancel-stats-on-collect behavior enabled for the kill-connections safepoint controller, where that behavior is still the correct one. - 9402: Fix 9391 test for max1row err
Fixes #9391
Add dolt_commit_ancestors table query test - 9401: Renaming default branch results in updating local config.
Update the init.defaultBranch config when renaming the default branch.
Fixes: #8039 - 9400: Fix 9390, 9391 max1Row iterator returned more than one row
Fixes #9390
Fixes #9391
Dolt history table indexes are never marked as unique, regardless of the underlying table’s index properties: prevents unique constraints from being incorrectly reported or exported for history tables - 9399: go/libraries/doltcore/remotestorage: chunk_store.go: Fix a bug where we did not refresh expired table file URLs appropriately.
- 9398: dolt_rm stored procedure
For issue #9330
Implements adolt_rm()
stored procedure:- Remove tables from the database and from tracking
--cached
option to untrack tables, but leave them in the database.
- 9396: Implement
dolt_diff_dolt_procedures
Partial fix for #9373 - 9395: Implement
dolt_history_dolt_procedures
Partially fixes: #9373 - 9389: Archive cmd improvements
This change has a grab bag of improvements from working with media_wiki database.- All table files, not just oldgen, and converted to archives.
- Updates to the DB are performed incrementally. Each table file conversion results in a swap of tables, allowing for large job termination and not losing all progress
- Compression workers are parallelized.
- Revert is incremental, and works on newgen.
- 9387: archive format 3. Supporting larger indexes
The media_wiki database has a 900Gb table file, which fails to convert to an archive because the index size greatly exceeds the size of an uint32. This change extends to a uint64.
go-mysql-server
- 3061: Fix #9428: Allow default keyword as value for generated columns.
🤖 Generated with Claude Code
Fix #9428
AllowsINSERT INTO table VALUES (default)
to work with generated columns - 3060: Merge scopeColumn types in SetOp scope
fixes #9024
Previously, the scopeColumn type defaulted to that of the corresponding scopeColumn in the left scope. This would cause a type conversion error if the left scopeColumn was a less general type than the corresponding right scopeColumn.
The merged scopeColumn is also made nullable if one of the merging columns is nullable.
GeneralizeTypes also checks if two types are already equal. This prevents DolgresTypes from always being generalized as a LongText. - 3058: Add variety of Enum tests
This PR adds a bunch of tests for the Enum type. - 3057: Changing how
NO_MERGE_JOIN
hint is applied to fix a panic
The join planning hint system previously generated all join combinations, then relied on a set of "blocked" join ops to skip over plans withMergeJoin
ops. This resulted in some plans panic'ing when this option was set, because the code generally assumes that each expression group will have a non-nilBest
member set once the first expression in the group has been evaluated. However, forMergeJoin
, this assignment would be skipped andBest
would be nil, which causes a panic in some plans when theNO_MERGE_JOIN
hint (or the @@disable_merge_join system variable) was enabled.
This new logic skips ever adding theMergeJoin
ops to the memo, which reduces time spent planning/costing the join, and also avoids breaking the assumption thatBest
will always be populated after the first expression in an expression group is costed.
Also cleans up a few other small issues in the code, such as renamingdbSube()
todpEnumerateSubsets()
. - 3056: Revert "Merge pull request #3046 from dolthub/macneale4-claude/query-ok"
This reverts commit 0828810fe6f752c4d2ac6eed320be028fab7ed19, reversing changes made to 22622a0de59153903b233ce9839292abc6b6f878. - 3053: moved keyless subquery test to correct place
move test added in #3052 - 3052: Use IsJoin flag to check if keyless tables are actually allowed
fixes #9334
Makes clear that IsJoin flag is only for explicitUPDATE JOIN
statements. Update nodes with subqueries that have been optimized into an UpdateJoin node would have a false IsJoin. - 3051: Fixes 7201 non json data err comparison errs
Fixes #7201
Add tests since issue seems already fixed - 3050: fix exists subqueries in stored procedures
Missed a case forExistsSubquery
statements when replacing variables in Stored Procedures.
fixes: #9409 - 3049: Fix 7300 date time overflow underflow
Fixes #7300
Update intervalapply()
to use go built-in time package
UpdateDate
,Datetime
,Timestamp
range to match MYSQL docs
Add new format for times
Increase accuracy of time fractionals in formats but round to microsecond precision - 3048: Added field to ScriptTest to skip test
- 3047: Detect when one index is always better than another.
I observed an issue with a table with two indexes that would always pick the worse one. The indexes were non-unique, had nullable columns, and the lookups were partial, so there was very little information for the analyzer to go off of. However, one index had added strictly more constraints than the other:A SELECT query on the above table with filters on shared1, shared2, and a3 would use b_idx, while a query on the above table with filters...create table test( pk int primary key, shared1 int, shared2 int, a3 int, a4 int, b3 int, b4 int, key a_idx(shared1, shared2, a3, a4), key b_idx(shared1, shared2, b3, b4) );
1.55.3
Merged PRs
dolt
- 9393: Fix 483 - rm already covered bats
Fixes #483
Removed extra bats test - 9388: Ensure error checking is performed when generating statistics template
- 9384: Bh/copilot test
- 9383: go: clone: Fix dolt clone to work even when dolt startup logic detects that TMPDIR is not renamable to the local directory and it creates a .dolt/tmp directory.
- 9382: contribution test
Copy of #9349 - 9379: Fix 8853 warn local user persists
Fixes: #8853
On sql-server restart__dolt_local_user__
is dropped if persistent
If the__dolt_local_user__
is persistent on restart it's logged with a warning and dropped - 9376: 9374 support mysql user mysql password env vars
Fixes: #9374
Add support for MYSQL_USER/MYSQL_PASSWORD environment variables - 9371: Fix 483 unable to checkout table(s)/branch(s) with same name
Fixes: #483
Local/remote refs take priority in Do What I Mean (DWIM) scenarios wheredolt
has to interpret ambiguous input incheckout
.
If a table and tracking branch share the same name, but local does not exist an error will occur.
--
can now be used to clear up ambiguity.
case 1:dolt checkout <ref> -- [<tables>]
<ref>
must be a singular valid tree, everything else after '--' must be a table.
case 2:dolt checkout -- [<tables>]
This is case 1 but without<ref>
.
case 3:git checkout <something> [--]
(a) If is a commit switch to branch.
(b) If isn’t a commit, and either "--" is present or isn’t a table, no -t or -b is given, and there’s a tracking branch named on exactly one remote (or on the specified remote), then this acts as shorthand to fork local from that remote-tracking branch.
(c) Otherwise, if "--" is present, treat it like case 1.
(d) Otherwise, if a ref treat it like case 1. If a table treat like case 2. If neither fail.
case 4:git checkout <something> <tables>
The first argument must not be ambiguous. If a<ref>
follow case 1, if a table follow case 2. Otherwise, fail. - 9369: Dolt Stash CLI Migration
Part 2 of #7623
Migratesdolt stash
cli command to usedolt_stash
stored procedure - 9361: Implemented
dolt_history_dolt_schemas
anddolt_diff_dolt_schemas
Fixes: #9360 - 9349: feat(import): validate primary keys early
NOTE: currently this is just checking primary keys, but the related issue also mentioned in #1083 references issues with number of args. I'm wondering if I should split that into two separate PRs, or if it's fine to do both - currently I only have the PK validation in place? Personally I would argue to separate them since they are slightly different, albeit similar. But happy to take either path.
Add early validation to check if specified primary keys exist in the import file's schema before processing rows. This prevents users from waiting for large files to be processed only to discover that their primary key column names are invalid.
Changes:- Add validatePrimaryKeysAgainstSchema function to check primary key existence against file schema
- Integrate validation into newImportDataReader for create operations
- Provide helpful error messages listing available columns when primary keys are not found
- Add unit tests covering various validation scenarios
- Add BATS integration tests for CSV, PSV, and large file scenarios
The validation only runs for create operations when primary keys are explicitly specified and no schema file is provided. This ensures fast failure while maintaining backward compatibility.
Before: Users waited minutes for large files to process before seeing "provided primary key not found" errors
After: Users get immediate feedback with helpful column suggestions
Closes: #1083
- 9339: Utility method to list all system tables in a schema
Needed for doltgres, to put generated system tables in pg_catalog tables.
go-mysql-server
- 3043: fix missed case for nullable enums
This PR adds a missed edge case from this: dolthub/go-mysql-server#2985
We were incorrectly making nullable enum columns take the first value. - 3040: backtick column names in check constraints
MySQL backticks any column names within a check expression preventing any parser errors when round tripping tables, so we should do the same.
fixes: #9343 - 3038: Fix schema for call to
hash.HashOf()
inHashLookups
The incorrect schema was used in thehash.HashOf()
function.
n.Schema()
is the schema of the entire JoinNode; we just needed the schema of the key.'
Test bump: dolthub/ld#20634 - 3037: Apply foreign key constraints to
UPDATE JOIN
Modified UpdateJoin to be able to apply foreign key constraints
Part of #9356 - 3036: Cache
REGEX
We should be able to avoid recompiling the regex if the pattern and flags are static.
Addresses: #9366
Other reasons for potential slowness:- REGEXP is more correct; it takes into account collations
- Variable-length TextStorage requires unwrapping
- 3034: Allow
drop trigger ...
when trigger is invalid
We should ignore parser errors when trying to drop triggers that are invalid.
fixes: #9359 - 3027: make
sql.HashOf()
collation aware
This PR adds type/collation information toHashOf
.
Additionally, it refactorsHashOf
to avoid import cycles and hasgroupingKey
use the function.
fix for: #9049
doltgres fix: dolthub/doltgresql#1548
Closed Issues
- 9360: add
dolt_history_dolt_schemas
anddolt_diff_dolt_schemas
- 483: Unable to checkout table if branch name and table name are identical
- 4205: Preview conflicts without running
dolt merge
- 1083: validate all import args before reading import rows
- 9343: Check constraint with column named
order
breaks inserts, updates, other operations - 8853: Warn if Dolt can't create
__dolt_local_user__
account on startup - 9374: Support MYSQL_USER and MYSQL_PASSWORD environment variables in Dolt Docker image
- 9049:
IN (SUBQUERY)
expressions ignore collation - 9368:
dolt reset --hard
does not resetdolt_schemas
- 9366: REGEXP performance regression
- 3039: server package usage issues
Performance
Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 1.96 | 0.68 | 0.35 |
groupby_scan | 13.22 | 20.0 | 1.51 |
index_join | 1.5 | 2.48 | 1.65 |
index_join_scan | 1.44 | 1.47 | 1.02 |
index_scan | 34.33 | 30.26 | 0.88 |
oltp_point_select | 0.2 | 0.28 | 1.4 |
oltp_read_only | 3.75 | 5.37 | 1.43 |
select_random_points | 0.35 | 0.61 | 1.74 |
select_random_ranges | 0.38 | 0.64 | 1.68 |
table_scan | 34.95 | 32.53 | 0.93 |
types_table_scan | 75.82 | 125.52 | 1.66 |
reads_mean_multiplier | 1.3 |
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.06 | 11.87 | 1.31 |
oltp_update_index | 4.18 | 3.3 | 0.79 |
oltp_update_non_index | 4.18 | 3.25 | 0.78 |
oltp_write_only | 5.28 | 6.55 | 1.24 |
types_delete_insert | 8.43 | 6.91 | 0.82 |
writes_mean_multiplier | 0.93 |
TPC-C TPS Tests | MySQL | Dolt | Multiple |
---|---|---|---|
tpcc-scale-factor-1 | 94.02 | 38.19 | 2.46 |
tpcc_tps_multiplier | 2.46 |
Overall Mean Multiple | 1.56 |
---|
1.55.2
Merged PRs
dolt
go-mysql-server
- 3034: Allow
drop trigger ...
when trigger is invalid
We should ignore parser errors when trying to drop triggers that are invalid.
fixes: #9359 - 3032: Generalize types in
CASE
,IF
, andIFNULL
Fixes #9321
Generalize types inCASE
,IF
, andIFNULL
as described by MySQL docs - 3031: Fix 7998 json escape double quotes
Key write now uses same recursive call towriteMarshalledValue()
as value underjson_encode.go
Fixes: #7998 - 3030: Distinguish nils in firstBuffer
Fixes #9035
InAggregationBuffer.firstBuffer
, the buffer should not update if the first row has already been written. However, there was no way of distinguishing between anil
because the buffer is empty and anil
because the value in that column of the first row isnil
.
When you have two rows(NULL, 1)
and(1, NULL)
, the first row gets written into[]firstBuffer.val
as{nil, 1}
. Because there's no way to tell whether the first value is supposed to benil
, it ends up getting overwritten by the1
in the second row. Because the second value is notnil
,Update
skips it. As a result, we end up with a row{1, 1}
that matches neither of the original rows and evaluates toTRUE
when grouped byc0 = c1
, even though the original rows evaluate toNULL
.
This isn't an issue when the rows are(NULL, 1), (NULL, 1)
or(1, NULL), (1, NULL)
because thenil
value remains anil
value whenUpdate
is called on the second row.
I fixed this by adding awrittenNil
flag tofirstBuffer
to indicate that thenil
value is meant to be there and should not be overwritten. - 3029: Fix 9347 panic case statements info schema
information_schema
updated to respect enum type
Eval()
underenum.go
is more flexible with strings now
Fixes: #9347 - 3028: add mysql dialect tag to new
group by
test
newgroup by
test added in dolthub/go-mysql-server#3025 is not Postgres/Doltgres compatible - 3024: Adding skipped tests for
UPDATE ... JOIN
bugs - 2994: fix NewServer call
this is a followup to dolthub/go-mysql-server#2989
Closed Issues
- 9359: Error when trying to drop trigger
- 9347: Panic with case statements in information_schema.tables access
- 9321: Using an IFNULL with TINYINT param restricts the output as TINYINT
- 9355: dolt version 1.56.0 published on dockerhub but latest released version is 1.55.1
Performance
Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 1.96 | 0.68 | 0.35 |
groupby_scan | 13.22 | 18.61 | 1.41 |
index_join | 1.5 | 2.57 | 1.71 |
index_join_scan | 1.47 | 1.44 | 0.98 |
index_scan | 34.33 | 30.81 | 0.9 |
oltp_point_select | 0.2 | 0.29 | 1.45 |
oltp_read_only | 3.75 | 5.37 | 1.43 |
select_random_points | 0.35 | 0.61 | 1.74 |
select_random_ranges | 0.39 | 0.64 | 1.64 |
table_scan | 34.95 | 32.53 | 0.93 |
types_table_scan | 75.82 | 130.13 | 1.72 |
reads_mean_multiplier | 1.3 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
oltp_delete_insert | 8.43 | 6.67 | 0.79 |
oltp_insert | 4.18 | 3.25 | 0.78 |
oltp_read_write | 9.06 | 11.87 | 1.31 |
oltp_update_index | 4.18 | 3.36 | 0.8 |
oltp_update_non_index | 4.18 | 3.25 | 0.78 |
oltp_write_only | 5.28 | 6.55 | 1.24 |
types_delete_insert | 8.43 | 6.91 | 0.82 |
writes_mean_multiplier | 0.93 |
TPC-C TPS Tests | MySQL | Dolt | Multiple |
---|---|---|---|
tpcc-scale-factor-1 | 94.38 | 39.0 | 2.42 |
tpcc_tps_multiplier | 2.42 |
Overall Mean Multiple | 1.55 |
---|