github dolthub/dolt v1.33.0
1.33.0

latest releases: v1.43.1, v1.43.0, v1.42.20...
7 months ago

This release contains backwards incompatible changes:

  • Dolt sql-server now honors the COM_RESET_CONNECTION command from the MySQL protocol. This command instructs the sql-server to clear all session state (e.g. prepared statements, user variables, session variables) and is most often used for connection pooling, to allow a connection's session to be cleared before it is given to another thread to use. This change makes Dolt's sql-server match MySQL's behavior in connection pooled environments, but we are calling this out as a potential backwards incompatible change in case any customers are relying on the previous behavior, such as relying on prepared statements to persist in the session after it is returned to the connection pool.

Per Dolt’s versioning policy, this is a minor version bump because these changes may impact existing applications. Please reach out to us on GitHub or Discord if you have questions or need help with any of these changes.

Merged PRs

dolt

  • 7466: go/cmd/dolt/dolt.go: A different way of processing profile-path.
  • 7462: Update validation for dropping an auto_increment primary key column
    Allows auto_increment primary key columns to be dropped, so long as there exists a secondary index that covers the auto_increment column.
    Depends on dolthub/go-mysql-server#2316
    Related to #7456

go-mysql-server

  • 2316: Allow primary keys with auto_increment columns to be dropped when an appropriate index exists
    MySQL allows a primary key with an auto_increment column to be dropped as long as there is a secondary index that includes the auto_increment column as the first column in the index. (MySQL Reference)
    This PR also enables dropping a primary key by referencing it by it's ID (PRIMARY), in order to match MySQL's behavior, e.g.
    DROP INDEX `PRIMARY` ON t;
    
    Related to #7456
  • 2315: Stored procedures can use params as LIMIT,OFFSET
    fixes: #7458
    Fixes procedure param types in the process.
    Testing against mysql it doesn't seem like subqueries or regular column types are valid as LIMIT values in any case other than procedure parameters. I still need to test whether trigger columns can be used in LIMIT,OFFSET, but that seems like a separate problem.
  • 2311: fix group by ... having ... aliasing once more
    This PR simplifies the GROUP BY and HAVING aliasing rules to much more closely match MySQL's weirdness.
    TODO: Go through various group by aliasing issues and link fixed ones here
    correctness: #7455
  • 2310: Implement COM_RESET_CONNECTION
    Implements the COM_RESET_CONNECTION command to allow a sql-server to clear session state on a connection so that it can be safely reused, for example, in connection pools.
    This matches MySQL's behavior, but customers may see a behavior change from this if they are relying on the old behavior. For example, if customers are relying on prepared statements to remain available in a session after it has been released to a connection pool and then reassigned to a new worker thread. The behavior now matches MySQL, where prepared statements, session vars, and user vars are all reset on a connection when the COM_RESET_CONNECTION command is executed on a connection.
    Depends on dolthub/vitess#308
    Related to #3921
  • 2308: fix decimal precision for division
    divScale tracks the number of division operators on the leftSubtree. It can be used to determine if the current expression is the outermost Div expression, and doubles as a way to determine how many decimal places of precision we need to add.
    opScale tracks the total number of Arithmetic operators in the expression tree in total. It is used to identify the outermost Arithmetic expression.
    There were a few places where we were mixing up divScale and opScale, leading to improper rounding; this PR fixes that.
    As a result, we are able to properly round decimal results when the outermost operator is not a Div.
    Additionally, this PR also contains a fix for functions that return float64 being incorrectly converted to decimal.
    correctness: #7442
    fixes #4931
  • 2307: Persist table comment from create table
    We parse table comments, but they were not persisted anywhere. This change adds support for persisting table comments so that they can be round-tripped between create table and show create table.
    There are still several limitations with table comments that we should eventually follow up on:
    • Table comments containing any single quotes are not supported – Vitess parses the table options, but then strips any quotes and replaces them with single quotes, then pushes all table options back into a single string that GMS parses again, using regexes to pull out charset, collation, and comment. If a table comment is double quoted and contains single quotes in the string, Vitess doesn't currently preserve enough information for us to reparse that correctly in GMS. The right fix for this is to change Vitess to return table options in a structure, instead of as a single string.
    • ALTER TABLE does not support altering a table's comment.
      Related to #7416

vitess

  • 310: Limit/offset proc param
    re: #7458
  • 307: allow hexnums for stats_auto_recalc table option
    This fixes 1 sqllogictest

Closed Issues

  • 7435: Make phone home behavior opt-in
  • 7384: Can't add multiple foreign keys in CREATE TABLE
  • 7458: Any chance to get dynamic parameters for user procedures?
  • 4931: incorrect decimal scale if division is used, but it is not the last operation
  • 7448: dolt push may be overly aggressive in its fast-forward check.
  • 2314: Can't turn on multiStatements when using memory driver

Latency

Read Tests MySQL Dolt Multiple
covering_index_scan 2.07 2.86 1.4
groupby_scan 13.46 17.32 1.3
index_join 1.32 5.09 3.9
index_join_scan 1.25 2.18 1.7
index_scan 34.33 63.32 1.8
oltp_point_select 0.17 0.46 2.7
oltp_read_only 3.3 7.98 2.4
select_random_points 0.32 0.75 2.3
select_random_ranges 0.38 0.9 2.4
table_scan 34.33 63.32 1.8
types_table_scan 74.46 173.58 2.3
reads_mean_multiplier 2.2
Write Tests MySQL Dolt Multiple
oltp_delete_insert 5.99 5.99 1.0
oltp_insert 2.81 2.97 1.1
oltp_read_write 7.3 15.27 2.1
oltp_update_index 2.76 3.13 1.1
oltp_update_non_index 2.81 3.02 1.1
oltp_write_only 3.96 7.43 1.9
types_delete_insert 5.88 6.79 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.