github dolthub/dolt v2.1.3
2.1.3

latest release: v2.1.4
9 hours ago

Merged PRs

dolt

  • 11176: go/store/{val,prolly/tree}: Implement ValueContext for the places where we need a Context.
    dolthub/driver directly consumes these values and has the abilityt to pass the correct Context instance.
  • 11172: bug fix for race condition in acquiring auto increment locks
    The global auto increment tracker had a race condition in Next(). In interleaved mode (the default), a necessary table-level lock was not being taken, leading to a non-atomic get-increment-set race between two concurrent sessions. This was due to the lock mode being stored in the struct itself and only set during some code paths. The fix sets the lock mode value at startup.
    The new test reliably reproduced the race condition before this patch.
  • 11170: fix: persist table comment on indexed table creation
    Separate PRIMARY KEY clause routes creation through CreateIndexedTable which never sets schema comment.
    • Thread comment through CreateIndexedTable
      Fix #11163
      Close #11175
  • 11168: add test for ALTER TABLE comment on primary key table
    Fix #11164
  • 11155: support NOT VALID for foreign key and check constraints
    Depends on dolthub/vitess#471 and dolthub/go-mysql-server#3573
  • 11149: Implement IndexNameGenerator interface
    Depends on: dolthub/go-mysql-server#3571
  • 11110: go/go.mod: Bump fslock, adopt fallible fslock.New() and the requirement to Close() the *Lock instance.
  • 11001: Store adaptive-encoded values in lexical order
    In Dolt, all adaptive-encoded values are stored in an arbitrary order according to their raw bytes.
    func compareAdaptiveValue(l, r AdaptiveValue) int {
    return bytes.Compare(l, r)
    }
    This isn't a problem for Dolt, because keys on columns that will be adaptively encoded post 2.0 (TEXT, BLOB) all require a key prefix length, which is used by the secondary index to order the keys correctly.
    But for Doltgres, it's possible to create indexes on TEXT and VARCHAR (no length) columns without a key prefix length. This means that adaptive-encoded values must be stored in a canonical order independent of whether the value is stored inline or out-of-band. Otherwise, various SQL engine optimizations, like removing the Sort operation on an index range scan, would not yield correct results in Doltgres. There are also many other known and unknown assumptions in Dolt and go-mysql-server that break if values in indexed columns are not stored in a consistent order. Additionally, enforcing a canonical order for such columns makes it possible to bring these enhancements to Dolt in the future (by relaxing MySQL's constraints on key lengths), or in new products we might build.
    This PR sorts adaptive encoded values by adding a ValueStore param to the Compare() interface. It is unused except when comparing adaptive values.
    The downside to this change is that we must perform 1 or 2 additional disk reads for each comparison of out-of-band values. This is a large performance penalty but is unavoidable, and should (we think) happen in a small minority of cases.

go-mysql-server

  • 3579: make hashjoin compatible with doltgres
    doltgres has different equality expressions, which prevented hashjoins from getting considered during join planning.
  • 3578: fix: retain table comment when primary key is a separate clause
    CREATE TABLE ... COMMENT='c' dropped the comment when PRIMARY KEY was given as a separate clause.
    • Add a comment parameter to IndexedTableCreator.CreateIndexedTable and thread it through the executor.
      Block #11170
  • 3577: fix: return ok result schema for ALTER TABLE comment
    AlterTableComment yields an OkResult row but reported the table schema, so schema-driven renderers (i.e. Dolt) formatted the OkResult against the first column and failed.
    Block #11168
    Fix #11164
  • 3575: decompose tuple inequalities
    This PR extends the tuple in filter decomposition logic to cover tuples in equallities and inequalities.
  • 3574: Ensure SchemaObjectNameValidator is used when a table is renamed
  • 3573: support NOT VALID on foreign key and check constraints
    Depends on dolthub/vitess#471
  • 3571: Add IndexNameGenerator interface
    New IndexNameGenerator interface allows databases to customize the logic that generates index names when they aren't explicitly specified.
  • 3570: improvements to time to wire format
    Should use apd.Decimal.Append() and faster way to append time strings.
    Benchmarks: #11130 (comment)
  • 3568: bug fix for non-found search paths
  • 3563: Introduce SchemaObjectNameValidator interface
    To support custom Postgresql logic for Doltgres, a new interface called RelationNameValidator is added.

vitess

  • 471: add not valid on fkey and check constraints
  • 470: Expand the set of function call expressions that can be used as a column default value without requiring parentheses.
    These forms are not valid MySQL but are accepted by MariaDB. We should also accept them in order to have better compatibility with schemas created for MariaDB.

Closed Issues

  • 11163: CREATE TABLE ... COMMENT is dropped when PRIMARY KEY is a separate clause
  • 11164: ALTER TABLE ... COMMENT errors with types.OkResult despite persisting change
  • 11141: Git remote cache retains refs/dolt/data history across force-pushed flattened histories

Don't miss a new dolt release

NewReleases is sending notifications on new releases.