github dolthub/dolt v2.0.6
2.0.6

5 hours ago

Merged PRs

dolt

  • 11081: Update docs URLs from docs.dolthub.com to dolthub.com/docs
    Update references from docs.dolthub.com to dolthub.com/docs across READMEs and CLI help text.
  • 11060: more cleanup for prollyWriteSession
    This PR moves logic for updating the branch state from prollyTableWriter to prollyWriteSession.
    Additionally, it completely removes the mutex "protecting" prollyWriteSession.workingSet because it is unnecessary; there's no way the same prollyWriteSession is accessed by multiple threads.

go-mysql-server

  • 3558: Unwrap wrapped strings before casting to string during RegexpReplace.Eval
    Fixes #11095
    REGEXP_REPLACE queries on LONGTEXT type columns were panicking because we were casting values to strings without unwrapping them. Note that this doesn't happen with tables created in Dolt 2.0 due to the recent changes to adaptive encoding, but we still need to support tables before then.
    Also moved mockStringWrapper to a shared test util package so it can be used in various tests.
  • 3557: Include CHAR and VARCHAR in IN expression optimization
    A few months ago, I added an optimization to avoid building expensive RangeTrees.
    dolthub/go-mysql-server#3330
    This expands that optimization to include CHAR and VARCHAR column types.
    BINARY, VARBINARY, JSON, GEOMETRY, etc. could be included as well with some more effort.
    Internally, these types are represented as []byte, while CHAR and VARCHAR are string, so they are not of type cmp.Ordered and need a different sorting/comparison function (binary.Compare).
    Locally, this seems to give 8-10% improvement on select ... from ... in (<str1>, <str2>, ...) queries
  • 3556: Fix CHAR_LENGTH and LIKE failing on the replacement character
    The replacement character (Unicode U+FFFD, shown when text gets garbled during encoding conversion) is a normal, valid character. But CHAR_LENGTH would error on it instead of counting it. The fix adds that size check, so the valid character (3 bytes) is accepted while genuinely broken input (1 byte) is still rejected.
    Fix #11088
  • 3555: Lookup table when not specified in DROP INDEX statements
    MySQL requires the owning table for an index be explicitly mentioned when dropping an index, but Postgres does not. This change looks up the owning table for an index when it is not specified. Because MySQL requires the table name to be specified, tests for this functionality are in the Doltgres package (PR dolthub/doltgresql#2747).
  • 3552: Do not allow CASCADE and SET NULL foreign keys on columns that are referenced by STORED generated column expressions
    fixes #11065
    According to the MySQL docs:

    A foreign key constraint on the base column of a stored generated column cannot use CASCADE, SET NULL, or SET DEFAULT as ON UPDATE or ON DELETE referential actions.
    (This is actually not totally true because I was able to create a such foreign key constraint with a SET DEFAULT referential action in MySQL)
    This PR prevents adding such foreign key constraints (with the exception of SET DEFAULT) during CREATE TABLE and ALTER TABLE. Note that in MySQL, the error messages for creating a new table with an invalid foreign key and adding an invalid foreign key to an existing table are different (Cannot add foreign key constraint vs Cannot add foreign key on the base column of stored column.), but I've decided to use the same error message for both cases (Cannot add foreign key on the base column of a stored generated column.).
    CreateTable.CreateForeignKeys was removed and replaced with BaseBuilder.buildCreateTableForeignKeys to avoid a cyclical import.

  • 3550: modify CompareJSON to use sorted object keys
  • 3543: Improve costed index scans for tuples by destructuring tuple operations when possible.
    This is an alternative to dolthub/go-mysql-server#3541. It's a simpler and more targeted change.
    In theory, dolthub/go-mysql-server#3541 lays the groundwork for more general-purpose analysis, since it could be used when tuples are used in additional operators (like inequalities), but it also adds additional complexity.
    I'm not sure which approach is better.

vitess

  • 469: add predicate to indexspec
  • 467: Add ERWarnDeprecatedSyntax 1287
    Blocks #10983

Closed Issues

  • 11095: REGEXP_REPLACE panics on TextStorage values: 'interface conversion: interface {} is *val.TextStorage, not string'
  • 11088: CHAR_LENGTH fails with malformed string on valid UTF-8 replacement character (0xEFBFBD)
  • 11065: Stored generated column stays stale after ON UPDATE CASCADE updates its base column
  • 11070: CALL dolt_gc() left manifest referencing a chunk address not present on disk, rendering DB unopenable (v2.0.3)
  • 11068: conjoin ENOSPC: panic + leftover partial nbs_table_* files cause unrecoverable disk-fill loop under supervised dolt-server

Don't miss a new dolt release

NewReleases is sending notifications on new releases.