Merged PRs
dolt
- 6595: Feature: Allow
*
wildcard in@@dolt_replicate_heads
This change allows customers to use*
as a wildcard in the@@dolt_replicate_heads
system variable to match zero or more characters in a branch name. For example, to replicate themain
branch and all branches that start withfeature
, the following configuration can now be applied:
Documentation: dolthub/docs#1698dolt config --local --add sqlserver.global.dolt_replicate_heads main,feature*
Fixes: #6486 - 6562: Bug fix: Building secondary prefix indexes from existing data
When building a secondary index from existing table data and the secondary index contains a prefix of a TEXT/BLOB column, we don't currently dereference the TEXT/BLOB pointer to get the content. Instead, we take the TEXT/BLOB pointer address and incorrectly put that into the secondary index. This manifested as errors in collation sorting, since one string was not a valid, encoded string and was instead a pointer address. Additionally, we weren't applying the prefix to the content for any existing data when building a prefix index – i.e. any VARCHAR data was inserted in full to the prefix index without trimming.
It's difficult to test indexes directly, so I updated the index validation code in our test suite to support validating prefix indexes. I added some more tests for prefix indexes in GMS, too: dolthub/go-mysql-server#1971
Fixes #6520 - 6517: Automatically merge schema changes that widen
VARCHAR
fields toTEXT
This enhancement allows more schema changes to merge cleanly (instead of being reported as a schema conflict) when we can determine that a type is being widened and all existing data is guaranteed to be safe to convert. This includes:VARCHAR
→TINYTEXT
,TEXT
,MEDIUMTEXT
,LONGTEXT
CHAR
→TINYTEXT
,TEXT
,MEDIUMTEXT
,LONGTEXT
BINARY
→TINYBLOB
,BLOB
,MEDIUMBLOB
,LONGBLOB
VARBINARY
→TINYBLOB
,BLOB
,MEDIUMBLOB
,LONGBLOB
Trying to merge a change to aVARCHAR
column larger than 255 characters to make it aTINYTEXT
column will still generate a schema conflict, sinceTINYTEXT
has a maximum size of 255 characters.
One of the more interesting conversions is converting toVARBINARY(N)
orTINYTEXT
toBINARY(N)
. MySQL right-pads allBINARY(N)
values with null bytes, up toN
, which requires us to callType.Convert
as part of remapping values in a schema merge, and also to rebuild secondary indexes in some cases.
Fixes: #6442
go-mysql-server
- 1978: Fix table lookup bug for nil asOf
Edit: Show keys for info schema table should work the same way as MySQL now.
Prev: This error message is not correct, MySQL finds the table and does not error. But this at least reverts the behavior to what Dolt did before the name resolution refactors. - 1976: Refactor prepareds to cache AST
Prepared statements were rewritten recently to cache a query string
with marked bind variable locations. Executing prepared statements
would generate a full SQL query string for re-parsing, binding, and
analysis. This update caches the AST. Executing a prepared statement
starts at binding an AST. Bind variables will be substituted in the
process of converting AST expression to plan expressions.
GMS bump: #6593 - 1975: Union NULL types cast to same type as neighbor
3+-way unions are subject to a bug where a NULL projection will be cast to a char type, and then have a type clash with the subsequent table relation. Rearranging the query to have the NULL projection last appears to fix the bug because theconvert
cast is moved to a position where it cannot have a type clash with a table relation to the right. - 1974: Re-implement generated stored columns with new analyzer
Testing revealed a bug in explicit DEFAULT values in insert statements, added a skipped test for same.
Also rewrote column default tests as scripts. - 1945: server: Add a warning message at startup if the server is run without secure_file_priv being set to a non-empty value.
Closed Issues
- 6442: Automatically merge changes that enlarge varchar fields to text types
- 6486: Allow pattern-matching in replicate_heads variable
- 6497:
LAST_INSERT_ID()
always returns0
- 6520: Panic when inserting into prefix index on
TEXT
column - 6462: go.mod causes go install to fail (must not contain directives ... interpreted differently than if it were the main module)
- 6224: When executing a query in SQL, the error message is unrelated to the SQL statement.
Latency
Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 2.07 | 2.86 | 1.4 |
groupby_scan | 12.98 | 17.95 | 1.4 |
index_join | 1.27 | 4.74 | 3.7 |
index_join_scan | 1.21 | 2.26 | 1.9 |
index_scan | 32.53 | 59.99 | 1.8 |
oltp_point_select | 0.14 | 0.4 | 2.9 |
oltp_read_only | 2.71 | 7.3 | 2.7 |
select_random_points | 0.31 | 0.72 | 2.3 |
select_random_ranges | 0.37 | 1.03 | 2.8 |
table_scan | 33.12 | 59.99 | 1.8 |
types_table_scan | 74.46 | 173.58 | 2.3 |
reads_mean_multiplier | 2.3 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
bulk_insert | 0.001 | 0.001 | 1.0 |
oltp_delete_insert | 4.65 | 5.57 | 1.2 |
oltp_insert | 2.18 | 2.71 | 1.2 |
oltp_read_write | 6.09 | 14.21 | 2.3 |
oltp_update_index | 2.3 | 2.81 | 1.2 |
oltp_update_non_index | 2.35 | 2.81 | 1.2 |
oltp_write_only | 3.25 | 7.04 | 2.2 |
types_delete_insert | 4.65 | 5.88 | 1.3 |
writes_mean_multiplier | 1.5 |
Overall Mean Multiple | 1.9 |
---|