github dolthub/dolt v2.1.0
2.1.0

2 hours ago

This is a minor version release to correct a bug discovered with TEXT and BLOB columns. Certain ALTER TABLE statements run on columns created by a 1.x release could result in the data in that column becoming unreadable after the statement. Example:

-- In Dolt 1.x
CREATE TABLE t1 (
  id INT PRIMARY KEY,
  body TEXT
);

-- insert data into table

-- in Dolt 2.x:
ALTER TABLE t1 MODIFY body LONGTEXT;

After this ALTER TABLE statement, the data in the body column becomes is inaccessible because of a mismatch in encoding between what's recorded in the schema and the table rows themselves. No data is lost or corrupted, but it becomes inaccessible to queries.

This bug impacted TEXT and BLOB types (and types in the same family, e.g. TINYTEXT). Only ALTER TABLE statements were impacted, and only if they used MODIFY COLUMN or DROP COLUMN.

For more details, see this bug report:

#11131

Releases between 2.0 and this release should be considered unsafe to use for customers with data written by any 1.x release. If you are using a previous 2.x release with data written by a 1.x release, please update to this release before running any ALTER TABLE statements.

Merged PRs

dolt

  • 11132: bug fix for adaptive encoding during ALTER TABLE
    ALTER TABLE statements that change a columns type to e.g. widen it from TEXT to LONGTEXT have a bug: if the column was created pre-2.0, the ALTER TABLE statement will use an adaptive encoding for the modified column without rewriting the table row data. This results in unreadable data.
    To fix this, we preserve the encoding for columns during ALTER TABLE operations.
  • 11125: go/{store/nbs,dbfactory,env}: Add functionality to fast-fail fslock, instead of serially waiting 100ms per DB load, when we already have some ReadOnly databases in the MultiRepoEnv.
  • 11109: pass schema name for function
    Depends on: dolthub/go-mysql-server#3562

go-mysql-server

  • 3567: fix for division on decimals
    BenchmarkPlusHighScaleDecimals:
    before (decimal.Decimal)   2505679               460.8 ns/op
    after (apd.Decimal)        3746318               304.5 ns/op
    
    BenchmarkMinusHighScaleDecimals:
    before (decimal.Decimal)   2619691               449.0 ns/op
    after (apd.Decimal)        3723363               312.1 ns/op
    
    BenchmarkMultHighScaleDecimals:
    before (decimal.Decimal)   2537882               454.6 ns/op
    after (apd.Decimal)        3608662               321.3 ns/op
    
    BenchmarkDivHighScaleDecimals:
    before (decimal.Decimal)   793515               1414 ns/op
    before fix (apd.Decimal)   367                  3112350 ns/op
    after fix (apd.Decimal)    946606               1246 ns/op
    
    BenchmarkDivManyDecimals:
    before (decimal.Decimal)   130582               7691 ns/op
    before fix (apd.Decimal)   54                   21534736 ns/op
    after fix (apd.Decimal)    110416               9347 ns/op
    
  • 3562: pass schema name when retreiving function

Closed Issues

  • 11098: Support MariaDB non-parenthesized function defaults on TEXT/BLOB/JSON columns (extends #7033)

Don't miss a new dolt release

NewReleases is sending notifications on new releases.