Skip to content

0.39.1

Compare
Choose a tag to compare
@github-actions github-actions released this 22 Apr 22:20

This is a patch release containing bug fixes, performance improvements, and features.

  • All dolt_ SQL functions now implemented as stored procedures as well
  • Unique constraints for keyless tables now supported
  • Bug fixes for certain LOAD DATA statements
  • Better memory management for large servers
  • Better error output for dolt checkout
  • Better error messages when inserting illegal values
  • TRADITIONAL sql mode now parses correctly
  • Character sets for string literals now parse correctly
  • Certain DML statements now return an ok result
  • Better support for certain CREATE VIEW statements

Merged PRs

dolt

  • 3277: go/cmd/dolt: Add create new branch suggestion to dolt checkout {commit_hash}
    Closes #3276
    Instead of showing the following when trying to checkout a specific commit:
    dolt checkout 400435pip70vh165ggsq4etmggdh6h5i
    error: could not find 400435pip70vh165ggsq4etmggdh6h5
    
    We instead show:
    dolt checkout 400435pip70vh165ggsq4etmggdh6h5i
    dolt does not support a detached head state. To create a branch at this commit instead, run:
    dolt checkout 400435pip70vh165ggsq4etmggdh6h5i -b {new_branch_name}
    
  • 3271: Fixing bad error message for ErrBranchNotFound
    Fix error message for ErrBranchNotFound to include the branch that wasn't found.
    helps for: #3270
  • 3268: Fixed docs for sql command
  • 3259: Add generated queries tests for Tableplus
  • 3246: Added stored procedure versions of all dolt functions
  • 3245: Enable unique indexes on keyless tables
    This pr
    1. Unblocks unique indexes for keyless tables
    2. Fixes index/cat.go for keyless rows
    3. Adds additional test and verification of unique key indexes
  • 3244: go/store/nbs: fix racy fileTableReader
  • 3225: dolt dump should include views, triggers, and procedures
    fix for: #3159
    instead of dumping certain dolt tables, create the views, triggers, and procedures.
  • 3223: go/store: changes to support memory management of NomsBlockStores
    Various changes to support doltremoteapi NBS memory management.
    Changes:
    • Acquires quota with a singular call during a Rebase
    • Table file indices loaded from an AWS or Blob chunk source load their contents into an individually mmapped region of memory. When an index is closed, it's associated mmapped region is unmapped.
    • When loading indices from a disk file, stop using mmap pointlessly
    • Optimizes index memory usage. Instead of allocating an additional n sized buffer to hold the offsets, allocate a n - n/2 sized buffer and recycle the unused lengths region of memory.
    • Table reader no longer copies all the prefixes when reading
      Also renames the following noms copyrighted files:
    • mmap_table_reader.go -> file_table_reader.go
    • mmap_table_reader_test.go -> file_table_reader_test.go
  • 3210: dolt pull should do dolt fetch before
    fix for: #3113
  • 3209: add bats tests for importing from mysqldump
    Added bats tests for importing from mysqldump of currently tested simple cases including empty database and databases with view, trigger, procedure.
    Added skipped bats tests for currently known issue, character set introducer support.
  • 3167: fix panic from nil VRW
    Fixes avoiding panics when readSequence() functions is called on valueDecoder with nil VRW

go-mysql-server

  • 977: Foreign keys now allow limited type changing
    It seems that, specifically when using the string types, you may lengthen a field, but you may not change any other properties (cannot change character set or collation). Non-string types don't seem to allow lengthening, as you can't change an INT to a BIGINT.

    The implemented behavior is actually an approximation of MySQL's, as you cannot cross some length thresholds due to how MySQL stores strings. From what I can gather for MySQL, as long as the on-disk data does not change AND does not need to be checked, it is allowed. I'm sure more type changes are allowed, but it's not documented, and therefore would require a ton of trial and error, so just shipping this for now.

  • 974: Fixed LOAD DATA errors
    There are three core issues with LOAD DATA that have been fixed:

    1. Columns could be rearranged, but we didn't handle the case where the rearranged columns were a subset.
    2. Line endings were assumed to be a single character, which is not true for Windows (which uses \r\n).
    3. Default values did not work. Nil default values "worked" due to nil being the default value when instantiating a slice of interface{}s.
  • 971: support handling join table between parentheses
    Allow handling join tables in parentheses. It causes the JoinTableExpr to be wrapped in ParenTableExpr in the parser, so it needs to be unwrapped to get the JoinTableExpr inside
    Fixes #3254

  • 970: Changed all DDL nodes to return an OkResult
    This is important for compatibility with certain SQL clients (notably C connector).

  • 969: Improving Error Message for Inserting Strings that are too Long
    includes the string that failed and for which column
    helps for: #3270

  • 968: Expanded AddColumn tests to include some writes on the new table

  • 967: add TRADITIONAL to sql_mode set
    Added TRADITIONAL option to sql_mode set.
    Fixes #3230

  • 966: Arithmetic .Type() Perf Improvement
    SQL Logictests were timing out on huge CASE statements with ~40
    nodes. This fixes the computational blowup, which I think was
    somehow exponential before.

  • 965: Bug Fix: FilterTable pushdown to aliased tables
    Fixes: dolthub/go-mysql-server#808
    Max – Tagging you for your analyzer expertise. Could you check this out and see if you see a better approach to solving this? I saw a couple ways to address this, but this seemed like the least intrusive approach.

  • 964: support more than 1 byte characters to insert for char()/varchar() types
    Allows inserting strings with 'exact number of character but consists of more bytes' values to char() or varchar() types
    Fixes #3233

  • 961: Fix underspecified insert tests
    No inserts were not being run with prepareds. A lot of them were broken, but should be running in GMS now at least.
    Edit: These pass Dolt also.

  • 960: Parse charset introducer for string literals for expressions
    Fixes parsing charset introducer in front of string literals for handling some expressions such as column default expressions.
    Allows only utf8mb4, utf8mb3 and utf8 charsets. If other charsets are used, gives unsupported charset error.

  • 958: Added variable to hide external stored procedures

  • 957: Allow conversion of strings and hex to geometry types
    fix for: #3231
    we should be able to read mysql dumps produced using the --hex-blob flag.

  • 956: Fixing Point method to actually print string
    Fix for: #3228
    Allows the use of point(), linestring(), and polygon() for default values for columns of type point, linestring, polygon, and geometry.

  • 952: Remove checks for unique index
    We should follow up with an implementation for a unique index for the memory table. Will take a crack at this in a future edit.

  • 795: ComPrepare saves partial query plan
    Prepared statements hidden behind enable_prepared_statements config.
    Lacking:

    • Full support for versioned questions (select * asof '2021-03-21)). I fixed the panics, but many asof tests return incorrect results.
    • Window function parameters can't be bindVars currently (lag(x,?))
    • Needs a lot more insert ... select tests
      ComPrepare saves a partially optimized plan for prepared statements.
      Query execution will use the saved plan when possible. Connections have
      a private view of saved plans that are deleted on termination.
      All enginetests ran with prepared queries regarless of BindVar
      inclusion. Variety of bug fixes exposed by the prepared enginetests.

vitess

  • 157: add all charset introducers and parsing of charset introducers in LIKE function
    • Added all charset introducers supported by MySQL
    • Added parsing charset introducer in front of string literal of LIKE function
  • 154: move CURRENT to non-reserved-keyword-list
    CURRENT is non reserved keyword, it fixes issue of SELECT * FROM current query failing
    Fixes #3224
  • 153: Add additional syntax support for CREATE VIEW statement
    Added ALGORITHM=..., DEFINER=..., SQL SECURITY DEFINER|INVOKER syntaxes for CREATE VIEW statement.
    Fixed definer_opt to parse account_name instead of ID to support parsing of user@locahost syntax.
    Moved VIEW (non-reserved keyword) from non-reserved to reserved as non-reserved keywords are used for account_name parsing, so it creates shift/reduce conflict for view.

Closed Issues

  • 3270: Ambiguous error message when type checking fails makes it almost impossible to figure out why an import failed, especially when using triggers.
  • 3276: dolt checkout {commit_hash} should ask the user for a new branch name
  • 3233: character length of varchar values are calculated incorrectly for some characters
  • 3230: TRADITIONAL needs to be added to sql_mode set
  • 3254: support parsing join tables statements in parentheses
  • 3010: Panic on adding a foreign key constraint
  • 3232: character set introducer needs to be supported for some filter functions
  • 3224: Selecting a view named current errors
  • 3228: show create table fails on default value of POINT() function
  • 3159: dolt dumps with dolt_procedures, dolt_schema_fragments tables cannot be imported
  • 3113: dolt pull should do dolt fetch under the hood
  • 973: no index record in information_schema.statistics
  • 808: FilteredTable uses wrong schema with alias