Merged PRs
dolt
- 9236: go: sqle/statspro: prollyStats: FlushFromMem: Fix long-held lock when flushing stats to disk.
For sql-server instances with many databases, many branches or many tables and indexes, flushing stats could cause queries to block until stats were finished flushing. StatsController attempted to rate limited how much I/O bandwidth would be used to flush stats, but this is currently counter-productive because all queries are blocked from analyzing successfully until stats are flushed.
This changes it back to flush stats to disk as quickly as possible when we need to do it. Computing stats is already rate limited, so for large flushes this should not happen too often.
We will continue to improve things here so that stats writes have less impact on server resource utilization and do not block user-facing work as they proceed. - 9229: When performing a three-way merge, Use a patchBuffer to build the new primary index instead of a MutableMap.
MutableMaps are designed for caching point modifications to a table. But during merge, the new primary index is computed sequentially. There's no benefit to using a MutableMap here.
MutableMaps are built on top of theApplyMutations
function, which takes a sequential stream of modifications (called a PatchBuffer) and applies them to a chunker. This has the added benefit of being parallelizable: the patches are produced in one goroutine and consumed in another.
Instead of using the MutableMap, we can extract the underlying PatchBuffer and use it directly. This should be both more performant, and more correct as it avoids a failure case with schema merges where the MutableMap flushes changes to disk and writes a chunk containing rows with different schemas. - 9215: go/store/nbs: table_index.go: Fix uint32 overflow in findPrefix when working with large table files.
go-mysql-server
- 2985: fix default value for non null enum columns
In MySQL non null enum columns default to the very first enum instead of throwing a missing default error.
fixes: #8617 - 2983: fix explain plan on server engine
fixes: #8882 - 2982: Bug fix: use ExtendedType serialization if present
The grouping key wasn't getting created correctly for DoltgresTypes, since they implementsql.StringType
, but aren't supported in GMS'types.ConvertToString
function. Tests for grouping with DoltgresTypes added in Doltgres. - 2979: fix indexing for
GROUP BY
s andWINDOW
s inINSERT
andREPLACE
statements inTRIGGERS
Using aggregation and window functions inside a select statement inside an insert source inside a trigger was causing problems. For example, a trigger defined like so:
The issue involved thecreate trigger trig before insert on t1 for each row begin insert into t2 select max(id), first_value(id) over (partition by id order by id), ... from t3; end;
Projections
over theGroup By
s. The scope for thegroup by
s already contained the trigger's columns and are indexed uniquely, so we shouldn't include the trigger/parent scope.
Closed Issues
- 8617: INSERT to ENUM column with NOT NULL errors
- 8882: Error in
DESCRIBE PLAN SELECT COUNT(*) FROM table
on running server - 5317: dolt FixedWidthTableWriter panic when calling stored proc
- 5530:
PREPARE
/EXECUTE
in stored procedures is buggy - 7068: first
call
of a stored procedure that uses session user variable always return NULL - 9213: Connection concurrency issues with DDL
Performance
Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 1.86 | 0.67 | 0.36 |
groupby_scan | 13.46 | 17.95 | 1.33 |
index_join | 1.47 | 2.35 | 1.6 |
index_join_scan | 1.42 | 1.44 | 1.01 |
index_scan | 34.33 | 30.81 | 0.9 |
oltp_point_select | 0.18 | 0.26 | 1.44 |
oltp_read_only | 3.43 | 5.18 | 1.51 |
select_random_points | 0.33 | 0.6 | 1.82 |
select_random_ranges | 0.36 | 0.62 | 1.72 |
table_scan | 34.95 | 32.53 | 0.93 |
types_table_scan | 75.82 | 127.81 | 1.69 |
reads_mean_multiplier | 1.3 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
oltp_delete_insert | 8.9 | 6.32 | 0.71 |
oltp_insert | 4.1 | 3.07 | 0.75 |
oltp_read_write | 8.9 | 11.45 | 1.29 |
oltp_update_index | 4.18 | 3.19 | 0.76 |
oltp_update_non_index | 4.18 | 3.07 | 0.73 |
oltp_write_only | 5.67 | 6.32 | 1.11 |
types_delete_insert | 8.28 | 6.67 | 0.81 |
writes_mean_multiplier | 0.88 |
TPC-C TPS Tests | MySQL | Dolt | Multiple |
---|---|---|---|
tpcc-scale-factor-1 | 98.1 | 40.36 | 2.43 |
tpcc_tps_multiplier | 2.43 |
Overall Mean Multiple | 1.54 |
---|