Merged PRs
dolt
- 4948: go/cmd/dolt: sqlserver: yaml_config.go: Make some structs public to better support programmatic config generation.
- 4940: go/cmd/commands: added
--datasets
flag todolt branch
to list all dat…
…asets - 4939: ambyii's escape commit tag
re: #4920 - 4937: support
push.autoSetupRemote
config variable - 4929: Adds skipped bats for silent merge failures
5 skipped bats showing how merge silently fails today.
After this PR, next steps is to throw an error if we are three-way merging these kinds of schema changes. Still thinking about how to detect these issues and fail-fast. - 4924: found another minor bug in results.go
Found the same kind of bug as before this time in results.go. I changed the comparison to be correct as before.
Question about line 36. We are requiring exact order and not just content, is that correct or should we sort the args before comparing them? - 4923: found minor bug in validate.go
In validate.go I found a small bug where there is a comparison on the same object (len(new) != len(new)). I assume this was meant to compare len(new) with len(old) so I fixed that here. - 4913: Remove
GetGCKeepers
- 4911: go/cmd/dolt/commands/sqlserver: Allow a server in a cluster to configure which address it listens on for replication traffic.
- 4907: Added bats tests for dolt_branch(-c...)
go-mysql-server
- 1458: Reorder joins before finalizing subqueries
We cannot set field indexes for subquery expressions until the parent scope has been finalized.
The query that surfaced this bug was a subquery expression with a dependency on a join child, whose order is rearranged after we finalize subquery. Ex: the query below swaps the schema from under the subquery expression; y and is_one should match, but we reorder the join for a lookup, changing the scope schema from [xy,uv] -> [uv,xy]. The subquery expression now selects the wrong column for comparison:We select the correct field now when the subquery is finalized after the parent scope is fixed:> select y, (select 1 where y = 1) is_one from xy join uv on x = v order by y; +---+--------+ | y | is_one | +---+--------+ | 0 | 1 | | 0 | 1 | | 1 | NULL | | 1 | NULL | +---+--------+
> select y, (select 1 where y = 1) is_one from xy join uv on x = v order by y; +---+--------+ | y | is_one | +---+--------+ | 0 | NULL | | 0 | NULL | | 1 | 1 | | 1 | 1 | +---+--------+
- 1457: simplify
LIKE
expressions to take advantage of indexes
I needed this for my blog :)
It might give performance benefits 🤷
CertainLIKE
expressions over string columns should take advantage of prefix indexes.
TODO: there are a few more optimization we could make, but they'd take a bit more effort (I'd also need to confirm that MySQL does them as well). - 1456: writing tests with non-determinism
- 1455: fix incorrect result from arithmetic ops
The result of the queryselect 2000.0 / 250000000.0 * (24.0 * 6.0 * 6.25 * 10.0);
is fixed, but the decimal scale is incorrect (made issue for it) - 1454: enforce test ordering
- 1452: Order the test results.
This fixes the currently-failing dolt tests: https://github.com/dolthub/dolt/actions/runs/3622688428/jobs/6107705037 - 1451: fix visibility for on duplicate key update with cte
fix for: #4562
adding a special case in analyzer wheninsert.Source
is a*plan.With
. - 1450: If a window does not have "ORDER BY" specified, use a default frame.
If a window does not have "ORDER BY" specified, use a default frame.
This fixes dolthub/go-mysql-server#1449 - 1447: Disambiguate aggregation expressions
Disambiguate aggregation expressions so different columns with same sources don't end up clobbering each other.
Fixes #4140 - 1445: fix type handling for derived table columns
derived table column is now created from the most permissive type and the values are casted into that type at Eval.
have skipped Prepared test as sort field type does not match non-prepared execution. - 1440: Implemented DECLARE support for variables and cursors
This adds support forDECLARE
variables and cursors. I implemented nesting support by giving all variables a procedure-unique ID, with the scope determining which ID is resolved. A flat slice of IDs are far simpler to track than a proper tree structure.
I did skip one test for GMS, as aRowIter
reads the current state of the table, rather than the state that theRowIter
generated with. - 1437: add
any_value()
and option to enforce strict group by
Added support for another option in@@sql_mode
calledONLY_FULL_GROUP_BY
, which makes it so select statements over group by must contain columns that are part of the group by. Before, dolt was always strict about group by selects, now (to match MySQL) we are not strict by default.
Additionally, there is now support for the "aggregate" functionany_value()
which bypasses theONLY_FULL_GROUP_BY
if it is set.
Also, changesGetGlobalVariable
andGetSessionVariable
to convertsql.SetTypes
to strings.
MySQL docs for reference:any_value()
: https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functions.htmlONLY_FULL_GROUP_BY
: https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_only_full_group_by
fix for: #1448
and: #4604
Closed Issues
- 4919: Percent symbol (%) in commit strings is interpreted a format placeholder
- 3631: Command Line working sets become a working set for every branch after starting a server
- 4792: Add the git config variable to always set the upstream on push
- 1448: Support for selecting non-aggregate expressions that don't appear in GROUP BY clause
- 4604: Support for
any_value
- 4562:
on duplicate key
clause missing visibility into tables in subqueries and ctes - 4298: DISTINCT returns incorrect result for decimal types
- 4140: Result from first window function reused by other window functions
- 1449: Windows without ORDER BY return wrong results
Latency
Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 2.03 | 2.91 | 1.4 |
groupby_scan | 12.75 | 18.28 | 1.4 |
index_join | 1.25 | 5.0 | 4.0 |
index_join_scan | 1.21 | 4.25 | 3.5 |
index_scan | 32.53 | 59.99 | 1.8 |
oltp_point_select | 0.16 | 0.53 | 3.3 |
oltp_read_only | 3.07 | 9.22 | 3.0 |
select_random_points | 0.32 | 0.84 | 2.6 |
select_random_ranges | 0.37 | 1.23 | 3.3 |
table_scan | 32.53 | 66.84 | 2.1 |
types_table_scan | 75.82 | 204.11 | 2.7 |
reads_mean_multiplier | 2.6 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
bulk_insert | 0.001 | 0.001 | 1.0 |
oltp_delete_insert | 3.13 | 10.84 | 3.5 |
oltp_insert | 1.52 | 3.07 | 2.0 |
oltp_read_write | 5.67 | 18.28 | 3.2 |
oltp_update_index | 1.7 | 5.0 | 2.9 |
oltp_update_non_index | 1.7 | 5.18 | 3.0 |
oltp_write_only | 2.57 | 8.74 | 3.4 |
types_delete_insert | 3.36 | 11.04 | 3.3 |
writes_mean_multiplier | 2.8 |
Overall Mean Multiple | 2.7 |
---|