This release contains backwards-incompatible changes:
information_schema
tables now contain entries for revision-qualified database names (e.g.mydb/mybranch
) if any are active in the current session. There is always an entry for the base database name (mydb
) as well. This also applies to statements such asshow databases
.
In line with Dolt's version policy, this release is therefore a minor version increment (major.minor.patch)
Merged PRs
dolt
- 6210: Revert "Add
dolt_schema_diff
table function"
Reverts #6185
Change 6185 was merged in ahead of approval. - 6204: sqle: cluster: Add dolt_cluster_transition_to_standby stored procedure.
This new stored procedure can be used to gracefully transition a primary to a standby while not all replicas in the cluster are up and able to become current. In contrast todolt_assume_cluster_role
, this stored procedure can only transition to rolestandby
, but takes a second integer parameter representing the number of replica servers in the cluster which must be made current in order for the transition to succeed. - 6191: Use a table's
workingRoot
when getting declared FKs.
Fixes #6178 - 6190: Ignore the sql-server.lock file if the PID in the file matches current dolt process
#6183
Regarding automated testing: This is an awkward one because we don't know what PID a process will be given. I tested locally with a docker images I hand crafted, but otherwise I'm going to punt on testing this in CI. - 6188: Reverting changes to database name management: branch-qualified databases now included in info_schema tables
Fixes #6173 - 6185: Add
dolt_schema_diff
table function
dolt_schema_diff
will return the schema diffs between refs and optionally will filter those changes to a specific table.
This is a new table function that provides us with the information we need fordolt diff
. - 6162: Savepoint operations now support multiple databases in a transaction
- 6138: update dolt commit to use sql queries
This change updatesdolt commit
to use the appropriate sql engine to generate results.
Related: #3922 - 6128: Migrate
dolt branch
to new CLI framework.
This PR migratesdolt branch
to invoke SQL commands instead of manipulating the database directly. This allows it to work even on remote connections.
The only thing that hasn't been migrated yet isdolt branch --datasets
. It's not a documented flag. We're currently using it for an internal test and can migrate it if we can figure out a way to rewrite the test.
go-mysql-server
- 1846: update
information_schema.processlist
to correctly display status of processes and databases
We used to hardcode"Query"
, now we referenceprocess.Command
Additionally, we now get the database from the current session and use that variable.
fix for: #6023 - 1844: fix panic for group by binary type
We made a bad type assertion forsql.StringType
.
Additionally, this fixes a issue whereUnaryExpressions
withGetFields
would incorrectly throw a functional dependency error withONLY_FULL_GROUP_BY
enabled.
Fix for second part of: #6179 - 1841: adding
version
andversion_comment
values
@@version
now returns8.0.11
@@version_comment
now returns "Dolt"; in mysql, this appears to be dependent on OS / method of install- Some people get
MySQL Community Server - GPL
- Others get
Homebrew
Fix for first part of: #6179
- Some people get
- 1840: deduplicate (hash) intuple for and queries
This PR was originally supposed to fix it: original fix: dolthub/go-mysql-server#1677, butAND
statements weren't covered.
fix for: #6189 - 1838: resolve aliases in subqueries in function arguments
The rulereorderProjection
also replaces subqueries with getfields in projections when they are used by subqueries, but it did not check for function expressions.
This meant that aliases in subqueries as arguments to functions threw a"x" could not be found
error.
This PR just has the section ofreorderProjection
that is supposed to find deferredColumns also look at the arguments of functions recursively (because we can nest functions).
Additionally, there was another schema type bug:MySQL returns an Integer type for if statement, and if either argument is a String, it always returns a String.tmp> select 0 as foo, if((select foo), 123, 456); +-----+----------------------------+ | foo | if((select foo), 123, 456) | +-----+----------------------------+ | 0 | 127 | +-----+----------------------------+ 1 row in set (0.00 sec)
fix for: #6174 - 1836: update cached table count in prepared statements
Prepared statements were caching table counts. We need to update the table count when finalizing prepared statements to bring table count up to date with any intermediate edits. - 1834: fix expected schema for
sum(literal)
The code path we take when print rows to shell is different than spooling from server.
In the sql case, we ignore the schema we get from analysis.
In the server case, we actually read the schema, and ensure that the rows are of that type.
When doingsum(literal)
, we use the type of the literal. In this issue, the literal was1
, so anINT8
, which caps out at127
.
sum()
is always supposed to return a float64, so I made a change to do that.
I checked by starting mysql with--column-type-info
option, and it does appear that any columns coming fromsum()
has aDECIMAL
type.
Fix for: #6120 - 1827: Remove db-specific transaction interfaces / logic
vitess
- 251: Fixed missing support for collations as strings
Fixes issue #6192
We only allowed collations to be declared after theCREATE TABLE
portion in their non-string form. This adds support for the string form. - 249: Various small parser improvements
Various small parser improvements:- Allow column definitions to use the MySQL
INVISIBLE
keyword. The implementation still ignores theINVISIBLE
keyword, but it will no longer cause a parser error. - Support
DOUBLE
andFLOAT
in theCAST
andCONVERT
functions. - Allow a trigger body to be a single
CALL
statement.
- Allow column definitions to use the MySQL
- 248: Support for index hint in foreign key definition
- 247: Support FK definitions inline in column definitions
Adds support for declaring FK references inline in column definitions. Does not supportON DELETE
andON UPDATE
yet. Example:ALTER TABLE t ADD COLUMN col2 int REFERENCES other_table(id);
Also cleaned up a few rules around non-reserved keywords to enableevent
to be used unquoted inALTER TABLE
statements.
Closed Issues
- 6178: "SHOW CREATE TABLE foo AS OF 'bar'" shows incorrect constraints
- 6095: Allow conflict resolving for dolt_cherry_pick()
- 6192: Dolt does not allow strings as collate name
- 6179: Phpmyadmin crashes Dolt
- 6174: Unable to resolve alias in subquery in projection
- 6189: Incorrect query results for
GROUP BY
- 6173: list branch-qualified databases in information_schema
- 6120:
select count(1) from <table>
does not return 1 - 6181: Commit/push via stored procedure is unreliable
- 6157:
select count(*) from <table>
confusingly slow for some users - 1800: Extracting update query columns
Latency
Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 1.96 | 2.71 | 1.4 |
groupby_scan | 12.3 | 17.01 | 1.4 |
index_join | 1.16 | 4.49 | 3.9 |
index_join_scan | 1.12 | 2.18 | 1.9 |
index_scan | 30.81 | 55.82 | 1.8 |
oltp_point_select | 0.14 | 0.46 | 3.3 |
oltp_read_only | 2.86 | 7.98 | 2.8 |
select_random_points | 0.29 | 0.75 | 2.6 |
select_random_ranges | 0.35 | 1.06 | 3.0 |
table_scan | 30.81 | 55.82 | 1.8 |
types_table_scan | 69.29 | 158.63 | 2.3 |
reads_mean_multiplier | 2.4 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
bulk_insert | 0.001 | 0.001 | 1.0 |
oltp_delete_insert | 5.47 | 6.32 | 1.2 |
oltp_insert | 2.81 | 3.13 | 1.1 |
oltp_read_write | 6.67 | 15.55 | 2.3 |
oltp_update_index | 2.76 | 3.25 | 1.2 |
oltp_update_non_index | 2.86 | 3.19 | 1.1 |
oltp_write_only | 3.96 | 7.7 | 1.9 |
types_delete_insert | 5.99 | 7.04 | 1.2 |
writes_mean_multiplier | 1.4 |
Overall Mean Multiple | 2.0 |
---|