This release contains backwards incompatible changes:
TIMESTAMP
andDATETIME
columns now honor fractional second precision (FSP), from 0 to 6 decimal places. Previous releases of Dolt ignored FSP for these types and always used 6 decimal places. The column typeDATETIME
orTIMESTAMP
both now have an implicit FSP of 0 digits (truncated to nearest second), which matches the MySQL behavior. To get the old default of 6 decimal places of FSP, use the typesDATETIME(6)
orTIMESTAMP(6)
. Existing tables withDATETIME
orTIMESTAMP
columns are not affected. They store 6-digit precision times before and after this change.
Per Dolt’s versioning policy, this is a minor version bump because the same CREATE TABLE
statement with a DATETIME
or TIMESTAMP
column that specify a fractional second precision other than 6 will now produce a different schema than before.
Merged PRs
dolt
- 6532: When checking out a branch, consider it clean if the working set differs from the head only by feature version.
Fixes #6524
RootValue
is backed by a flatbuffer, but access to the flatbuffer is hidden behind interfaces. We check if twoRootValues
are equal by checking the RootValue's hash. This makes it awkward to check to see if twoRootValues
differ only by a single field.
The solution here is both simple and noninvasive: we create modified root values with the same feature version and hash them again.
This also adds an escape hatch when creating new branches, since we know that the new branches will be clean. We only do this extra check when checking out an existing branch. - 6529: add minver tag to YamlServerConfig
- 6526:
dolt version
only prints the dolt version if there is no dolt database in the directory.
Remove "no valid database in this directory" fromdolt version
in the case of no dolt database found. - 6525: Removed Full-Text tables from 'schema show'
- 6518: Support datetime and timestamp precision
Fixes #6503
In addition to datetime precision support, this PR also significantly simplifies the process of deserializing and caching schemas. Previously on load, we always did two round trips to dereference table's schema hash, then re-hash the object, then serialized it into an intermediate in-memory format and back to the schema.Schema, before returning it. The new code eliminates this redundancy.
go-mysql-server
- 1950: Honor precision for datetime and timestamp, default to 0 (no fractional seconds)
- 1948: Name resolution refactor
Accumulation of:- dolthub/go-mysql-server#1927
- dolthub/go-mysql-server#1932
- dolthub/go-mysql-server#1936
- dolthub/go-mysql-server#1939
- dolthub/go-mysql-server#1943
Name resolution is interleaved with converting AST->plan nodes. Prepared statements use ParsedQuery and AST round tripping to analyze fresh query strings for every invoke. Various bug fixes.
- 1930: leave aliases in projection
We convertexpression.Alias
intoexpression.GetField
with the name replaced in the top-level projection.
When aliasing two different columns with the same name, we fail to properly distinguish them and end up rewriting the GetField indexes for both columns to be the same; this leads to incorrect results.
A simple fix appears to be simply allowing the top-level projection to remain as anexpression.Alias
.
This fix does not work for prepared statements in the old name resolution path.
fix for: #6455 - 1907: support joins on using syntax
Relevant MySQL docs
This PR adds an implementation for theUSING
clause during joins.
It is mostly equivalent to creating a conjunction over equality statements over each column in anON
clause.
Additionally, this properly supportsNATURAL LEFT/RIGHT JOIN
s.
So we now have... JOIN ... USING (...)
... LEFT JOIN ... USING (...)
... RIGHT JOIN ... USING (...)
... NATURAL JOIN ...
... NATURAL LEFT JOIN ...
... NATURAL RIGHT JOIN ...
fix for: #5789
Closed Issues
- 6524: Dolt checkout fails incorrectly when there are working set changes
- 6503: Dolt datetime defaults to precision 6, mysql defaults to 0
- 6455: nil table RIGHT_JOIN correctness bug
- 6305: XCA Tool shows no records when Dolt is used instead of MySQL
Latency
Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 2.07 | 3.07 | 1.5 |
groupby_scan | 12.98 | 18.28 | 1.4 |
index_join | 1.27 | 4.74 | 3.7 |
index_join_scan | 1.21 | 2.3 | 1.9 |
index_scan | 32.53 | 59.99 | 1.8 |
oltp_point_select | 0.14 | 0.46 | 3.3 |
oltp_read_only | 2.71 | 7.98 | 2.9 |
select_random_points | 0.31 | 0.84 | 2.7 |
select_random_ranges | 0.37 | 1.21 | 3.3 |
table_scan | 32.53 | 58.92 | 1.8 |
types_table_scan | 75.82 | 170.48 | 2.2 |
reads_mean_multiplier | 2.4 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
bulk_insert | 0.001 | 0.001 | 1.0 |
oltp_delete_insert | 5.47 | 6.09 | 1.1 |
oltp_insert | 2.66 | 3.19 | 1.2 |
oltp_read_write | 6.55 | 15.27 | 2.3 |
oltp_update_index | 2.71 | 3.07 | 1.1 |
oltp_update_non_index | 2.71 | 3.13 | 1.2 |
oltp_write_only | 4.03 | 7.43 | 1.8 |
types_delete_insert | 5.28 | 6.32 | 1.2 |
writes_mean_multiplier | 1.4 |
Overall Mean Multiple | 2.0 |
---|