github dolthub/dolt v0.50.16
0.50.16

latest releases: v1.38.0, v1.37.0, v1.36.1...
18 months ago

Merged PRs

dolt

  • 4760: wrap db read error
  • 4759: integration-tests/go-sql-server-driver: Use 385{1,2} instead of 5005{1,2} for cluster remotesapi ports.
  • 4757: delete old import perf files
  • 4753: go/store/val: allow year encoding to store value 0
    Previously, the year encoding did not support a value of 0. It now uses uint8 255 to represent 0 since that value is free in the encoding space.
    Companion GMS PR:
    dolthub/go-mysql-server#1395
  • 4744: Added basic smoke test for TypeORM
  • 4740: Add dolt-specific tests for a GMS change
    Adding BATS tests that will exercise the changes introduced by dolthub/go-mysql-server#1389
    Tests will fail until PR 1389 is merged and deployed.
  • 4722: implementing prefix indexes for string types
    This PR implements prefix indexes for inline string data type (CHAR, VARCHAR, BINARY, and VARBINARY) columns.
    The changes seem to work for BLOB and TEXT though.
    Fix for: #3974
    Changes:
    1. doltIndex now has a prefixLengths field which is a []uint16
    • it contains the prefixes for each of the columns in the index definition
    • it is in order of the prefix definition
    • a nil or empty list means that the columns in the index should not be trimmed
    • none of the columns are string type
    • the columns are inline string, but the entire string should be used for comparison
    1. The flatbuffer files, serialization, and deserialization code deal with the prefix index lengths
    2. Currently, dolt will indicate that it won't support this index, because...it can't; at least not completely right now (see analyzer changes at bottom)
      TODO: analyzer changes
    • primary key prefixes are futher away, so we still throw an unsupported error for those.
    • there needs to be an analyzer change to actually take advantage of this index.
      Example:
    > create table t (v varchar(2), index (v(1)));
    > insert into t values ("aa"), ("ba"), ("bb"), ("bc"), ...;
    > select v from t where v = "aa";
    The query here should be able to take advantage of the secondary index; it should do a range prefix lookup over the table for just the rows that start with "a", then apply an equality filter over the resulting table. Currently, it will just do a full table scan.
  • 4689: Redo import perf
    New import tests. Refer to README for usage details.

go-mysql-server

  • 1397: fix intDiv div operation and more edge cases with precision for all arithmetic operations
    IntDiv does operations in decimal type values and returns the int part of the decimal value result. If the value goes out of bound of int64, it errors.
    Fixed few more edge cases for all arithmetic operations including:
    • any time type value gets parsed as int value with pattern of YYYYMMDDHHMMSS or YYYYMMDD depending on what's defined. This applies to all arithmetic operations.
    • invalid string tries to parse available numbers from the beginning of the string value and used in the arithmetic operation. 12.4ag3.2jgw499 is parsed as number 12.4, and a942.6ng488 is parsed as 0.
  • 1396: Adding validation for illegal use of aggregation functions
    GMS currently panics if an aggregation function that relies on the implicit, all-rows grouping is mixed aggregation functions that rely on a window. This PR adds validation to detect these invalid queries and return the exact same error message as MySQL.
    Fixes: #4739
  • 1395: Add tests for year type behavior
    Adding tests for #4742
  • 1394: Fix test determinism
  • 1393: handle float number for bit arithmetic ops
    MySQL rounds any float value to integer before any bit operation and returns non-negative result only. Int64 values are converted to Uint64 type values including negative numbers.
    Note:
    All results will be in uint64 type as _binary introducer conversion is not supported yet. E.g. these are not supported:
    _binary b'0001' | b'0010'
    _binary X'0008' << 8
    BINARY NULL & NULL
    BINARY NULL >> 4
    
    We don't support bit-wise compliment operation ~ and BIT_COUNT function yet.
  • 1389: Provide better errors when attempting to use stored procedures without a DB
    Initial attempt at fixing #3832 by throwing a better-worded error if no database is selected.
  • 1387: extend Index interface to handle prefix lengths, and add in-memory implementation
    SHOW CREATE TABLE displays the prefix lengths specified for secondary indexes
  • 1385: Moving qualifyColumns up higher in analyzer rules order
    This change moves the qualifyColumns analyzer rule up to the second position in the DefaultRules batch (resolveNaturalJoins still needs to run first to resolve duplicate column names.)
    The main issue I hit was that pushdownGroupByAliases was handling identifying aliases in GroupBy grouping expressions, and because GroupBy combines its projection expressions and grouping expressions in its Expressions() implementation, I had to special case GroupBy in qualifyColumns to handle identifying alias references in the grouping expressions that were defined in the projection expressions.
    The other interesting point is an open question around the right way to resolve ambiguity in the order by clause between an alias name and a column name. Documentation and testing shows that an alias should be preferred in that case, but MySQL behaves differently and prefers the column if the ambiguous reference is the argument to a function. For now, I changed the one test this affects to qualify the reference in the order by clause with a table name, and I opened an issue on MySQL's bug tracker to try and get confirmation if this is a bug or working as expected.
    Dolt CI tests: #4721

Closed Issues

  • 4742: year column type does not round-trip when column value is 0
  • 3832: SHOW CREATE PROCEDURE dolt_branch fails when no DBs exist
  • 4761: dolt merge --no-ff <branch> (no message) and dolt merge --no-ff --no-commit <branch> are still committing
  • 4735: Resolve error for window expression in function
  • 4715: LAST_VALUE window function seems not quite right

Don't miss a new dolt release

NewReleases is sending notifications on new releases.