github dolthub/dolt v1.4.0
1.4.0

latest releases: v1.43.13, v1.43.12, v1.43.11...
17 months ago

This release contains potentially breaking behavior changes having to do with transaction behavior and database naming.

  • CALL dolt_checkout('mybranch') is no longer an error if the currently checked out branch has uncommitted changes.
  • use mydb/mybranch; select * from information_schema.columns and similar queries used to return table_schema with the branch-qualified database name. information_schema tables, show databases, etc. now always contain only base, unqualified database names. The database() function still returns the name of the database in the connection string or in use statements.

Per Dolt's versioning policy, this may require users to update code that expects call dolt_checkout() to fail on a dirty working set. Thus, the minor (major.minor.patch) version bump.

Merged PRs

dolt

  • 6137: update maven version for orm tests
  • 6133: Update README.md
    Add some notes on where the final go binary goes for folks not familiar with golang
  • 6122: Re-merge of #5968 (transactions and db naming)
    This reverts commit bb03b8c.
  • 6117: Moved remote bats into their own workflow so they don't cancel local …
    …bats when they fail
  • 6107: Skip remotes-sql-server.bats and sql-server.bats when running BATS in remote-engine configuration.
    This should prevent the test failures that are blocking PRs, even if I don't fully understand why these test failures are happening.
  • 6011: Rewrite dolt status subcommand to use SQL queries to generate results.
    Rewrite dolt status subcommand to use SQL queries to generate results.
    This change adds remote column to the dolt_branches table. This column identifies the remote for the branch.
    This change adds dolt_count_commits function, which returns the number of commits between two commits.
    Added more BATS tests for dolt status.
  • 5968: Transaction and DB name resolution changes
    This change introduces two major behavior changes to how dolt manages database names and session state in transactions:
    1. It's now possible to edit different branch heads and databases without explicitly switching to a new working set via dolt_checkout(). E.g., this session updates the branch b1:
    use mydb;
    insert into `mydb/b1`.t1 values (1);
    commit;
    These database-qualified INSERT / UPDATE etc. statements used to silently drop data if the database named wasn't the current database, in some cases. They now work correctly in all cases. We still fail transactions that attempt to make changes to more than one working set for now, but this restriction will be removed in a future revision.
    2) The behavior of dolt_checkout() has changed. It is no longer an error to call dolt_checkout() with a dirty working set. USE mydb/branch is now almost exactly equivalent to dolt_checkout('branch'). dolt_checkout() now has the side-effect of setting the session's current DB name to the base name of the database. E.g. after use mydb/branch, select database(), active_branch() returns mydb/branch, branch. If you then call dolt_checkout('branch2'), then the same query returns mydb, branch2. dolt_checkout is different from USE statements in that it changes which branch the unqualified database name (mydb) resolves to for this session.

go-mysql-server

  • 1821: Bug fix: The result schema of SELECT INTO should always be an empty schema
    SELECT INTO currently returns it's child node's schema as its result schema, but it doesn't actually return row data in that schema. This causes a problem over a SQL connection when clients see a result schema and then see row data that doesn't match that schema. This causes clients to freak out and close the connection from their side. Since SELECT INTO always sends its results to a file or SQL vars (and NOT over the SQL connection), its result schema should always be the empty schema.
    Fixes: #6105
  • 1819: Lazy load large character set encoding weight maps.
    Improves dolt startup times substantially.
  • 1818: Throw correct error for non-existent qualified column on table function
    Fix for: #6101
  • 1817: Ignore FULLTEXT in CREATE TABLE
    This change allows us to ignore any FULLTEXT keys when using CREATE TABLE. This should unblock customers who just need their statements to parse, but don't actually need the functionality of FULLTEXT. We still error when trying to manually add a FULLTEXT index using ALTER or CREATE INDEX. Since this isn't really "correct" behavior, I did not add any tests.
  • 1816: Support TableFunction aliasing
    Added string field to expression.UnresolvedTableFunction to so an alias can be specified.
    Removed the rule disambiguate_table_functions, TableFunctions will default to using function name as table name when alias isn't provided.
    Companion PR: dolthub/vitess#244
    Fix for: #5928
  • 1814: Add filters to memo
    Scalar expressions added to memo along with scalar properties, expression ids, filter closures. Goal here is equivalent behavior to before, just with filters represented differently. Filter organization mostly mirrors the plan package, except scalar and relational expressions are both represented as expression groups here. Done in a rush, still back and forth on whether there should be an interface there.
    Additionally:
    scalar expressions added to memo along with scalar properties, expression id
    rewrites join planning and costing to use bitset representations of filters
    refactors codegen so definition files are yaml, source is compiled independently from target code
    The organization is bit wonky b/c this should be using my name resolution symbol tables, and the entire tree should be memoized not just the join tree (used temporary solutions for the problems created by both of these).
    Re: #5993
  • 1791: Functional dependencies
    Functional dependencies track 1) key uniqueness, constant propagation, column equivalence, nullability sets.
    This information is built bottom-up from tables scans through projections, and is used to answer certain questions about relational nodes:
    1. What is the equivalence closure for a join condition?
    2. Are a set of filters redundant?
    3. Do a set of index expressions comprise a strict key for a LOOKUP_JOIN?
    4. Does a subquery decorrelation scope have a strict/null-safe key for an ANTI_JOIN?
    5. Are the grouping columns a strict key of the table (only_full_group_by is unnecessary)
    6. Is the relation sorted on a given column set? (is a Sort already enforced)
    7. Is a relation constant? (Max1Row)
      Questions (1) and (3) contribute towards fixing this issue: #5993. Question (2) contributes to filter pruning. Question (4) is relevant for this issue: #5954.
  • 1787: Changes to USE and prepared statements
    This introduces two changes to how databases are resolved:
    1. USE statements now are handled by the Session with a new interface
    2. Tables in prepared statements now retain a copy of their Database implementation, rather than re-resolving it by name during execution.
      Both of these changes are to support Dolt's new database name semantics.

vitess

  • 245: allow event as table and column name
    The PR allows EVENT non-reserved keyword to be used as table and column name without quoting.
    The missing edge case includes using EVENT for user name or host name.
  • 244: parse table_functions with aliases
    Syntax support for: #5928
  • 243: Add ignore/replace modifiers to load data
  • 242: allow EVENTS to be parsed as non-reserved keyword
    Transferred EVENTS keywords into non_reserved_keyword list, allowing statements using information_schema.events table to parse.
    For some reason EVENT cannot be transferred into non_reserved_keyword, causing shift/reduce and reduce/reduce conflicts.

Closed Issues

  • 6123: event reserved keyword quoting differences with MySQL
  • 6101: Missing column triggers "table not found" error
  • 5928: Table function aliases
  • 6105: Server connection lost when executing prepared statement from mysql client
  • 6119: dolt sql-client does not pick database
  • 6109: Flaky CI tests when running start_sql_server
  • 6082: Commands that use new SQL backend display incorrect error when run outside of a repo
  • 5983: LOAD Data into a table with column defaults panics
  • 5678: Feature request: Add --skip-empty to DOLT_COMMIT()
  • 5982: LOAD DATA does not support replace or ignore options

Latency

Read Tests MySQL Dolt Multiple
covering_index_scan 2.0 2.66 1.3
groupby_scan 12.52 16.71 1.3
index_join 1.21 4.33 3.6
index_join_scan 1.14 2.11 1.9
index_scan 30.81 54.83 1.8
oltp_point_select 0.14 0.46 3.3
oltp_read_only 2.86 7.98 2.8
select_random_points 0.29 0.75 2.6
select_random_ranges 0.35 1.06 3.0
table_scan 30.81 54.83 1.8
types_table_scan 71.83 155.8 2.2
reads_mean_multiplier 2.3
Write Tests MySQL Dolt Multiple
bulk_insert 0.001 0.001 1.0
oltp_delete_insert 5.99 6.32 1.1
oltp_insert 2.86 3.13 1.1
oltp_read_write 6.79 15.55 2.3
oltp_update_index 2.97 3.13 1.1
oltp_update_non_index 2.91 3.13 1.1
oltp_write_only 4.1 7.7 1.9
types_delete_insert 5.88 6.91 1.2
writes_mean_multiplier 1.4
Overall Mean Multiple 1.9

Don't miss a new dolt release

NewReleases is sending notifications on new releases.