Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Created by
brew bump
Created with
brew bump-formula-pr
.release notes
…7966)"
This reverts commit 6ae4251c9d85916c83a95291282d5ebd5ff4089a.
Two primary issues addressed in the
dolt admin archive
command:restore
subcommand indolt_backup()
The
dolt_backup()
stored procedure now supports therestore
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 therestore
subcommand currently requires root/superuser access to execute, since it can change database state (particular when the--force
argument is used).Example usage to create a database named
db1
from a backup on disk:Fixes Support
CALL DOLT_RESTORE()
and support a-f
force option dolthub/dolt#6074TEMPORARY TABLE
tags the same as normalTABLE
sThis PR fixes this particular collision and makes collisions with other temporary tables more unlikely, probably, by using the deterministic random number generator used for generating tags for normal persisting tables.
fixes Creating temporary tables can cause tag collisions dolthub/dolt#7995
auto_increment
on temporary tablesfixes Temporary tables don't support AUTO_INCREMENT dolthub/dolt#7972
Index range iteration uses a callback that is arbitrarily flexible but expensive. I changed index table access to only perform partial index scans for complete prefixes, and when the prefix fields equality conditions the generality of the index range callback is overkill. We just need to scan from the partial key
(field1, ..., fieldn, nil, ...)
to one higher than the partial key(field1, fieldn+1, nil, ...)
.This PR differentiates between
RangeField.StrictKey
and.Equal
attributes to differentiate max-1-row and an equality restriction.Still need to do follow-up tracing, but this is in response to the queries from TPC-C below. The string ones are much more common. Each of these use a set of equality filters than only partially completes a secondary index prefix. All of them spend ~5ms of CPU time executing
Range.Matches
, which is mostly eliminated with this PR.Initial support for Dolt to stream binlog events to a MySQL replica.
In this initial iteration, binlog events are streamed directly to connected replicas, instead of being written to a log file first. This enables customers to test out the initial binlog replication support, but it means that replicas will only receive the events that happen while they are connected, since they are not persisted in a log file yet. The next iteration will persist binlog events to a log file and will enable replicas to receive events that happened while they were not connected.
To enable binlog replication, you must persisted the system variables below. Similar to Dolt's other replication formats, the Dolt server must come up with the replication system variables set in order for replication to be enabled. You cannot set these system variables on a running Dolt sql-server to turn on binlog replication – you must persist the values and then restart the sql-server.
IndexedJsonDocument
, aJSONWrapper
implementation that stores JSON documents in a prolly tree with probabilistic hashing.tl;dr: We store a JSON document in a prolly tree, where the leaf nodes of the tree are blob nodes with each contain a fragment of the document, and the intermediate nodes are address map nodes, where the keys describe a JSONPath.
The new logic for reading and writing JSON documents is cleanly separated into the following files:
IndexedJsonDocument - The new
JSONWrapper
implementation. It holds the root hash of the prolly tree.JsonChunker - A wrapper around a regular chunker. Used to write new JSON documents or apply edits to existing documents.
JsonCursor - A wrapper around a regular cursor, with added functionality allowing callers to seek to a specific location in the document.
JsonScanner - A custom JSON parser that tracks that current JSONPath.
JsonLocation - A custom representation of a JSON path suitable for use as a prolly tree key.
Each added file has additional documentation with more details about the individual components.
Throughout every iteration of this project, the core idea has always been to represent a JSON document as a mapping from JSONPath locations to the values stored at those locations, then we could store that map in a prolly tree and get all the benefits that we currently get from storing tables in prolly trees: fast diffing and merging, fast point lookups and mutations, etc.
This goal has three major challenges:
This design achieves all three of these requirements:
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.)go-mysql-server
fixes Parenthesised table references in JOIN clauses cause syntax errors if not followed by nested JOINs dolthub/dolt#8009
Aborted_connects
status variableAdds support for MySQL's
Aborted_connects
status variable.Depends on: Add
ConnectionAborted()
callback toHandler
interface dolthub/vitess#351This ensures we match MySQL.
We previously weren't calling StringifyJSON in
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.By adding an extra case to
StringType.SQL
we can distinguish between these cases and handle them properly.This was somewhat of a regression caused by projection schema finds default values dolthub/go-mysql-server#2465.
However, before that PR views always had
NULL
as their default values, which did not match MySQL.Now, we just resolve the default values in the schema, similar to
ResolvedTables
.fixes
error: plan is not resolved because of node '*plan.ShowColumns'
when executingSHOW FULL COLUMNS
orDESCRIBE
for specific views dolthub/dolt#7997UPDATE IGNORE ... JOIN
fixes: UPDATE IGNORE ... JOIN queries fail with "failed to apply rowHandler" error dolthub/dolt#7986
INSERT ... VALUES (...) AS new_tbl ON DUPLICATE x = new_tbl.x
)When inserting values, the user can specify names for both the source table and columns which are used in
ON DUPLICATE
expressions. It looks like either of the below options:Previously, we would implement references to the inserted values by using a special table named "__new_ins". I implemented this by keeping that as the default, but using the row alias instead of one was provided. We then create a map from the destination table names to column aliases, and use that map to rewrite expressions that appear inside the VALUES() function.
vitess
This PR allows the use of backticks in system and user variables.
We are more lenient than MySQL when it comes to backticks in set statements.
For example, we allow
set @abc.
def= 10
, while MySQL throws an error.This is because we treat this as a qualified column identifer and automatically strip the backticks.
test bump test bump dolthub/go-mysql-server#2548
fixes Backtick escaping doesn't work for variables dolthub/dolt#8010
CONSTRAINT
keyword when adding a foreign key without a constraint nameCustomer issue: ADD CONSTRAINT FOREIGN KEY causes syntax error in Dolt dolthub/dolt#8008
ConnectionAborted()
callback toHandler
interfaceIn order to support the
Aborted_connects
status variable, GMS needs to be notified when a connection attempt is aborted in the Vitess layer. This change adds aConnectionAborted()
callback method to Vitess'Handler
interface and calls it whenever a connection attempt errors out before it's fully established.Coordinated with Add support for tracking the
Aborted_connects
status variable dolthub/go-mysql-server#2546BinlogStream
type intoBinlogMetadata
The
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.Closed Issues
CALL DOLT_RESTORE()
and support a-f
force optionerror: plan is not resolved because of node '*plan.ShowColumns'
when executingSHOW FULL COLUMNS
orDESCRIBE
for specific viewsdolt pull
fails in the presence of ignored tables