Merged PRs
dolt
-
7122: Add support for -B flag to dolt_checkout
Resolves Issue: #7116
-
7105: Add of out date warning to
dolt version
Adds anout of date
warning todolt version
if not using the latest release.
Also adds docs and help text fordolt version
.
Resolves: #3417
go-mysql-server
- 2189: Upgraded xxhash to v2
- 2187: fix
round()
handling of scale, precision, and nulls
This PR hasROUND()
behavior match MySQL more closely specifically when handling NULLs.
Additionally, it refactors the function to no longer use custom logic, and rely ondecimal.Decimal
library for conversions.
The slowness from the original issues stems from themath.Pow()
function that is attempting to raise precision to some huge negative number. This PR solves that problem by constraining the precision values to ourDecimalMaxScale
(30).
A better constraint would be-308
since that's the max scale of a float supported by MySQL. However, we don't go nearly as far. If we knew the scale of the passed in value we could also constrain the precision that way.
This PR also rewrites theROUND()
unit tests to be structured like other unit tests for functions, and fixes their handling of null arguments.
fixes: #7073 - 2182: fix IN_SUBQUERY projection bugs
Correctness regression fix. With a bit more work this could probably be a smaller query:The CREATE panicked because the top-level projections get pushed into the source node, and my recent refactors failed to map projections onto the reported table output column sets.CREATE VIEW view_2_tab1_157 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 IN (SELECT col3 FROM tab1 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75);
- 2178: Improve handling of
charset
andcollate
in column options.
dolthub/vitess#293 should be merged before this.
This PR does two main things:Parse and validate the
Currently thecollate
option, even on binary columns.collate
option is ignored on columns of binary type, an we just assume binary collation because it's the only one allowed. This is usually correct but causes some problems.
CREATE TABLE t (pk varbinary(10) collate utf8mb4_0900_bin);
shouldn't parse, because it's attempting to use an illege collation for columnpk
. However, we currently ignore the option and parse it anyway.
CREATE TABLE t (pk varbinary(10)) collate utf8mb4_0900_bin;
on the other hand, needs to succeed. Binary columns do not inherit the default collation of the table.Reject the charset option except on columns that allow it.
According to MySQL, only text, sets, and enums are allowed to have character sets. Attempting to specify a character set for any other column type is an error. Before this PR, we were simply ignoring the character set where it didn't make sense.
A good way to think of it is thatvarbinary
is like a shorthand forvarchar charset binary
. In fact, you're even allowed to writeCREATE TABLE t (pk varchar(10) collate binary);
and MySQL will generate avarbinary(10)
column. Since the column already has a specified char set, it doesn't default to the table charset/collation. And you can't supply an explicit charset to the column because it already has one implicitly.
vitess
- 294: Allow SqlType to parse "CHARACTER" and add tests for every other possible type that could be passed in.
SqlType is a function in Vitess for normalizing every type name. It was missing an entry for the "CHARACTER" keyword.
I added tests that should verify every single valid type keyword in the grammar, so this shouldn't happen again. - 293: Add additional types to sqlparser.SQLType()
This function is used when the parser needs to map type names to underlying types in order to judge the validity of certain queries. Some types are aliases for others, (like REAL is an alias for float64) but they weren't included inSQLType()
, so certain expressions that used these types could panic. - 292: Parse COLLATE BINARY on individual columns.
We should be able to parse statements like:
create table test (pk varchar(255) collate binary)
This particular example will eventually get rewritten ascreate table test (pk varbinary(255))
, but that doesn't happen during parsing, so the added vitess tests still expectvarchar
. - 291: round trip SHOW PLUGINS
Closed Issues
- 3417: dolt version should tell me when I'm out of date
- 7121: dolt init freezes under windows with 1.29.0
Latency
Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 2.11 | 2.86 | 1.4 |
groupby_scan | 12.98 | 17.32 | 1.3 |
index_join | 1.32 | 5.0 | 3.8 |
index_join_scan | 1.25 | 2.18 | 1.7 |
index_scan | 34.33 | 55.82 | 1.6 |
oltp_point_select | 0.17 | 0.43 | 2.5 |
oltp_read_only | 3.3 | 7.7 | 2.3 |
select_random_points | 0.32 | 0.72 | 2.2 |
select_random_ranges | 0.38 | 0.87 | 2.3 |
table_scan | 34.33 | 55.82 | 1.6 |
types_table_scan | 77.19 | 158.63 | 2.1 |
reads_mean_multiplier | 2.1 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
oltp_delete_insert | 5.57 | 5.99 | 1.1 |
oltp_insert | 2.81 | 2.91 | 1.0 |
oltp_read_write | 7.3 | 14.73 | 2.0 |
oltp_update_index | 2.86 | 3.02 | 1.1 |
oltp_update_non_index | 2.97 | 3.02 | 1.0 |
oltp_write_only | 4.1 | 7.17 | 1.7 |
types_delete_insert | 5.47 | 6.55 | 1.2 |
writes_mean_multiplier | 1.3 |
Overall Mean Multiple | 1.7 |
---|