Merged PRs
dolt
- 4958: go/commands: added verbose mode to filter-branch
go-mysql-server
- 1464: clean up on current information schema
Updatedinformation_schema
tables' schemas.
Fixed some table values for the schema changes - 1463: fix sq finalize ordering bug
Transform table + filter into table lookup in a subquery expression should happen infinalizeSubquery
, not inresolveSubquery
. Otherwise we will push a filter with a GetField index that could be rearranged when the parent scope is finalized. - 1462: sqa finalize self before child recursion bug
We must finalize a subquery [/ expression]'s scope before finalizing any child subquery [/expression]. Otherwise, the child may reference invalid parent scope indexes that are not fixed until the parent is finalized. - 1461: Implemented LOOP, LEAVE, and ITERATE, partially implemented DECLARE ... HANDLER
This needs many, many, many more tests. Also should rewrite how stored procedures are analyzed as well, but that's a larger project overall. - 1459: Bug fixes for
CrossJoin
scope visibility and disposing mem caches forIndexedInSubqueryFilter
crossJoinIter
was the only join iterator that wasn't taking in aparentRow
with outer scope values and passing that row prefix to its children. There's some low-hanging fruit to refactor thejoinIter
s to reduce duplication, but it didn't seem high priority, so I stopped short of that. Fixes: #4926
While testing that, I also hit a bug with a mem cache not being released byIndexedInSubqueryFilter
and included that fix here. There were also somedispose
member andDispose
functions in the join iterators that I verified were not used anywhere, so I pulled those out to tidy up.
Dolt CI Tests: #4947 - 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 | +---+--------+
vitess
- 205: Added LOOP, LEAVE, and ITERATE
Finding a workaround to allow:
to parse resulted in the changes you see intoken.go
. There may be a better way to go about it, but I don't want to spend more time on it since this appears to work. - 204: adding parser support for show databases like and where
partial fix for: #4484
Closed Issues
- 4926: GetField error for query with recursive CTE
Latency
Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 2.03 | 2.91 | 1.4 |
groupby_scan | 12.98 | 17.95 | 1.4 |
index_join | 1.27 | 4.91 | 3.9 |
index_join_scan | 1.21 | 4.18 | 3.5 |
index_scan | 32.53 | 59.99 | 1.8 |
oltp_point_select | 0.16 | 0.53 | 3.3 |
oltp_read_only | 3.13 | 9.39 | 3.0 |
select_random_points | 0.32 | 0.83 | 2.6 |
select_random_ranges | 0.37 | 1.23 | 3.3 |
table_scan | 32.53 | 66.84 | 2.1 |
types_table_scan | 74.46 | 207.82 | 2.8 |
reads_mean_multiplier | 2.6 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
bulk_insert | 0.001 | 0.001 | 1.0 |
oltp_delete_insert | 2.97 | 11.04 | 3.7 |
oltp_insert | 1.42 | 3.07 | 2.2 |
oltp_read_write | 5.47 | 17.63 | 3.2 |
oltp_update_index | 1.52 | 4.91 | 3.2 |
oltp_update_non_index | 1.47 | 5.28 | 3.6 |
oltp_write_only | 2.35 | 8.74 | 3.7 |
types_delete_insert | 3.07 | 11.24 | 3.7 |
writes_mean_multiplier | 3.0 |
Overall Mean Multiple | 2.8 |
---|