Bot releases are visible (Hide)
Published by github-actions[bot] 3 months ago
IndexedJsonDocument
IndexedJsonDocument
JSON_REMOVE
function that leverages the new indexed JSON storage format.@@binlog_row_metadata
, add @@binlog_row_image
@@binlog_row_metadata
system variable that prevented it from being queried. Adds the @@binlog_row_image
system variable that was missing.information_schema
tables include the schemas for the current database, not all databasesversion
function if it doesn't already existinformation_schema
tablesCOM_BINLOG_DUMP_GTID
COM_BINLOG_DUMP_GTID
command. Previously, when the integrator returned an error, it was logged in the primary server logs, but it was not being sent back to the replica who sent the command. This change causes an error packet to be sent to the replica, containing the details of the error the integrator returned.dolt
that will exercise this codepath.Published by github-actions[bot] 4 months ago
nextLogPosition
fieldNextLogPosition
field that matches up with the previous events that have been sent in the stream. If not, the replica will shutdown the binlog stream. https://github.com/dolthub/dolt/pull/8087 fixed this issue, but didn't account for when a heartbeat event is sent after the initial Format Description event, but before any user initiated requests. The way to trigger this is to start replica;
on the replica, then don't run any commands on the primary and let the first heartbeat go out after the binlog stream has been up for 30s.$[*]
). Instead of returning an error, we detect the error and fall back on the original implementation.invalid bucket type: *stats.Bucket
at the end of the indexscan when adding the filtered histogram with a synthetic back to the implementor-type statisticmergeOverlappingBuckets
to not share memory, but also I'm not sure if merging buckets is a common performance win in most cases, so disabling for nowRead Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 2.07 | 2.97 | 1.4 |
groupby_scan | 13.7 | 17.32 | 1.3 |
index_join | 1.34 | 5.28 | 3.9 |
index_join_scan | 1.27 | 2.57 | 2.0 |
index_scan | 34.33 | 54.83 | 1.6 |
oltp_point_select | 0.18 | 0.46 | 2.6 |
oltp_read_only | 3.49 | 7.7 | 2.2 |
select_random_points | 0.33 | 0.77 | 2.3 |
select_random_ranges | 0.39 | 0.9 | 2.3 |
table_scan | 34.95 | 56.84 | 1.6 |
types_table_scan | 75.82 | 144.97 | 1.9 |
reads_mean_multiplier | 2.1 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
oltp_delete_insert | 8.13 | 6.09 | 0.7 |
oltp_insert | 3.82 | 3.02 | 0.8 |
oltp_read_write | 8.58 | 13.95 | 1.6 |
oltp_update_index | 3.89 | 3.07 | 0.8 |
oltp_update_non_index | 3.89 | 3.02 | 0.8 |
oltp_write_only | 5.37 | 6.43 | 1.2 |
types_delete_insert | 7.7 | 6.67 | 0.9 |
writes_mean_multiplier | 1.0 |
TPC-C TPS Tests | MySQL | Dolt | Multiple |
---|---|---|---|
tpcc-scale-factor-1 | 98.43 | 32.02 | 3.1 |
tpcc_tps_multiplier | 3.1 |
Overall Mean Multiple | 2.07 |
---|
Published by github-actions[bot] 4 months ago
dolthub/dolt-sql-server
if the args dolt sql-server
are passed to the image, it will error. This will also prevent accidentally starting two Dolt servers in the container.nil
handler for the additional hash type, which would cause a panic as the counts were not equal (all non-Extended types should have a matching nil handler).ExtendedTupleComparator
. When creating a new ExtendedTupleComparator
, we pass in the previous TupleTypeHandler
to handle all non-Extended types. If the previous TupleTypeHandler
was ExtendedTupleComparator
and the new one was also ExtendedTupleComparator
, then we could end up with a misinterpretation of data that could lead to incorrect results, as the handler assumed a different type than the actual type. This has been changed so that ExtendedTupleComparator
will always use the inner comparator of a previous ExtendedTupleComparator
. For now this will always be the default comparator, but if we ever add another one, then this should properly handle that change.panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x29e14d1]
goroutine 399548427 [running]:
github.com/dolthub/dolt/go/libraries/doltcore/remotestorage.fetcherRPCDownloadLocsThread.func3()
external/com_github_dolthub_dolt_go/libraries/doltcore/remotestorage/chunk_fetcher.go:266 +0xf1
golang.org/x/sync/errgroup.(*Group).Go.func1()
external/org_golang_x_sync/errgroup/errgroup.go:78 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 399548420
external/org_golang_x_sync/errgroup/errgroup.go:75 +0x96
This pr aims to prevent this.invalid bucket type: *stats.Bucket
at the end of the indexscan when adding the filtered histogram with a synthetic back to the implementor-type statisticmergeOverlappingBuckets
to not share memory, but also I'm not sure if merging buckets is a common performance win in most cases, so disabling for nowunix_timestamp
table_catalog
for information_schema.tables
dolthub/dolt-sql-server
image doesnt work correctly when regular dolt commands are supplied to it as argumentsRead Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 2.07 | 2.91 | 1.4 |
groupby_scan | 13.22 | 17.01 | 1.3 |
index_join | 1.34 | 5.37 | 4.0 |
index_join_scan | 1.27 | 2.57 | 2.0 |
index_scan | 34.33 | 53.85 | 1.6 |
oltp_point_select | 0.18 | 0.46 | 2.6 |
oltp_read_only | 3.49 | 7.56 | 2.2 |
select_random_points | 0.34 | 0.75 | 2.2 |
select_random_ranges | 0.39 | 0.89 | 2.3 |
table_scan | 34.33 | 54.83 | 1.6 |
types_table_scan | 74.46 | 142.39 | 1.9 |
reads_mean_multiplier | 2.1 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
oltp_delete_insert | 8.13 | 6.09 | 0.7 |
oltp_insert | 3.75 | 3.02 | 0.8 |
oltp_read_write | 8.58 | 13.95 | 1.6 |
oltp_update_index | 3.89 | 3.07 | 0.8 |
oltp_update_non_index | 3.89 | 3.02 | 0.8 |
oltp_write_only | 5.37 | 6.43 | 1.2 |
types_delete_insert | 7.7 | 6.67 | 0.9 |
writes_mean_multiplier | 1.0 |
TPC-C TPS Tests | MySQL | Dolt | Multiple |
---|---|---|---|
tpcc-scale-factor-1 | 99.28 | 32.71 | 3.0 |
tpcc_tps_multiplier | 3.0 |
Overall Mean Multiple | 2.03 |
---|
Published by github-actions[bot] 4 months ago
ListBinaryLogs
API changesDoltBinlogPrimaryController.ListBinaryLogs
to keep it in sync with API changes in GMS.table_catalog
for information_schema.tables
SHOW BINARY LOGS
SHOW BINARY LOGS
statement is executed, GMS will invoke the registered BinlogPrimaryController
to ask it for the list of binary logs and send them back to the client.indexScanOp
enum so that it's accessible from outside the package, and also replaces the type switch in newLeaf
with a replaceable function that can be overridden from outside the package to support types that are not native to GMS.CREATE PROCEDURE
contains a subqeury, correctly index into it.CREATE PROCEDURE foo() CREATE PROCEDURE bar() SELECT 1;
[]byte
string conversions. Prepared statements receive the string parameters as a string
type, so this PR moves the check for all conversions.AssertErr
and AssertErrWithCtx
methods.Published by github-actions[bot] 4 months ago
This PR includes a backwards incompatible change to table statistics type encoding. Old statistics will not load with the new client, and will have to be manually updated with ANALYZE, or deleted with call dolt_stats_drop()
, or removed from the filesystem. Additionally, table statistics will load on startup by default for databases with fewer than 2 million rows. This is usually a one-time penalty of a few seconds.
dolt sql -q "set @@PERSIST.dolt_stats_bootstrap_enabled = 1;"
(calling the command above with non-empty tables will still bootstrap statistics once)","
, but enums and others can include commas so we use a line break now "/n"
. Old versions of stats will fail to load with the newer version.Published by github-actions[bot] 4 months ago
[n, n+1)
key range is a lot faster than a binary search with a tuple comparison callback. But it is subject to at least two edge cases where (n+1)
is not a valid stop range: (1) n+1 == n
, because of precision loss, and (2) n+1 < n
, because of overflow.GetField
indexes for UpdateJoin
with Update Trigger
GetField
indexes to an update join
query.triggerIters
to rowUpdateAccumulator
ResolvedTable
references under SubqueryAliases
when there are multipleDECLARE CONTINUE HANDLER
LOOP
construct.DECLARE CONTINUE HANDLER
by making the following changes:
Block
node instead of the BeginEnd
node.DECLARE EXIT HANDLER
, the Block
returns a special error value that propagates to the containing BeginEnd
node in order to terminate just that node.assignExecIndexes
analysis pass on if-conditions when invoking stored procedures, which can cause execution failures if the condition has a sub-expression that has a GetField
node.GetFields
in the if-condition, and is also fixed here.analyzeProcedureBodies
is not called for triggers.)VALUES
statementVALUES
statementVALUES
statment as an alias for SELECT * FROM ...
.SELECT (VALUES ...)
(support for values as a select_expression
).Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 2.07 | 2.91 | 1.4 |
groupby_scan | 13.22 | 17.32 | 1.3 |
index_join | 1.34 | 5.37 | 4.0 |
index_join_scan | 1.27 | 2.22 | 1.7 |
index_scan | 34.33 | 53.85 | 1.6 |
oltp_point_select | 0.18 | 0.52 | 2.9 |
oltp_read_only | 3.49 | 8.28 | 2.4 |
select_random_points | 0.33 | 0.81 | 2.5 |
select_random_ranges | 0.39 | 0.97 | 2.5 |
table_scan | 34.95 | 54.83 | 1.6 |
types_table_scan | 75.82 | 142.39 | 1.9 |
reads_mean_multiplier | 2.2 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
oltp_delete_insert | 8.13 | 6.09 | 0.7 |
oltp_insert | 3.82 | 3.02 | 0.8 |
oltp_read_write | 8.58 | 15.0 | 1.7 |
oltp_update_index | 3.89 | 3.13 | 0.8 |
oltp_update_non_index | 3.89 | 3.07 | 0.8 |
oltp_write_only | 5.37 | 6.55 | 1.2 |
types_delete_insert | 7.7 | 6.79 | 0.9 |
writes_mean_multiplier | 1.0 |
TPC-C TPS Tests | MySQL | Dolt | Multiple |
---|---|---|---|
tpcc-scale-factor-1 | 98.85 | 32.66 | 3.0 |
tpcc_tps_multiplier | 3.0 |
Overall Mean Multiple | 2.07 |
---|
Published by github-actions[bot] 4 months ago
pg_catalog
is created by default when Doltgres is using Dolt. In addition, adds a new function to hook into schema functionality.VALUES
statementVALUES
statementVALUES
statment as an alias for SELECT * FROM ...
.SELECT (VALUES ...)
(support for values as a select_expression
).set @abc.
def = 10
, while MySQL throws an error.Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 2.07 | 2.81 | 1.4 |
groupby_scan | 13.46 | 17.32 | 1.3 |
index_join | 1.37 | 5.37 | 3.9 |
index_join_scan | 1.27 | 10.84 | 8.5 |
index_scan | 34.95 | 53.85 | 1.5 |
oltp_point_select | 0.18 | 0.46 | 2.6 |
oltp_read_only | 3.49 | 7.56 | 2.2 |
select_random_points | 0.34 | 0.75 | 2.2 |
select_random_ranges | 0.39 | 0.9 | 2.3 |
table_scan | 34.95 | 54.83 | 1.6 |
types_table_scan | 75.82 | 137.35 | 1.8 |
reads_mean_multiplier | 2.7 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
oltp_delete_insert | 7.98 | 6.09 | 0.8 |
oltp_insert | 3.82 | 3.02 | 0.8 |
oltp_read_write | 8.58 | 13.95 | 1.6 |
oltp_update_index | 3.89 | 3.07 | 0.8 |
oltp_update_non_index | 3.89 | 3.02 | 0.8 |
oltp_write_only | 5.37 | 6.32 | 1.2 |
types_delete_insert | 7.7 | 6.67 | 0.9 |
writes_mean_multiplier | 1.0 |
TPC-C TPS Tests | MySQL | Dolt | Multiple |
---|---|---|---|
tpcc-scale-factor-1 | 99.66 | 26.16 | 3.8 |
tpcc_tps_multiplier | 3.8 |
Overall Mean Multiple | 2.50 |
---|
Published by github-actions[bot] 4 months ago
Previous releases 1.39.5 and 1.40.0 contained a bug when updating floats that would produce incorrect data. The change that caused this bug has been reverted in this release. Releases 1.39.5 and 1.40.0 have been deleted. If you are using those releases, we highly encourage you to upgrade to this release.
Note, only tables containing float types would be effected by the above bug and then only if a value was updated. The effected releases were only in the wild for 48 hours so we think the impact of this bug is small. If you are impacted by the bug, please come by our Discord and we will help further.
The bug was caught by our nightly fuzzer testing.
https://github.com/dolthub/fuzzer
dolt admin archive
command:
restore
subcommand in dolt_backup()
dolt_backup()
stored procedure now supports the restore
subcommand. Customers can use this support to create a new database from an existing backup, or to sync an existing database from a backup. Note that the restore
subcommand currently requires root/superuser access to execute, since it can change database state (particular when the --force
argument is used).db1
from a backup on disk:
call dolt_backup('restore', 'file:///opt/local/dolt-backups/db1', 'db1');
Related to https://github.com/dolthub/dolt/issues/7993TEMPORARY TABLE
tags the same as normal TABLE
sauto_increment
on temporary tables(field1, ..., fieldn, nil, ...)
to one higher than the partial key (field1, fieldn+1, nil, ...)
.RangeField.StrictKey
and .Equal
attributes to differentiate max-1-row and an equality restriction.Range.Matches
, which is mostly eliminated with this PR.
SELECT o_entry_d FROM orders1 WHERE o_w_id = 1 AND o_d_id = 5 AND o_c_id = 1891 ORDER BY o_id DESC;
SELECT c_id FROM customer1 WHERE c_w_id = 1 AND c_d_id= 6 AND c_last='ABLECALLYABLE' ORDER BY c_first;
SELECT o_id, o_carrier_id, o_entry_d FROM orders1 WHERE o_w_id = 1 AND o_d_id = 9 AND o_c_id = 1709 ORDER BY o_id DESC
SET @@PERSIST.log_bin=1;
SET @@PERSIST.enforce_gtid_consistency=ON;
SET @@PERSIST.gtid_mode=ON;
Related to https://github.com/dolthub/dolt/issues/7512
IndexedJsonDocument
, a JSONWrapper
implementation that stores JSON documents in a prolly tree with probabilistic hashing.JSONWrapper
implementation. It holds the root hash of the prolly tree.JSONChunker
are backwards compatible with current Dolt binaries and can be read back by existing versions of Dolt. (Although they will have different hashes than equivalent documents that those versions would write.)Aborted_connects
status variableAborted_connects
status variable.ConvertToString
because that same method was being used when printing JSON to the screen or a MySQL client, which favored speed over matching MySQL exactly. But for casts we must be precise.StringType.SQL
we can distinguish between these cases and handle them properly.NULL
as their default values, which did not match MySQL.ResolvedTables
.UPDATE IGNORE ... JOIN
INSERT ... VALUES (...) AS new_tbl ON DUPLICATE x = new_tbl.x
)ON DUPLICATE
expressions. It looks like either of the below options:
INSERT INTO tbl VALUES (1, 2) AS tbl_new ON DUPLICATE KEY b = tbl_new.b;
INSERT INTO tbl VALUES (1, 2) AS tbl_new(a_new, b_new) ON DUPLICATE KEY b = b_new;
This replaces the previous (now-deprecated) syntax:
INSERT INTO tbl VALUES (1, 2) ON DUPLICATE KEY b = VALUES(b);
Supporting both syntaxes together was non-trivial because it means there's now two different ways to refer to the same column. While he had an existing way to "redirect" one column name to another, this only worked for unqualified names (no table name), and it overrode the normal name resolution rules, which meant we would fail to detect cases that should be seen as ambiguous.set @abc.
def = 10
, while MySQL throws an error.CONSTRAINT
keyword when adding a foreign key without a constraint nameConnectionAborted()
callback to Handler
interfaceAborted_connects
status variable, GMS needs to be notified when a connection attempt is aborted in the Vitess layer. This change adds a ConnectionAborted()
callback method to Vitess' Handler
interface and calls it whenever a connection attempt errors out before it's fully established.BinlogStream
type into BinlogMetadata
mysql.BinlogStream
type from Vitess was a little awkward to use, and seems to have been mostly intended as test code. This gives it a more descriptive name and makes it a little easier to pass around struct copies without concurrency issues from a shared instance.CALL DOLT_RESTORE()
and support a -f
force optionerror: plan is not resolved because of node '*plan.ShowColumns'
when executing SHOW FULL COLUMNS
or DESCRIBE
for specific viewsdolt pull
fails in the presence of ignored tablesPublished by github-actions[bot] 5 months ago
dolt_hashof_db()
function which returns the root hash of a database.ForeignKeyCollection.GetMatchingKey()
) to match a resolved FK with an unresolved FK, but this function didn't support matching an unresolved FK with a resolved FK. That code assumed that the ForeignKeyCollection
would always be from an ancestor root value and therefore it wasn't valid for the ancestor to be resolved, while a more recent root value was unresolved. However, since then, we have used this logic in our root merging logic that breaks that assumption.ForeignKeyCollection.GetMatchingKey()
to allow the caller to control whether a resolved FK should match with unresolved FKs or not. This means ForeignKeyCollection.GetMatchingKey()
doesn't have to assume its receiver instance is a ForeignKeyCollection from an ancestor root value, and instead the caller is responsible for specifying which behavior is needed.rename table
logic to match MySQL's behavior of updating auto-generated foreign key names to match the new table name.ChildIter
interface?INSERT ... VALUES (...) AS new_tbl ON DUPLICATE x = new_tbl.x
)ON DUPLICATE
expressions. It looks like either of the below options:
INSERT INTO tbl VALUES (1, 2) AS tbl_new ON DUPLICATE KEY b = tbl_new.b;
INSERT INTO tbl VALUES (1, 2) AS tbl_new(a_new, b_new) ON DUPLICATE KEY b = b_new;
This replaces the previous (now-deprecated) syntax:
INSERT INTO tbl VALUES (1, 2) ON DUPLICATE KEY b = VALUES(b);
Supporting both syntaxes together was non-trivial because it means there's now two different ways to refer to the same column. While he had an existing way to "redirect" one column name to another, this only worked for unqualified names (no table name), and it overrode the normal name resolution rules, which meant we would fail to detect cases that should be seen as ambiguous.json_function_tests.go
and json tests that depend on it to their own package.sql/expression/function/json
doesn't depend on testify
, which is a library that we only want to depend on for tests.DOLT_HASHOF_DB()
Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 2.11 | 2.97 | 1.4 |
groupby_scan | 13.22 | 17.32 | 1.3 |
index_join | 1.34 | 5.47 | 4.1 |
index_join_scan | 1.27 | 2.26 | 1.8 |
index_scan | 34.33 | 54.83 | 1.6 |
oltp_point_select | 0.18 | 0.52 | 2.9 |
oltp_read_only | 3.55 | 8.28 | 2.3 |
select_random_points | 0.34 | 0.83 | 2.4 |
select_random_ranges | 0.39 | 0.97 | 2.5 |
table_scan | 34.33 | 54.83 | 1.6 |
types_table_scan | 77.19 | 139.85 | 1.8 |
reads_mean_multiplier | 2.2 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
oltp_delete_insert | 8.13 | 6.21 | 0.8 |
oltp_insert | 3.82 | 3.02 | 0.8 |
oltp_read_write | 8.58 | 15.0 | 1.7 |
oltp_update_index | 3.89 | 3.13 | 0.8 |
oltp_update_non_index | 3.89 | 3.07 | 0.8 |
oltp_write_only | 5.47 | 6.55 | 1.2 |
types_delete_insert | 7.7 | 6.79 | 0.9 |
writes_mean_multiplier | 1.0 |
TPC-C TPS Tests | MySQL | Dolt | Multiple |
---|---|---|---|
tpcc-scale-factor-1 | 98.38 | 26.01 | 4.0 |
tpcc_tps_multiplier | 3.8 |
Overall Mean Multiple | 2.33 |
---|
Published by github-actions[bot] 5 months ago
IfConditional
s when applying stored proceduresCALL
statement, we weren't calling finalizeSubqueries()
on any subqueries in IfConditional
expressions, which caused the subquery to not have a NodeExecBuilder
populated.decimal.MarshalJSONWithoutQuotes
is a global variable.@@max_binlog_size
system variableBinlogStream
type into BinlogMetadata
mysql.BinlogStream
type from Vitess was a little awkward to use, and seems to have been mostly intended as test code. This gives it a more descriptive name and makes it a little easier to pass around struct copies without concurrency issues from a shared instance.CREATE USER ... IDENTIFIED WITH
syntax (MySQL ref) allows the caching plugin to be specified in string quotes, but our parser only supported identifier quotes.CREATE USER
statement from the primary to a Dolt replica, but Dolt wasn't able to parse the statement because of the use of string quotes around the caching plugin name.dolt sql
Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 2.07 | 2.97 | 1.4 |
groupby_scan | 13.22 | 17.01 | 1.3 |
index_join | 1.34 | 5.28 | 3.9 |
index_join_scan | 1.27 | 2.22 | 1.7 |
index_scan | 34.95 | 52.89 | 1.5 |
oltp_point_select | 0.18 | 0.5 | 2.8 |
oltp_read_only | 3.49 | 8.13 | 2.3 |
select_random_points | 0.34 | 0.81 | 2.4 |
select_random_ranges | 0.39 | 0.95 | 2.4 |
table_scan | 34.95 | 54.83 | 1.6 |
types_table_scan | 75.82 | 137.35 | 1.8 |
reads_mean_multiplier | 2.1 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
oltp_delete_insert | 7.98 | 6.21 | 0.8 |
oltp_insert | 3.82 | 3.07 | 0.8 |
oltp_read_write | 8.58 | 14.73 | 1.7 |
oltp_update_index | 3.89 | 3.19 | 0.8 |
oltp_update_non_index | 3.89 | 3.13 | 0.8 |
oltp_write_only | 5.37 | 6.55 | 1.2 |
types_delete_insert | 7.7 | 6.79 | 0.9 |
writes_mean_multiplier | 1.0 |
TPC-C TPS Tests | MySQL | Dolt | Multiple |
---|---|---|---|
tpcc-scale-factor-1 | 99.71 | 25.77 | 4.2 |
tpcc_tps_multiplier | 3.9 |
Overall Mean Multiple | 2.33 |
---|
Published by github-actions[bot] 5 months ago
filter-branch
changes to working/staged changes--apply-to-uncommitted
option to dolt filter-branch
, which applies the filter-branch
changes to the working and staged roots.dolt gc
has been run immediately prior to using this command.mysql> select JSON_INSERT("null", "$.a", 1);
+-------------------------------+
| JSON_INSERT("null", "$.a", 1) |
+-------------------------------+
| null |
+-------------------------------+
1 row in set (0.00 sec)
mysql> select JSON_INSERT("null", "$.a", 1) is null;
+---------------------------------------+
| JSON_INSERT("null", "$.a", 1) is null |
+---------------------------------------+
| 0 |
+---------------------------------------+
The only time we should be coercing a JSON-null document into SQL-null is for JSON_EXTRACT (for paths other than "$") and JSON_VALUE (for all paths). But these are already handled separately.filter-branch
option to apply query to WORKING
and STAGED
rootsdolt fetch <remote>
failed to use the default ref spec
init
Dolt database programatically?Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 2.11 | 2.97 | 1.4 |
groupby_scan | 13.22 | 17.32 | 1.3 |
index_join | 1.34 | 5.18 | 3.9 |
index_join_scan | 1.27 | 2.18 | 1.7 |
index_scan | 33.72 | 52.89 | 1.6 |
oltp_point_select | 0.17 | 0.5 | 2.9 |
oltp_read_only | 3.36 | 8.13 | 2.4 |
select_random_points | 0.32 | 0.8 | 2.5 |
select_random_ranges | 0.38 | 0.95 | 2.5 |
table_scan | 34.33 | 54.83 | 1.6 |
types_table_scan | 73.13 | 137.35 | 1.9 |
reads_mean_multiplier | 2.2 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
oltp_delete_insert | 7.98 | 6.21 | 0.8 |
oltp_insert | 3.75 | 3.07 | 0.8 |
oltp_read_write | 8.43 | 15.0 | 1.8 |
oltp_update_index | 3.82 | 3.19 | 0.8 |
oltp_update_non_index | 3.82 | 3.13 | 0.8 |
oltp_write_only | 5.37 | 6.55 | 1.2 |
types_delete_insert | 7.7 | 6.91 | 0.9 |
writes_mean_multiplier | 1.0 |
TPC-C TPS Tests | MySQL | Dolt | Multiple |
---|---|---|---|
tpcc-scale-factor-1 | 101.2 | 25.57 | 4.1 |
tpcc_tps_multiplier | 0.3 |
Overall Mean Multiple | 1.17 |
---|
Published by github-actions[bot] 5 months ago
-a
option in dolt commit
-a
option in dolt commit
.CREATE USER ... IDENTIFIED WITH
syntax (MySQL ref) allows the caching plugin to be specified in string quotes, but our parser only supported identifier quotes.CREATE USER
statement from the primary to a Dolt replica, but Dolt wasn't able to parse the statement because of the use of string quotes around the caching plugin name.InjectedExpr
, except for statements instead of expressions.Published by github-actions[bot] 5 months ago
filter-branch
when there are local changesdolt filter-branch
.ErrDatabaseNotFound
errorsErrDatabaseNotFound
errors, and updates our handler so that ComInitDB
messages will map errors to MySQL error codes.Published by github-actions[bot] 5 months ago
dolt_pull()
was leaving working set dirtydolt_pull()
operations on two branches in the same session when local branches are already up to date, with @@autocommit
off, leave the session unable to commit because two branch heads are considered dirty. See new bats test for details on reproducing.DoltSession.SetWorkingSet()
marks that branch head dirty until the transaction is committed. Most merge code paths used by pull involve performing a dolt_commit
(), which has the side effect of zeroing out the current transaction, meaning the next statement would get a new transaction and fresh working sets loaded from disk, avoiding the dirty state problem. Only the code path where the branch head is already up to date is affected by this bug. All the merge library code that actually needs to call DoltSession.SetWorkingSet()
(only necessary before a dolt_commit
happens, or in the case of a squash where changes should remain in the working set) already does so, making the additional call in dolt_pull.go
redundant and leading to this buggy behavior in the no-change case.sqlfmt
packagedolt_patch_table_function.go
public to generate DDL statements for binlog support, so I moved them into the sqlfmt
package and cleaned up some package import cycles along the way.go.mod
. Two component versions indicate a development version, not a release version and cause an error about not being able to download a toolchain.
SOURCE_AUTO_POSITION
config parameter, and errors if a user attempts to disable GTID auto positioning.ErrDatabaseNotFound
errorsErrDatabaseNotFound
errors, and updates our handler so that ComInitDB
messages will map errors to MySQL error codes.-race
flag - and we are seeing some errors related to concurrency and updating of the tables map.sync.Mutex
to all the places where this map is updated - our tests are now passing :)InjectedExpr
, except for statements instead of expressions.InjectedExpr
, except for statements instead of expressions.DATE
, TIME
, and TIMESTAMP
literal parsingselect cast(<str> as character)
select cast(<str> as double precision)
select cast(<str> as read)
Published by github-actions[bot] 5 months ago
dolt remote
to SQLNewEmptyIndex
when table does not existdolt remote
to SQLRead Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 2.07 | 3.02 | 1.5 |
groupby_scan | 13.22 | 17.32 | 1.3 |
index_join | 1.34 | 5.18 | 3.9 |
index_join_scan | 1.27 | 2.18 | 1.7 |
index_scan | 35.59 | 53.85 | 1.5 |
oltp_point_select | 0.17 | 0.51 | 3.0 |
oltp_read_only | 3.36 | 8.28 | 2.5 |
select_random_points | 0.33 | 0.8 | 2.4 |
select_random_ranges | 0.39 | 0.95 | 2.4 |
table_scan | 35.59 | 55.82 | 1.6 |
types_table_scan | 75.82 | 137.35 | 1.8 |
reads_mean_multiplier | 2.1 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
oltp_delete_insert | 7.98 | 6.67 | 0.8 |
oltp_insert | 3.75 | 3.25 | 0.9 |
oltp_read_write | 8.43 | 15.83 | 1.9 |
oltp_update_index | 3.82 | 3.49 | 0.9 |
oltp_update_non_index | 3.82 | 3.43 | 0.9 |
oltp_write_only | 5.37 | 7.56 | 1.4 |
types_delete_insert | 7.7 | 7.56 | 1.0 |
writes_mean_multiplier | 1.1 |
TPC-C TPS Tests | MySQL | Dolt | Multiple |
---|---|---|---|
tpcc-scale-factor-1 | 101.66 | 22.89 | 4.4 |
tpcc_tps_multiplier | 4.4 |
Overall Mean Multiple | 2.53 |
---|
Published by github-actions[bot] 5 months ago
sql.Schema
for conflicts table schemaNomStringKind
for every column. Now, we just reuse the underlying sql.Schema.sql-server
should initialize persisted global vars.dolt/config.json
) can store persisted global variable values, but when --data-dir
is used when starting a sql-server
, the local configuration doesn't get loaded properly.--data-dir
--data-dir
flag to work on a Dolt directory outside of the current working directory, the local configuration in the Dolt directory wasn't getting correctly loaded. This change evaluates the --data-dir
parameter earlier, so that the first time we load the Dolt environment, we can pass the data directory and get the local configuration loaded correctly.RootValue
for special merge logic, which is used by Doltgres.LIKE NULL
edge caseSELECT <str> LIKE NULL
should return NULL
instead of false
.VALUES
constructor... VALUES ROW(...), ROW(...)
statement were not equal, we would throw a panic.Slow_queries
, Max_used_connections
, Com_select
, and Connections
Connections
currently only reports the successful connection attempts, but MySQL includes all connection attempts in that status variable. To capture the failed attempts, we'll need to expose that information from the Vitess layer.atomic
instance, we don't need to synchronize at a larger scope.select cast(<str> as character)
select cast(<str> as double precision)
select cast(<str> as read)
row
optional in VALUES constructor and insert statementROW
keyword optional in VALUES
statementINSERT INTO ... (VALUES ROW(...))
statementdrop database
Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 2.07 | 3.02 | 1.5 |
groupby_scan | 13.22 | 17.63 | 1.3 |
index_join | 1.34 | 5.18 | 3.9 |
index_join_scan | 1.27 | 2.22 | 1.7 |
index_scan | 34.33 | 54.83 | 1.6 |
oltp_point_select | 0.17 | 0.51 | 3.0 |
oltp_read_only | 3.36 | 8.43 | 2.5 |
select_random_points | 0.32 | 0.8 | 2.5 |
select_random_ranges | 0.39 | 0.95 | 2.4 |
table_scan | 34.33 | 55.82 | 1.6 |
types_table_scan | 73.13 | 137.35 | 1.9 |
reads_mean_multiplier | 2.2 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
oltp_delete_insert | 7.98 | 6.67 | 0.8 |
oltp_insert | 3.75 | 3.25 | 0.9 |
oltp_read_write | 8.28 | 15.83 | 1.9 |
oltp_update_index | 3.82 | 3.49 | 0.9 |
oltp_update_non_index | 3.82 | 3.43 | 0.9 |
oltp_write_only | 5.28 | 7.56 | 1.4 |
types_delete_insert | 7.56 | 7.56 | 1.0 |
writes_mean_multiplier | 1.1 |
TPC-C TPS Tests | MySQL | Dolt | Multiple |
---|---|---|---|
tpcc-scale-factor-1 | 101.35 | 22.45 | 4.9 |
tpcc_tps_multiplier | 4.9 |
Overall Mean Multiple | 2.73 |
---|
Published by github-actions[bot] 5 months ago
This minor release includes a new entry in the dolt_status
and dolt_diff
system tables for database collation changes, making these tables backwards incompatible for some select statements. Changes to a dolt database collation will show up as table changes with the name __DATABASE__<db>
. Additionally, tables starting with this prefix are not allowed.
dolt diff
we need to add support for show create database as of ...
, which would require changes to vitess and gms. For now, we just show the new create statement.dolt add
dolt commit
dolt status
dolt diff
dolt merge
dolt sql -r json
command.log_bin
and change the default of performance_schema
log_bin
system variable controls whether a MySQL server logs to the binary log or not.performance_schema
system variable was previously defaulted to 1
, to match MySQL's default, but this can cause tools (e.g. Datadog) to believe that the performance_schema
system tables are available, and then error out when trying to query them. Since we don't provide a performance_schema
database, the new default for the performance_schema
system variable is 0
.sql.Parser
interface. This interface is defined in the engine and it should be used rather than using mysql parser directly.GlobalParser
variable to expose Doltgres parser for parsing view definition for now. It can also be used in places that needs doltgres-specific syntax parsing.Published by github-actions[bot] 6 months ago
The previous (now deleted) release 1.36.1 had a start up time issue for databases > 10GB. We patched it with this one. That release was only up for an hour or so, so it is unlikely anyone got it. Thus, we moved this to 1.37.0 to warn people, just in case.
This minor release includes an internal interface change to the chunk journal index. The first startup process for a database with the old index format will perform a rewrite. This rewrite is a one-time penalty that in testing is <5% of the time it would take to reimport the database.
ReadReplicaDatabase
instances, so that they will poll their remote and pull new commits. It also adds some additional logging to help debug issues with remote-based replication.RootValue
into an interface. Every function that seems unique to Dolt's RootValue
has been changed into a function variable, with the variable being overwritten from Doltgres to point to a different function.bufio.Writer
that lazily writes to disk. And after some increment we flush a CRC/root value record for consistency checking the index during bootstrap. This avoids big stalls for flushing a batch of index records. We also only write an addr16
now, because that's what we load into the default chunk address map.Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 2.07 | 2.97 | 1.4 |
groupby_scan | 13.22 | 17.63 | 1.3 |
index_join | 1.37 | 5.18 | 3.8 |
index_join_scan | 1.27 | 2.22 | 1.7 |
index_scan | 34.33 | 53.85 | 1.6 |
oltp_point_select | 0.17 | 0.51 | 3.0 |
oltp_read_only | 3.36 | 8.43 | 2.5 |
select_random_points | 0.33 | 0.8 | 2.4 |
select_random_ranges | 0.39 | 0.95 | 2.4 |
table_scan | 34.33 | 54.83 | 1.6 |
types_table_scan | 74.46 | 134.9 | 1.8 |
reads_mean_multiplier | 2.1 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
oltp_delete_insert | 7.98 | 6.91 | 0.9 |
oltp_insert | 3.75 | 3.43 | 0.9 |
oltp_read_write | 8.43 | 16.12 | 1.9 |
oltp_update_index | 3.82 | 3.55 | 0.9 |
oltp_update_non_index | 3.82 | 3.43 | 0.9 |
oltp_write_only | 5.37 | 7.84 | 1.5 |
types_delete_insert | 7.7 | 7.56 | 1.0 |
writes_mean_multiplier | 1.1 |
TPC-C TPS Tests | MySQL | Dolt | Multiple |
---|---|---|---|
tpcc-scale-factor-1 | 102.12 | 22.29 | 4.6 |
tpcc_tps_multiplier | 4.6 |
Overall Mean Multiple | 2.60 |
---|
Published by github-actions[bot] 6 months ago
This version does not include an interface change, but does include large changes to the performance and network utilization behavior of dolt fetch
and related functionality, such as shallow clone and Dolt cluster replication.
dolt init
to use --data-dir
paramdolt init
would use the value of --data-dir
for almost all of the repository initialization, but the code that set up repository configuration would always use the current directory. This change allows callers to use dolt init
with the --data-dir
param to initialize directories other than the current working directory as Dolt repositories.dolt fetch
: Implement pipelined, continuous downloads during pulls from DoltHub and dolt sql-server
remotes.fetch
, pull
, shallow clone and cluster replication will now make more aggressive utilization of available network resources.log_bin
and change the default of performance_schema
log_bin
system variable controls whether a MySQL server logs to the binary log or not.performance_schema
system variable was previously defaulted to 1
, to match MySQL's default, but this can cause tools (e.g. Datadog) to believe that the performance_schema
system tables are available, and then error out when trying to query them. Since we don't provide a performance_schema
database, the new default for the performance_schema
system variable is 0
.Published by github-actions[bot] 6 months ago
information_schema.TABLES.DATA_LENGTH
information_schema.TABLES.DATA_LENGTH
currently reports the max possible table size for a table, and doesn't take into account table file compression or that variable length fields (e.g. TEXT) are not always fully used. Tools such as DBeaver use this metadata to display table sizes, and since the estimates can easily be orders of magnitude greater than the actual size on disk, it can cause customers to be concerned by the reported sizes (e.g. https://github.com/dolthub/dolt/issues/6624).dolt diff --stat -r json
--stat
correctly for JSON result format.jsonSerializer
to load JSON from LazyJSONDocument
--name-only
option for dolt diff
--name-only
option for dolt diff
, which just prints the tables that have changed between the two commits. This mirrors git diff --name-only
.LazyJSONDocument
when reading from a JSON column.LazyJSONDocument
is an alternate implementation of sql.JSONWrapper
that takes a string of serialized JSON and defers deserialization until it's actually required.dolt sql -q "SELECT * FROM test_table"
ran in 47 seconds using JSONDocument
, and 28 seconds using LazyJSONDocument
, nearly half the time.json_encode.go::marshalToMySqlString
) in order to produce a string that is, according to the docstring "compatible with MySQL's JSON output, including spaces."LazyJSONDocument
, which wraps a JSON string and only deserializes it if needed.JSONWrapper
implementation. It isn't used by the GMS in-memory storage, but it will be used in Dolt to speed up SELECT
queries that don't care about the structure of the JSON.JSONDocument
is that even after it de-serializes the JSON into a go value, it continues to keep the string in memory. This is good in cases where we would want to re-serialize the JSON later without changing it. (So statements like SELECT json FROM table WHERE json->>"$.key" = "foo";
will still be faster.) But with the downside of using more memory than JSONDocument
)create table t (i int, index (i, i));
was allowed.dolt diff --stat -r json
produces invalid JSONdolt diff
... that only shows the tables changed in a simpler formatRead Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 2.14 | 3.13 | 1.5 |
groupby_scan | 13.46 | 17.95 | 1.3 |
index_join | 1.37 | 5.28 | 3.9 |
index_join_scan | 1.27 | 2.26 | 1.8 |
index_scan | 34.33 | 54.83 | 1.6 |
oltp_point_select | 0.17 | 0.51 | 3.0 |
oltp_read_only | 3.43 | 8.43 | 2.5 |
select_random_points | 0.33 | 0.8 | 2.4 |
select_random_ranges | 0.39 | 0.97 | 2.5 |
table_scan | 34.33 | 54.83 | 1.6 |
types_table_scan | 74.46 | 137.35 | 1.8 |
reads_mean_multiplier | 2.2 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
oltp_delete_insert | 7.98 | 6.91 | 0.9 |
oltp_insert | 3.75 | 3.43 | 0.9 |
oltp_read_write | 8.43 | 16.41 | 1.9 |
oltp_update_index | 3.82 | 3.55 | 0.9 |
oltp_update_non_index | 3.82 | 3.49 | 0.9 |
oltp_write_only | 5.37 | 7.98 | 1.5 |
types_delete_insert | 7.7 | 7.56 | 1.0 |
writes_mean_multiplier | 1.1 |
TPC-C TPS Tests | MySQL | Dolt | Multiple |
---|---|---|---|
tpcc-scale-factor-1 | 101.88 | 22.32 | 4.9 |
tpcc_tps_multiplier | 4.9 |
Overall Mean Multiple | 2.73 |
---|