dolt

Dolt – Git for Data

APACHE-2.0 License

Downloads
2.4K
Stars
17.1K
Committers
143

Bot releases are visible (Hide)

dolt - 0.75.11

Published by github-actions[bot] over 1 year ago

Merged PRs

dolt

  • 5734: Fixed panic in dolt_commit_diff tables when referring to commits where the table doesn't exist
    Fixes #5730
  • 5733: Fixed a bug in auto increment tracking
    Fixes #5731
    Previously auto-increment tracking was only considering locally checked out branches. It needs to consider remote branches as well.
  • 5728: go/libraries/doltcore/merge: refactored unique index validation
    fixes #5719 and #4547
  • 5724: Bump xml2js and aws-sdk in /.github/actions/ses-email-action
    Bumps xml2js to 0.5.0 and updates ancestor dependency aws-sdk. These dependencies need to be updated together.
    Updates xml2js from 0.4.19 to 0.5.0
  • 5722: Revert "/go/cmd/dolt/commands/engine/sqlengine.go: close dbs on sql engine close"
    Reverts dolthub/dolt#5716
  • 5716: /go/cmd/dolt/commands/engine/sqlengine.go: close dbs on sql engine close
  • 5712: go/store/nbs: correctly handle stashed journal on conjoin
  • 5705: sqle: track column renames on alter/modify column
    companion to: https://github.com/dolthub/go-mysql-server/pull/1702
  • 5690: Lookup int out of range error
    re: https://github.com/dolthub/dolt/issues/5673
    companion PR: https://github.com/dolthub/go-mysql-server/pull/1695

go-mysql-server

  • 1707: fix JSON map key ordering
    fix for: https://github.com/dolthub/dolt/issues/5711
  • 1704: fix group by over empty result sets
    fix for: https://github.com/dolthub/dolt/issues/5683
  • 1700: OrderedDistinct passes join tree row during exec
    Re: https://github.com/dolthub/dolt/issues/5700
    OrderedDistinct dropped a parent row while executing a join tree, which caused a field index error in the child.
    The query below has a slightly different plan, but the OrderedDistinct in the right half of a join tree, with a join SEMI_JOIN(scalarSubq0, scalarSubq1) as a child is the issue.
    Project
    ├─ columns: [SUM(xy.x):0!null as SUM(x)]
    └─ GroupBy
    ├─ select: SUM(xy.x:0!null)
    ├─ group:
    └─ Project
    ├─ columns: [xy.x:0!null, xy.y:1]
    └─ HashJoin
    ├─ Eq
    │   ├─ xy.x:0!null
    │   └─ scalarSubq0.u:2!null
    ├─ Filter
    │   ├─ Eq
    │   │   ├─ xy.x:0!null
    │   │   └─ 2 (tinyint)
    │   └─ Table
    │       ├─ name: xy
    │       └─ columns: [x y]
    └─ HashLookup
    ├─ source: TUPLE(xy.x:0!null)
    ├─ target: TUPLE(scalarSubq0.u:0!null)
    └─ CachedResults
    └─ OrderedDistinct
    └─ Project
    ├─ columns: [scalarSubq0.u:0!null]
    └─ SemiJoin
    ├─ Eq
    │   ├─ scalarSubq0.u:2!null
    │   └─ scalarSubq1.a:4!null
    ├─ TableAlias(scalarSubq0)
    │   └─ Table
    │       ├─ name: uv
    │       └─ columns: [u v]
    └─ Filter
    ├─ Eq
    │   ├─ scalarSubq1.a:0!null
    │   └─ 2 (tinyint)
    └─ TableAlias(scalarSubq1)
    └─ Table
    ├─ name: ab
    └─ columns: [a]
    
  • 1695: Fix value out of range bug
    re: https://github.com/dolthub/dolt/issues/5642
  • 1663: Return column size in datetime type
    During testing go-mysql-server with Trino and I have noticed that it does work when I have either timestamp or datetime. I have asked them https://github.com/trinodb/trino/issues/16575 whether it's ok for them to implement default column size like they did for Phoenix connector, but they did not want to add it. I still think it should be fine without column size, since most of the clients (except the ones which are written in java) accept date time without column size.
    In order to be fully compatible about it for now I have added 0 as column size for timestamp and datetime

vitess

  • 232: go/mysql/conn.go: Improve server-side cursor support.
    1. Send LastRowSent with the result set batch in which the cursor is actually exhausted.
    2. Only send CursorExists in the response to COM_STMT_EXECUTE which creates the cursor.
  • 231: support 'show events' statement parsing
    • Added support for SHOW EVENTS statement parsing
    • Added support for SHOW CREATE EVENT statement parsing
    • Removed FULL option from SHOW TRIGGERS as it's not supported in MySQL.

Closed Issues

  • 5730: Runtime error when using dolt_commit_diff_$tablename
  • 5731: Incorrect autoincrement value being used
  • 3081: SHOW PROCEDURE STATUS is always current time
  • 5636: Dolt server deadlock with dolt_transaction_commit=1
  • 5719: dolt dolt_constraint_violations doesn't show all violations on merge for composite unique keys
  • 5441: Dolt does not work with the Postgres MySQL Foreign Data Wrapper
  • 3029: Support server side cursors
  • 5698: dolt diff --summary no longer shows how many rows were modified
  • 5703: dolt panic on SUM(*)
  • 5631: Recursive CTE UNION field indexing failure
  • 5642: dolt doesn't properly handle large numbers
  • 5640: dolt seems to ignore OFFSET sometimes
  • 5700: dolt panics with nested WHERE...IN blocks

Latency

Read Tests MySQL Dolt Multiple
covering_index_scan 1.96 2.66 1.4
groupby_scan 12.08 16.12 1.3
index_join 1.16 4.03 3.5
index_join_scan 1.12 2.07 1.8
index_scan 30.26 52.89 1.7
oltp_point_select 0.15 0.48 3.2
oltp_read_only 2.86 8.43 2.9
select_random_points 0.3 0.74 2.5
select_random_ranges 0.35 1.12 3.2
table_scan 30.26 53.85 1.8
types_table_scan 69.29 170.48 2.5
reads_mean_multiplier 2.3
Write Tests MySQL Dolt Multiple
bulk_insert 0.001 0.001 1.0
oltp_delete_insert 5.67 6.21 1.1
oltp_insert 2.91 3.02 1.0
oltp_read_write 6.79 15.83 2.3
oltp_update_index 2.91 3.19 1.1
oltp_update_non_index 2.97 3.07 1.0
oltp_write_only 4.1 7.56 1.8
types_delete_insert 5.77 6.91 1.2
writes_mean_multiplier 1.3
Overall Mean Multiple 1.9
dolt - 0.75.10

Published by github-actions[bot] over 1 year ago

Merged PRs

dolt

  • 5677: dolt assist command
    This PR implements a new dolt assist command that connects to ChatGPT to assist in various dolt tasks, including running SQL queries. It's experimental and hidden (not included in docs) for now.
  • 5675: go/doltcore/merge: improved schema merge tests
  • 5672: go/libraries/doltcore/doltdb: durable/table: Always write the table value we are refing. Ensures it always makes it across the GC safepoint.
  • 5670: Fix point lookup bug w/ prefix matching secondary
    re: https://github.com/dolthub/dolt/issues/5648, test here: https://github.com/dolthub/go-mysql-server/pull/1685
  • 5667: go/libraries/doltcore/sqle/cluster: commithook.go: Fix initialization of commithook so it does not report isCaughtUp right after construction.
    Misreporting isCaughtUp would race to allow a primary to gracefully transition to standby without true-ing up the replicas immediately after creating a new database, for example.
  • 5666: go/store/nbs: safeguard chunkJournal tablePersister methods for read-…
    …only journals
  • 5664: go/doltcore/sqle: fix dropped error in read-replica-db
  • 5660: support 'add' and 'remove' options for dolt_backup()
  • 5649: updates sql-client to print query timing for more statement types
    fixes: https://github.com/dolthub/dolt/issues/5518
  • 5635: go/store/nbs: replace builtin golang map with swiss.Map
  • 5601: go/store/nbs: make chunk journal lock NBS manifest while open
  • 5385: go/store/nbs: Make the panic in the finalizer for an unclosed table file index always on.
    Add a flag to make it not take the stack trace at the time of index creation.
    Disable stack trace taking by default.
    Make all unit tests pass the sanity checking.

go-mysql-server

  • 1702: sql/plan: track column renames on alter/modify column
    fixes https://github.com/dolthub/dolt/issues/5689
  • 1696: resolve recursive CTE in scalar subquery
    Re: https://github.com/dolthub/dolt/issues/5631
  • 1693: update separator parsing in group_concat
    Updates separator parsing for group_concat to use new Separator struct. This change is needed to allow '' as a separator.
    fixes: https://github.com/dolthub/dolt/issues/5570
    related: https://github.com/dolthub/vitess/pull/230
  • 1692: don't push Filter below Limit
    When there's a query with a filter over a subquery with a limit, we incorrectly push filters down to the subquery.
    Example:
    This
    select * from (select * from t limit 1) t where i > 1;
    
    is not equivalent to
    select * from (select * from t where i > 1) t limit 1;
    
    Fix for: https://github.com/dolthub/dolt/issues/5568
  • 1690: Use ordinals to force stable TopN heap sort
    Re: https://github.com/dolthub/dolt/issues/5640
    ... ORDER BY <expr> LIMIT 1 and ... ORDER BY <expr> LIMIT 1 OFFSET 1 both use TopN in a way that surprises users expecting stable output orders.
    For example, the second query returning the first row is within the SQL spec but not user friendly:
    -- setup
    create table xy (x int primary key, y int);
    insert into xy values (1,0),(2,0),(3,0),(4,0);
    -- expect first row
    select * from xy order by y asc limit 1;
    +---+------+
    | x | y    |
    +---+------+
    | 0 |    1 |
    +---+------+
    -- expect second row
    select * from xy order by y asc limit 1 offset 1;
    +---+------+
    | x | y    |
    +---+------+
    | 0 |    1 |
    +---+------+
    
    This PR adds ordinals to rows in the TopN heap to differentiate insertion order in sort-groupings.
  • 1689: Make merge_join pushdown safe
    Index lookups were being pushed into merge join:
    tmp1> explain select /*+ merge_join(xyz,uv) join_order(xy,uv) */ * from xyz join uv on x = u where y = 1;
    +--------------------------------+
    | plan                           |
    +--------------------------------+
    | MergeJoin                      |
    |  ├─ cmp: (xyz.x = uv.u)        |
    |  ├─ IndexedTableAccess(xyz)    |
    |  │   ├─ index: [xyz.y]         |
    |  │   ├─ filters: [{[1, 1]}]    |
    |  │   └─ columns: [x y z]       |
    |  └─ IndexedTableAccess(uv)     |
    |      ├─ index: [uv.u]          |
    |      ├─ filters: [{[NULL, ∞)}] |
    |      └─ columns: [u v]         |
    +--------------------------------+
    
    In rare cases like above, this pushes an unsafe index into merge join that is not sorted monotonically on the join condition. A merge join index that violates join condition monotonicity will miss matches. In even rarer cases, the out of order value for the join condition included NULLs, causing this error: https://github.com/dolthub/dolt/issues/5633.
  • 1688: Support for recursive CTEs with no union
    Ex:
    with recursive a as (select 1) select * from a union select * from a;
    
    Re: https://github.com/dolthub/dolt/issues/5657
  • 1687: Fix left merge join bug
    Re: https://github.com/dolthub/dolt/issues/5652
  • 1686: Fix issue where special characters within JSON were encoded.
  • 1684: Fix hoisted scope renaming error
    Disambiguating a hoisted scope requires renaming all references. We were missing intra-scope filter renames.
    re: https://github.com/dolthub/dolt/issues/5654
  • 1683: Fix distinctness/sort enforcing
    The original bug: https://github.com/dolthub/dolt/issues/5651 duplicates a RIGHT_SEMI_LOOKUP_JOIN row because we were distincting right full row rather than the subset of join attributes.
    This PR adds some more tests around ordering and sort enforcing in the memo.
    The overview is that DISTINCT is weird because it is something in-between a property of a relational expression and the property of a relational group. It is an enforcer that we can implement as an ORDERED_DISTINCT or ditch altogether when child nodes provide supportive sort orders. We could imagine bifurcating the memo into buckets, with expression groups sectioned into groups based on sort orders, and costing considering the cardinality of children plus conditional sort enforcers. More work needed to think through how PG and CRDB do this generally.
  • 1682: Rework how we create JSON strings to match MySQL.
    Fixes https://github.com/dolthub/dolt/issues/4499
  • 1680: Fix partial join hints
    ResolvedTable and TableAlias must carry comments if we want to hint partial joins created by unnesting subqueries.
  • 1679: Small fix for a join-related regression in Dolt
  • 1670: Adding a new GH action to label incoming issues and PRs from customers
    This same workflow has been running in the dolt repo for a couple weeks now. This PR rolls it out to go-mysql-server.
    The intent is to label issues and pull requests from customers to help us see them more easily in all the other issues and pull requests we create.
  • 1519: partially implementing st_within
    Apparently, I've already added support for st_within() for Point vs Geometry, so this is just adds a bunch of test cases for every other geometry.
  • 1512: partially implementing st_equals
    MySQL docs for reference: https://dev.mysql.com/doc/refman/8.0/en/spatial-relation-functions-object-shapes.html#function_st-equals
    This adds support for st_equals() only in the Point vs Point case. There are skipped tests for all other cases.

vitess

  • 232: go/mysql/conn.go: Improve server-side cursor support.
    1. Send LastRowSent with the result set batch in which the cursor is actually exhausted.
    2. Only send CursorExists in the response to COM_STMT_EXECUTE which creates the cursor.
  • 230: update separator parsing for group_concat
    Updates separator parsing for group_concat to indicate whether the default separator should be used. This change is needed to allow '' as a separator.
    related: https://github.com/dolthub/go-mysql-server/pull/1693/
  • 229: Added support for ALTER TABLE ... COLLATE
    Fixes https://github.com/dolthub/dolt/issues/5623
  • 228: simulate server side cursors
    To be able to use the newest MySQL foreign data wrapper for Postgres, we have to support server side cursors.
    This PR emulates them, and hopefully gets us far enough...
    Additionally, this includes a fix for Windows clients (and other clients that don't have the DeprecatedEOF client capability flag set) where we send an extra EOF packet when we shouldn't.
    Fix for: https://github.com/dolthub/dolt/issues/5441
    And this: https://github.com/dolthub/dolt/issues/3029
    This one too (kinda): https://github.com/dolthub/dolt/issues/4840
  • 227: add create and drop event parsing
    Add support parsing CREATE EVENT and DROP EVENT statements.

Closed Issues

  • 5689: Crash when trying column change
  • 5676: Intellectual property rights and Patent Number for the Dolt DB Storage method.
  • 5243: Implement add/remove backup in dolt_backup() stored procedure
  • 5570: GROUP_CONCAT() parses separator but does not respect it
  • 5643: Incorrect number of results returned from INNER JOIN
  • 5639: Join dropping results
  • 5657: dolt panics when recursive CTE is used
  • 5651: RIGHT_SEMI_LOOKUP_JOIN duplicating join rows
  • 5652: Left merge join drops a row
  • 5648: Point lookups should match prefix
  • 5633: MERGE_JOIN nil comparison found in operand
  • 5632: Scope unnesting field index bug.
  • 5654: "Field is not on schema" error during subquery unnesting
  • 5638: IN_TUPLE filters subject to range scan duplication
  • 5650: dolt diff/patch doesn't produce valid SQL for binary columns
  • 4499: sql.JsonDocument ToString returns strings without whitespaces
  • 5658: Recursive CTE column missing from schema
  • 5518: Write queries don't report query time in the dolt sql-client

Latency

Read Tests MySQL Dolt Multiple
covering_index_scan 1.96 2.71 1.4
groupby_scan 12.3 16.12 1.3
index_join 1.18 4.1 3.5
index_join_scan 1.12 2.22 2.0
index_scan 30.81 52.89 1.7
oltp_point_select 0.14 0.48 3.4
oltp_read_only 2.86 8.43 2.9
select_random_points 0.3 0.75 2.5
select_random_ranges 0.35 1.14 3.3
table_scan 31.37 54.83 1.7
types_table_scan 71.83 176.73 2.5
reads_mean_multiplier 2.4
Write Tests MySQL Dolt Multiple
bulk_insert 0.001 0.001 1.0
oltp_delete_insert 5.88 6.32 1.1
oltp_insert 2.91 3.13 1.1
oltp_read_write 6.79 15.83 2.3
oltp_update_index 2.97 3.36 1.1
oltp_update_non_index 3.13 3.3 1.1
oltp_write_only 4.18 7.7 1.8
types_delete_insert 5.77 7.04 1.2
writes_mean_multiplier 1.3
Overall Mean Multiple 1.9
dolt - 0.75.9

Published by github-actions[bot] over 1 year ago

Merged PRs

dolt

go-mysql-server

  • 1679: Small fix for a join-related regression in Dolt
  • 1677: fix for duplicate hash tuple in
    This is the old explain:
    tmp> explain select * from t where i in (1, 1);
    +---------------------------------------+
    | plan                                  |
    +---------------------------------------+
    | Filter                                |
    |  ├─ (t.i HASH IN (1, 1))              |
    |  └─ IndexedTableAccess(t)             |
    |      ├─ index: [t.i]                  |
    |      ├─ filters: [{[1, 1]}, {[1, 1]}] |
    |      └─ columns: [i]                  |
    +---------------------------------------+
    6 rows in set (0.00 sec)
    
    We just had duplicate Ranges inside the filters, which cause multiple lookups for the same value.
    A side-effect of this change is that the filters are now sorted in the explain query, so that's nice.
    Example: https://github.com/dolthub/go-mysql-server/pull/1677/files#diff-eae6109880e132a9197c2b536f62e9572fc34d8e7c65e957dd37f48657790a94L2392-R2392
  • 1676: Added support for ALTER TABLE ... COLLATE
    Fixes https://github.com/dolthub/dolt/issues/5623
    Builds upon https://github.com/dolthub/vitess/pull/229
  • 1675: SET multiple system variables including 'NAMES' and 'CHARSET'
  • 1669: clean up hoisting
    Variety of refactors related to hoisting subqueries and unnesting scopes.
    • remove SingleSelectRel
    • empty join expansion
    • limits + filters should be tested in memo now
    • fix to anti join correctness for empty right-hand rel
  • 1660: Added a permissive collation coercibility model
    This PR adds support for collation coercion by granting every expression, node, and type the ability to report their own coercibility. In addition, we're extremely permissible now, and do not report any coercibility errors, which deviates from MySQL. This still attempts to adhere to MySQL's coercibility rules as much as possible though.

vitess

Closed Issues

  • 4428: Collation Coercibility
  • 5623: Missing support for ALTER TABLE table_name COLLATE utf8mb4_bin;
  • 5630: "Out of range for int" error

Latency

Read Tests MySQL Dolt Multiple
covering_index_scan 1.93 2.76 1.4
groupby_scan 12.52 16.41 1.3
index_join 1.18 4.18 3.5
index_join_scan 1.14 2.07 1.8
index_scan 30.81 52.89 1.7
oltp_point_select 0.15 0.48 3.2
oltp_read_only 2.97 8.43 2.8
select_random_points 0.3 0.74 2.5
select_random_ranges 0.35 1.12 3.2
table_scan 31.37 53.85 1.7
types_table_scan 70.55 161.51 2.3
reads_mean_multiplier 2.3
Write Tests MySQL Dolt Multiple
bulk_insert 0.001 0.001 1.0
oltp_delete_insert 5.37 5.88 1.1
oltp_insert 2.61 2.97 1.1
oltp_read_write 6.67 15.83 2.4
oltp_update_index 2.76 3.07 1.1
oltp_update_non_index 2.86 2.97 1.0
oltp_write_only 3.82 7.56 2.0
types_delete_insert 5.28 6.79 1.3
writes_mean_multiplier 1.4
Overall Mean Multiple 1.9
dolt - 0.75.8

Published by github-actions[bot] over 1 year ago

Merged PRs

dolt

  • 5625: omit some empty fields
  • 5621: Correctly handle merging of staged changes across concurrent sessions
    Fixes https://github.com/dolthub/dolt/issues/5608
  • 5617: go/libraries/doltcore/sqle/cluster: Improve the robustness of graceful transitions to standby role.
    Some subtle races could cause graceful transitions to fail when they could have succeeded or could cause replication to block for a long time while the attempt to transition was ongoing.
  • 5611: Bug fixes for branch deletion edge cases
    While debugging a customer issue, I found a few edge cases around deleting branches to fix:
    • the sql-server.lock file wasn't getting created when creating the first database for a sql-server (i.e. when running the sql-server from a bare, non-init'ed directory).
    • dolt checkout on the CLI was exiting too early if it couldn't find its working set and not actually checking anything out, but returning a success error code. This meant customers couldn't use the CLI to recover from a deleted default branch. We did have a test for this, but it wasn't testing thoroughly enough and only looked for a success return code from dolt checkout.
    • dolt branch -d (from SQL or CLI) should not allow you to delete the repo's default branch. This is how the customer got their database into a bad state with out a default branch.
    • a couple tests in deleted-branches.bats were skipped; I removed the skips and confirmed they pass.
      These fixes will help prevent customers from getting into this state and ensure they can fix a deleted default branch using the dolt CLI. It would be ideal to continue on this thread and also make dolt_checkout() work in sql-server with the default branch is invalid, but I think that's best handled as a follow up PR.
  • 5567: adds the dolt_column_diff system table
    This change adds a new system table, dolt_column_diff which lists the tables and columns changed in every commit reachable from the active branch’s HEAD.
    fixes: https://github.com/dolthub/dolt/issues/5254

go-mysql-server

  • 1675: SET multiple system variables including 'NAMES' and 'CHARSET'
  • 1666: join operator hints
    Join order (JOIN_ORDER(a,b)) and operator hints (LOOKUP_JOIN(a,b)) play nice together when there is a plan that satisfies all hints. If order and operator hints are are incompatible, no hints are applied.
    Example:
    > explain
    select /*+ JOIN_ORDER(a,b,c,d) LOOKUP_JOIN(d,c) MERGE_JOIN(b,a) HASH_JOIN(c,a)*/ 1
    from xy a
    join uv b on a.x = b.u
    join xy c on a.x = c.x
    join uv d on d.u = c.x;
    QueryProcess
    └─ Project
    ├─ columns: [1 (tinyint)]
    └─ HashJoin
    ├─ Eq
    │   ├─ a.x:0!null
    │   └─ c.x:2!null
    ├─ MergeJoin
    │   ├─ cmp: Eq
    │   │   ├─ a.x:0!null
    │   │   └─ b.u:1!null
    │   ├─ TableAlias(a)
    │   │   └─ IndexedTableAccess(xy)
    │   │       ├─ index: [xy.x]
    │   │       ├─ static: [{[NULL, ∞)}]
    │   │       └─ columns: [x]
    │   └─ TableAlias(b)
    │       └─ IndexedTableAccess(uv)
    │           ├─ index: [uv.u]
    │           ├─ static: [{[NULL, ∞)}]
    │           └─ columns: [u]
    └─ HashLookup
    ├─ source: TUPLE(a.x:0!null)
    ├─ target: TUPLE(c.x:0!null)
    └─ CachedResults
    └─ LookupJoin
    ├─ Eq
    │   ├─ d.u:3!null
    │   └─ c.x:2!null
    ├─ TableAlias(c)
    │   └─ Table
    │       ├─ name: xy
    │       └─ columns: [x]
    └─ TableAlias(d)
    └─ IndexedTableAccess(uv)
    ├─ index: [uv.u]
    └─ columns: [u]
    

Closed Issues

  • 5608: Concurrent table edits leaves uncommitted branch state
  • 5627: Variable NAMES not working
  • 5254: Filter change history by affected columns – new dolt_column_diff system table
  • 1662: aliases overwriting original column

Latency

Read Tests MySQL Dolt Multiple
covering_index_scan 1.93 2.71 1.4
groupby_scan 12.3 16.12 1.3
index_join 1.18 4.03 3.4
index_join_scan 1.14 2.07 1.8
index_scan 31.37 52.89 1.7
oltp_point_select 0.15 0.48 3.2
oltp_read_only 3.02 8.43 2.8
select_random_points 0.3 0.73 2.4
select_random_ranges 0.36 1.14 3.2
table_scan 31.37 53.85 1.7
types_table_scan 71.83 158.63 2.2
reads_mean_multiplier 2.3
Write Tests MySQL Dolt Multiple
bulk_insert 0.001 0.001 1.0
oltp_delete_insert 5.18 5.88 1.1
oltp_insert 2.52 2.76 1.1
oltp_read_write 6.55 15.83 2.4
oltp_update_index 2.61 2.97 1.1
oltp_update_non_index 2.57 2.86 1.1
oltp_write_only 3.68 7.43 2.0
types_delete_insert 5.0 6.67 1.3
writes_mean_multiplier 1.4
Overall Mean Multiple 1.9
dolt - 0.75.7

Published by github-actions[bot] over 1 year ago

Merged PRs

dolt

  • 5624: Fix dolt_gc for repositories newly using chunk journal.
    When a repository was created with < 0.75.0, or if it was created and used with DOLT_DISABLE_CHUNK_JOURNAL=true, it does not have a chunk journal. If it then runs dolt in a mode where it uses the chunk journal, the journal will not be bootstrapped until a write is done against the database. In the state where dolt is using the chunk journal but the chunk journal is not bootstrapped, dolt gc and call dolt_gc() were broken. They would fail with the message: concurrent manifest edit during GC, before swapTables. GC failed..
    This fixes that by making the chunk journal forward UpdateGCGen manifest update calls in its non-bootstrapped state, the same way it forwards Update manifest calls.
  • 5615: Allow logging base64-encoded queries, instead of replacing bad chars.
  • 5602: Added test for avoiding multiple parens issue.
    https://github.com/dolthub/dolt/issues/5478

go-mysql-server

  • 1667: Allow logging base64-encoded queries, instead of replacing bad chars.
  • 1666: join operator hints
    Join order (JOIN_ORDER(a,b)) and operator hints (LOOKUP_JOIN(a,b)) play nice together when there is a plan that satisfies all hints. If order and operator hints are are incompatible, no hints are applied.
    Example:
    > explain
    select /*+ JOIN_ORDER(a,b,c,d) LOOKUP_JOIN(d,c) MERGE_JOIN(b,a) HASH_JOIN(c,a)*/ 1
    from xy a
    join uv b on a.x = b.u
    join xy c on a.x = c.x
    join uv d on d.u = c.x;
    QueryProcess
    └─ Project
    ├─ columns: [1 (tinyint)]
    └─ HashJoin
    ├─ Eq
    │   ├─ a.x:0!null
    │   └─ c.x:2!null
    ├─ MergeJoin
    │   ├─ cmp: Eq
    │   │   ├─ a.x:0!null
    │   │   └─ b.u:1!null
    │   ├─ TableAlias(a)
    │   │   └─ IndexedTableAccess(xy)
    │   │       ├─ index: [xy.x]
    │   │       ├─ static: [{[NULL, ∞)}]
    │   │       └─ columns: [x]
    │   └─ TableAlias(b)
    │       └─ IndexedTableAccess(uv)
    │           ├─ index: [uv.u]
    │           ├─ static: [{[NULL, ∞)}]
    │           └─ columns: [u]
    └─ HashLookup
    ├─ source: TUPLE(a.x:0!null)
    ├─ target: TUPLE(c.x:0!null)
    └─ CachedResults
    └─ LookupJoin
    ├─ Eq
    │   ├─ d.u:3!null
    │   └─ c.x:2!null
    ├─ TableAlias(c)
    │   └─ Table
    │       ├─ name: xy
    │       └─ columns: [x]
    └─ TableAlias(d)
    └─ IndexedTableAccess(uv)
    ├─ index: [uv.u]
    └─ columns: [u]
    
  • 1665: Fix filter hoisting issue
    Before hoisting a filter condition inside a subquery, check if the condition is using any of the subquery tables.
    This also includes a minor renaming change: when hoisting a table and there's a possibility of a name collision, we now add an unambiguous table alias.
    Fixes: https://github.com/dolthub/dolt/issues/5342
  • 1661: AlterIndex completely resolves column defaults
    https://github.com/dolthub/dolt/issues/5478

Closed Issues

Latency

Read Tests MySQL Dolt Multiple
covering_index_scan 2.0 2.71 1.4
groupby_scan 12.3 16.41 1.3
index_join 1.16 4.03 3.5
index_join_scan 1.12 2.07 1.8
index_scan 30.81 53.85 1.7
oltp_point_select 0.15 0.48 3.2
oltp_read_only 3.02 8.58 2.8
select_random_points 0.3 0.73 2.4
select_random_ranges 0.36 1.14 3.2
table_scan 31.37 54.83 1.7
types_table_scan 69.29 161.51 2.3
reads_mean_multiplier 2.3
Write Tests MySQL Dolt Multiple
bulk_insert 0.001 0.001 1.0
oltp_delete_insert 5.09 5.77 1.1
oltp_insert 2.52 2.86 1.1
oltp_read_write 6.67 15.83 2.4
oltp_update_index 2.48 2.97 1.2
oltp_update_non_index 2.57 2.86 1.1
oltp_write_only 3.55 7.56 2.1
types_delete_insert 5.18 6.55 1.3
writes_mean_multiplier 1.4
Overall Mean Multiple 1.9
dolt - 0.75.6

Published by github-actions[bot] over 1 year ago

Merged PRs

dolt

  • 5612: User/password authentication for dolt pull and fetch
  • 5610: User/password authentication for dolt clone
  • 5580: Fun commits
    Fixes https://github.com/dolthub/dolt/issues/4015
    I discussed in the issue a potential means of separating out the "fun" logic from the business logic. Let me know if you think that should be done before merging.
  • 5564: dolt show command
    Am initial implementation of the dolt show command.
    There's room for further work, but this is a working first iteration.
    Some limitations:
    • Merge commits can't be shown.
    • show.go calls methods defined in log.go and diff.go. We probably want to move those methods into a common file/package for commands that display info.
    • There's some minor code duplication between show.go and log.go and diff.go.
    • There may be more efficient ways to implement this, but I went for what would be easiest to implement as a first pass.
    • It can't show a diff for the initial commit (but dolt init makes an empty initial commit, so unless someone is editing their history this shouldn't matter.)
      This likely warrants integration tests, but I'm still learning BATS. Writing those tests can be my next step.

go-mysql-server

Closed Issues

  • 4015: Implement dolt init --fun
  • 5342: Different results from MySQL for EXISTS query
  • 5478: extra parens added to column defaults when creating unique indexes

Latency

Read Tests MySQL Dolt Multiple
covering_index_scan 2.0 2.71 1.4
groupby_scan 12.3 16.41 1.3
index_join 1.18 4.1 3.5
index_join_scan 1.14 2.07 1.8
index_scan 30.81 52.89 1.7
oltp_point_select 0.15 0.48 3.2
oltp_read_only 2.97 8.58 2.9
select_random_points 0.3 0.74 2.5
select_random_ranges 0.35 1.14 3.3
table_scan 30.81 54.83 1.8
types_table_scan 69.29 161.51 2.3
reads_mean_multiplier 2.3
Write Tests MySQL Dolt Multiple
bulk_insert 0.001 0.001 1.0
oltp_delete_insert 4.74 5.57 1.2
oltp_insert 2.35 2.71 1.2
oltp_read_write 6.21 15.55 2.5
oltp_update_index 2.3 2.91 1.3
oltp_update_non_index 2.39 2.76 1.2
oltp_write_only 3.36 7.43 2.2
types_delete_insert 4.74 6.32 1.3
writes_mean_multiplier 1.5
Overall Mean Multiple 2.0
dolt - 0.75.5

Published by github-actions[bot] over 1 year ago

Merged PRs

dolt

  • 5606: go/store/nbs: store.go: Conjoin if we need to when we add new table files to a manifest.
    This allows us to avoid huge manifests with lots of table files when we run multiple full GCs over a period of time.
  • 5600: sql: dolt_gc: Enable the dolt_gc stored procedure. Make dolt_gc safe to use.
    In order to establish a safepoint, call dolt_gc() will cause other connections to disconnect and will leave the connection which called it in a perpetual error state.
  • 5597: Bug fix: binlog replication no longer assumes there is a root user
    The binlog replication applier needs to execute SQL statements that modify any database or table being replicated from the primary. We were previously assuming the root user existed and had the right permissions for this, but that is not always true (e.g. Hosted Dolt does not create a root user on Dolt DBs). Since we can't rely on an existing account with the right privileges for executing those replicated SQL statements, we now create a custom dolt-binlog-applier user that has super user privs and is locked, to disable logins.
    This change fixes the correctness issue in https://github.com/dolthub/dolt/issues/5592 – if a root user doesn't exist, binlog replication will still work correctly.
    If this direction looks good, I'll add some deeper testing around this.

Closed Issues

  • 5603: Dolt table import -u getting stuck

Latency

Read Tests MySQL Dolt Multiple
covering_index_scan 1.96 2.71 1.4
groupby_scan 12.3 16.41 1.3
index_join 1.18 4.03 3.4
index_join_scan 1.14 2.03 1.8
index_scan 30.81 52.89 1.7
oltp_point_select 0.16 0.48 3.0
oltp_read_only 3.07 8.58 2.8
select_random_points 0.31 0.73 2.4
select_random_ranges 0.36 1.14 3.2
table_scan 30.81 53.85 1.7
types_table_scan 71.83 158.63 2.2
reads_mean_multiplier 2.3
Write Tests MySQL Dolt Multiple
bulk_insert 0.001 0.001 1.0
oltp_delete_insert 4.82 5.57 1.2
oltp_insert 2.35 2.81 1.2
oltp_read_write 6.55 15.55 2.4
oltp_update_index 2.43 2.91 1.2
oltp_update_non_index 2.48 2.81 1.1
oltp_write_only 3.55 7.43 2.1
types_delete_insert 4.82 6.32 1.3
writes_mean_multiplier 1.4
Overall Mean Multiple 1.9
dolt - 0.75.4

Published by github-actions[bot] over 1 year ago

Merged PRs

dolt

  • 5593: go/store/nbs: compute fresh lock hash during manifest true-up on chun…
    …k journal bootstrap
  • 5588: integration-tests/MySQLDockerfile: Bump to ubuntu:20.04. Fixes R MariaDB integration test.
  • 5587: update maven
  • 5584: libraries/doltcore/doltdb: fix dropped errors
    This fixes two dropped err variables in the libraries/doltcore/doltdb.
  • 5583: Bug fix for view and trigger diffs in SQL and JSON diff outputs
  • 5576: go/store/types: ValueStore: Establish a safepoint at the end of the GC cycle, before finalizing GC.
  • 5572: integration-tests/go-sql-server-driver: Add some cleanup for the tmpdirs created as part of running these tests.
  • 5556: Invalidate all sessions' db state for drop database
    Fix for: https://github.com/dolthub/dolt/issues/5349
    When a database is deleted, the cached dbState held by every session needs to be invalidated. Otherwise sessions think the deleted database still exists and are can still reference the deleted db's data, which does not match MySQL's behavior. If a new database is then created with the same name, then sessions will still use the old db info and aren't able to see the new database state.
    This change means that a session's dbState member now needs to be accessed concurrently, so I've also added synchronization using the exiting session mutex.
    Related GMS PR: https://github.com/dolthub/go-mysql-server/pull/1654
  • 5489: Test for for dropping primary keys when foreign keys are present
    Also adds a skipped test for a merge that now hangs indefinitely.
  • 5455: Bump golang.org/x/crypto from 0.0.0-20210921155107-089bfa567519 to 0.1.0 in /go
    Bumps golang.org/x/crypto from 0.0.0-20210921155107-089bfa567519 to 0.1.0.
  • 5431: go/store/{types,nbs}: Enable writes to proceed while GC is in progress.

go-mysql-server

  • 1656: De Morgan's Laws for NOT filter hoisting
    Hoisting filters in NOT expressions is subject to violating De Morgan's Laws. The current fix makes sure that when we pull filters from a subquery into a parent scope, we will include the hoisted filters in the NOT conjunction.
    So:
    select * from xy where not exists (select * from uv where x = 1)
    =>
    select * from xy where not (exists (select * from uv) and x = 1)
    
    And in the more general case:
    select * from xy where not exists (select * from uv where not exists (select * from uv where x = 1))
    =>
    select * from xy where not (exists (select * from uv) and not (exists (select * from uv) and x = 1))
    
    Further simplification would be helpful.
  • 1654: Clearing the session's transactionDb field at the end of the DropDB iterator
    Dolt PR: https://github.com/dolthub/dolt/pull/5556
    Dolt needs to start clearing dbState for all sessions when a database is dropped, otherwise incorrect data can be returned. As part of clearing that state in all sessions, it means that after the DropDB node has run its logic, the previous TransactionCommittingNode would try to run logic that relied on the dropped database state still being there. This change clears the transactionDb field of a session after we've dropped that db so that the transaction commit logic doesn't try to run.
  • 1650: Replace false filter with an empty table with the schema of the filter.
    Fixes https://github.com/dolthub/dolt/issues/5522
  • 1537: Covered @@GLOBAL.time_zone in CONVERT_TZ function

Closed Issues

  • 5549: Getting "out of range for tinyint" error from dolt
  • 5349: Dropping and recreating database of same name in one client is not reflected in other clients
  • 5522: dolt panics when EXISTS subquery has a false condition

Latency

Read Tests MySQL Dolt Multiple
covering_index_scan 1.93 2.71 1.4
groupby_scan 12.3 16.12 1.3
index_join 1.18 4.03 3.4
index_join_scan 1.14 2.11 1.9
index_scan 30.26 52.89 1.7
oltp_point_select 0.15 0.48 3.2
oltp_read_only 2.91 8.43 2.9
select_random_points 0.3 0.73 2.4
select_random_ranges 0.35 1.12 3.2
table_scan 30.81 53.85 1.7
types_table_scan 69.29 158.63 2.3
reads_mean_multiplier 2.3
Write Tests MySQL Dolt Multiple
bulk_insert 0.001 0.001 1.0
oltp_delete_insert 5.47 5.77 1.1
oltp_insert 2.57 2.81 1.1
oltp_read_write 6.55 15.55 2.4
oltp_update_index 2.66 2.91 1.1
oltp_update_non_index 2.71 2.86 1.1
oltp_write_only 3.89 7.43 1.9
types_delete_insert 5.18 6.55 1.3
writes_mean_multiplier 1.4
Overall Mean Multiple 1.9
dolt - 0.75.3

Published by github-actions[bot] over 1 year ago

Merged PRs

dolt

  • 5578: /go/cmd/dolt/commands/login.go: fix audience used for dolt login
  • 5565: go/store/nbs: teardown chunk journal in swap tables during GC
  • 5555: use revision database name from current database for accessing DbData for dolt_checkout()
  • 5464: Three way differ and merge optimizations
    Refactor merge in a way that makes add-heavy merges faster. Expose interface for computing a three way diff without performing a merge (for statistic/PR info gathering). The compute overhead is mixed for updates, but parentFkConstraint checking is still the main bottleneck there.
    There is a general tradeoff executing merges quite larger than memory. Under that threshold, sharing one diff and batching lookups into secondary indexes is mostly faster. Above a certain table size it is faster for every data merge and correctness check to perform its own map diff. In the future I hope we find a smarter way to overlap diffs, merges, and lookups for all of the indexes and checks (primary, secondary, uniqueness checks, foreign key child, secondary child). Hopefully the current organizational pattern pushes us in that direction.
  • 5456: Bump golang.org/x/image from 0.0.0-20220302094943-723b81ca9867 to 0.5.0 in /go
    Bumps golang.org/x/image from 0.0.0-20220302094943-723b81ca9867 to 0.5.0.

go-mysql-server

  • 1656: De Morgan's Laws for NOT filter hoisting
    Hoisting filters in NOT expressions is subject to violating De Morgan's Laws. The current fix makes sure that when we pull filters from a subquery into a parent scope, we will include the hoisted filters in the NOT conjunction.
    So:
    select * from xy where not exists (select * from uv where x = 1)
    =>
    select * from xy where not (exists (select * from uv) and x = 1)
    
    And in the more general case:
    select * from xy where not exists (select * from uv where not exists (select * from uv where x = 1))
    =>
    select * from xy where not (exists (select * from uv) and not (exists (select * from uv) and x = 1))
    
    Further simplification would be helpful.
  • 1649: fix batched insert ... on duplicate update ...
    We create new table edit accumulators for inserter and updater fields for the insert node, which messes up batched inserts as certain edits are not visible between the two. The fix is two do what dolt does, and share edit accumulators.
    fix for: https://github.com/dolthub/dolt/issues/5433
    Context: https://github.com/dolthub/go-mysql-server/pull/1642#discussion_r1131219965

Closed Issues

  • 5433: Keyless Tables with a Unique Key do not enforce uniqueness and create extra values on insert
  • 5526: call dolt_checkout new branch error after force deleting existing branch

Latency

Read Tests MySQL Dolt Multiple
covering_index_scan 1.96 2.71 1.4
groupby_scan 12.3 16.12 1.3
index_join 1.23 3.96 3.2
index_join_scan 1.16 2.03 1.7
index_scan 30.26 51.94 1.7
oltp_point_select 0.15 0.48 3.2
oltp_read_only 2.97 8.43 2.8
select_random_points 0.3 0.73 2.4
select_random_ranges 0.35 1.14 3.3
table_scan 30.81 53.85 1.7
types_table_scan 70.55 161.51 2.3
reads_mean_multiplier 2.3
Write Tests MySQL Dolt Multiple
bulk_insert 0.001 0.001 1.0
oltp_delete_insert 5.0 5.57 1.1
oltp_insert 2.43 2.71 1.1
oltp_read_write 6.55 15.55 2.4
oltp_update_index 2.57 2.86 1.1
oltp_update_non_index 2.52 2.76 1.1
oltp_write_only 3.55 7.3 2.1
types_delete_insert 4.82 6.32 1.3
writes_mean_multiplier 1.4
Overall Mean Multiple 1.9
dolt - 0.75.2

Published by github-actions[bot] over 1 year ago

Merged PRs

dolt

  • 5559: Fix dolt log HEAD detection
    Fix for 5558
  • 5553: Fix incorrect recorded dolt commit times for MySQL replication
    A few small code clean ups, and a bug fix for not setting unique times in dolt commits.
    Fixes: https://github.com/dolthub/dolt/issues/5563
  • 5552: Sec index differ for parent fk constraint checking
  • 5546: go/doltcore/diff: refactor diff splitter to handle columns unmatched across revisions
  • 5542: Use auth host for RPCCreds audience, use dolthub.com for issuer
  • 5539: go/doltcore/table/untyped/tabular: fix index out of bounds in diff pr…
    …inter
  • 5533: go/doltcore/sqle/index: use Map.Get() for point lookups

go-mysql-server

  • 1652: lookup uservars when parsing prepareds
    fix for: https://github.com/dolthub/dolt/issues/5530
    companion: https://github.com/dolthub/vitess/pull/226
  • 1651: types: fix JSON NULL comparisons
  • 1648: recursively hoist out of scope filters from subqueries
    Subqueries have all filters with GET_FIELD attributes referencing outer scopes tables hoisted into the parent scope. Adds tests for recursively applying this rule. Small regression for unnesting correlated scopes with no filters, but those should be much easier to unnest now that they are decorrelated.
    Example:
    select * from xy where exists (select * from uv where x = 1)
    -- =>
    select * from xy where x = 1 and exists (select * from uv)
    
  • 1647: prevent spatial index for fk
    MySQL won't pick SPATIAL indexes as the underlying index for foreign keys; it throws a "Missing index constraint for ..." error. I couldn't find any docs specifically saying this.
    Based off how SPATIAL indexes work for our stuff, it seems like it would work just fine for us.
    However since MySQL doesn't support it, we won't either.
  • 1645: SHOW PROCESSLIST improvements.
    Show the correct database and client address of the connection.
    Include idle and connecting connections in the list, instead of just connections which are currently running queries.
    Allow KILL [ID] to kill connections which are currently connecting.
  • 1642: add tests for on duplicate key update for keyless tables
    small change to in memory table edit accumulators to only remove rows once from adds and deletes for Insert() and Delete()
    companion pr: https://github.com/dolthub/dolt/pull/5514

vitess

  • 226: supporting syntax for user variables in PREPARE statements
    fix for: https://github.com/dolthub/dolt/issues/5530
  • 225: fix parser to handle unique constraint names properly
    support these statements:
    • alter table <table_name> add constraint unique (<column_list>)
    • alter table <table_name> add constraint <name> unique (<column_list>)
    • alter table <table_name> add constraint unique <name> (<column_list>)
    • alter table <table_name> add constraint <name> unique <preferred_name> (<column_list>)
      fix for: https://github.com/dolthub/dolt/issues/5479

Closed Issues

  • 5563: Dolt replication produces the same timestamp on every commit
  • 5433: Keyless Tables with a Unique Key do not enforce uniqueness and create extra values on insert
  • 3204: Support Spatial Indexes like an index on a column with GEOMETRY type
  • 1632: Alter table drop constraint name complains the contraint does not exist

Latency

Read Tests MySQL Dolt Multiple
covering_index_scan 1.93 2.76 1.4
groupby_scan 12.52 16.41 1.3
index_join 1.18 4.03 3.4
index_join_scan 1.16 2.03 1.7
index_scan 30.26 51.94 1.7
oltp_point_select 0.15 0.48 3.2
oltp_read_only 3.02 8.43 2.8
select_random_points 0.3 0.73 2.4
select_random_ranges 0.35 1.12 3.2
table_scan 30.81 52.89 1.7
types_table_scan 69.29 158.63 2.3
reads_mean_multiplier 2.3
Write Tests MySQL Dolt Multiple
bulk_insert 0.001 0.001 1.0
oltp_delete_insert 4.57 5.57 1.2
oltp_insert 2.26 2.66 1.2
oltp_read_write 6.32 15.27 2.4
oltp_update_index 2.35 2.76 1.2
oltp_update_non_index 2.48 2.71 1.1
oltp_write_only 3.43 7.3 2.1
types_delete_insert 4.57 6.21 1.4
writes_mean_multiplier 1.5
Overall Mean Multiple 1.9
dolt - 0.75.1

Published by github-actions[bot] over 1 year ago

Merged PRs

dolt

  • 5547: dolt checkout table restores foreign key collection
  • 5538: spatial indexes on by default
  • 5532: go: sqle: Remove some uses of sql.Context.WithCurrentDB, which is hopefully going away as confusing.
  • 5527: make dolt_patch() stored procedure into dolt_patch() table function
    This PR removes dolt_patch() stored procedure and adds dolt_patch() table function.
    The dolt_patch() table function supports:
    • WORKING, STAGED, HEAD and any valid commit hash revisions.
    • three dot diff for sql patch statements.
    • schema or data only statements can be queried with WHERE clause of diff_type column.
    • has statement_order auto_increment integer value as primary key.
    • includes hashes for from and to revisions
      Added few bats tests for dolt stash and updated its synopsis and long descriptions.
  • 5514: fix keyless duplicate update
    fix for: https://github.com/dolthub/dolt/issues/5442 and https://github.com/dolthub/dolt/issues/5433
    tests: https://github.com/dolthub/go-mysql-server/pull/1642
  • 5389: split ZRanges to improve Spatial Index Lookup
    This PR implements BIGMIN/LITMAX algorithm to split up large Z-Ranges into multiple more concise Z-Ranges.
    Up to a certain extent, this improves query times.

go-mysql-server

  • 1646: Streamlined FK RESTRICT processing
    One of the strategies I mentioned in https://github.com/dolthub/dolt/issues/5508 was foregoing loading child editors when all referential actions for a foreign key are RESTRICT. Turns out that all we needed to do is to not add the updater (which is housed inside of the editor) to the chain.
    I was going to implement something a bit more complex, as we should be able to ignore all updaters that aren't actually used using runtime analysis, however I backtracked those changes as it was getting quite complex, and the added complexity did not seem worth it at all.
    There are no additional tests, as this is strictly a performance improvement. Foreign keys are one of our most well-tested features, so I'm confident that it is correct with all of the tests passing.
  • 1643: shift expandStars getFields by scopeLen
    Select * was being converted into get fields without an outer scope offset, preventing certain unnesting transformations.
  • 1641: make st_within use spatial indexes
  • 1639: Handle Quotes in Default Column Values
    See Issue: https://github.com/dolthub/dolt/issues/5411
    Both Default values and check constraints are impacted by the fact that we write strings to storage without escaping the single quote character or backslash appropriately. This change encodes both and adds tests to verify correct behavior. Tests were added for procedures, views, and triggers, they they weren't impacted by this particular defect.
  • 1638: Fixing incorrect size for SOURCE_HOST member of SHOW REPLICA STATUS

vitess

  • 225: fix parser to handle unique constraint names properly
    support these statements:
    • alter table <table_name> add constraint unique (<column_list>)
    • alter table <table_name> add constraint <name> unique (<column_list>)
    • alter table <table_name> add constraint unique <name> (<column_list>)
    • alter table <table_name> add constraint <name> unique <preferred_name> (<column_list>)
      fix for: https://github.com/dolthub/dolt/issues/5479
  • 224: reorganizing time units and add extract syntax support
    syntax to fix: https://github.com/dolthub/dolt/issues/3006

Closed Issues

  • 5471: dolt checkout does not restore dropped foreign key constraints
  • 5491: Additional dolt_patch features (three dot, --schema/--data flags)
  • 5490: dolt_patch prodecure does not work with WORKING and STAGED revisions
  • 5442: dolt panic with ON DUPLICATE KEY UPDATE
  • 5536: Function dolt_push not found
  • 1100: Dolt commands don't understand .\ for files in Powershell
  • 5508: Slow writes to table with many dependent foreign keys
  • 5479: constraint name dropped
  • 4077: Can't use a new format database in the same sql-server as an old format database
  • 5322: Commit hash mapping system table for migrated databases
  • 5073: Alias bug with INSERT INTO ON DUPLICATE KEY UPDATE
  • 5394: Mysql Database import fails duplicate primary key given: [1]
  • 5411: Dolt can't handle two single quotes in a default value on create table
  • 5487: LEFT OUTER JOIN does not select opposite table's values (in MySQL does)
  • 1317: README Rewrite

Latency

Read Tests MySQL Dolt Multiple
covering_index_scan 1.96 2.86 1.5
groupby_scan 12.3 16.41 1.3
index_join 1.21 4.33 3.6
index_join_scan 1.16 2.07 1.8
index_scan 30.81 51.94 1.7
oltp_point_select 0.15 0.48 3.2
oltp_read_only 2.97 8.43 2.8
select_random_points 0.3 0.74 2.5
select_random_ranges 0.36 1.14 3.2
table_scan 30.81 52.89 1.7
types_table_scan 70.55 158.63 2.2
reads_mean_multiplier 2.3
Write Tests MySQL Dolt Multiple
bulk_insert 0.001 0.001 1.0
oltp_delete_insert 5.09 5.88 1.2
oltp_insert 2.57 2.76 1.1
oltp_read_write 6.67 15.55 2.3
oltp_update_index 2.57 2.97 1.2
oltp_update_non_index 2.57 2.91 1.1
oltp_write_only 3.75 7.43 2.0
types_delete_insert 4.91 6.43 1.3
writes_mean_multiplier 1.4
Overall Mean Multiple 1.9
dolt - 0.75.0

Published by github-actions[bot] over 1 year ago

This release turns on ACID transactions by default. 0.75.0 is meant to signify the last major release before Dolt 1.0.

Merged PRs

dolt

  • 5520: go/perf/sysbench: reconfigure MySQL to use same durability level as Dolt w/ chunk journal
  • 5515: go/doltcore/sqle: fix FK checks on drop PK to look at correct Fks
  • 5507: fix panic from adding spatial index to non-empty table
  • 5503: Display DDL for views and triggers in dolt diff
    Second attempt of botched PR: https://github.com/dolthub/dolt/pull/5476
  • 5502: support staged set of changes for dolt stash
    • added support for handling staged set of changes for dolt stash.
    • added support for --include-untracked flag for dolt stash.
    • fixed untracked files being dropped when stashing working set of changes.
  • 5501: Minor bug fixes for MySQL binlog replication
    Fixes a nil pointer dereference when filters is set to nil after RESET REPLICA ALL. Adds a test for that case and a test for handling very long hostnames.
  • 5500: Remove obsolete DOLT_DEV NomsBinFormat.
  • 5499: Fix schema_change column in dolt_diff_summary reporting false for foreign key changes
  • 5497: go/store/prolly/tree: assert sorted edits in ApplyMutations
  • 5496: go/store/types: Thread context on Less and Compare.
  • 5485: go/store/types: Remove bufferedChunks from ValueStore.
  • 5484: go/store/skip: speedup skip list
    micro benchmark results
    goos: darwin
    goarch: amd64
    pkg: github.com/dolthub/dolt/go/store/skip
    cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    │    before     │                after                │
    │    sec/op     │   sec/op     vs base                │
    Get/unsorted_keys/n=64-12            182.65n ± 12%   90.91n ± 5%  -50.23% (p=0.000 n=10)
    Get/unsorted_keys/n=2048-12           334.8n ±  7%   186.5n ± 4%  -44.30% (p=0.000 n=10)
    Get/unsorted_keys/n=65536-12          670.1n ±  5%   475.7n ± 4%  -29.02% (p=0.000 n=10)
    Get/ascending_keys/n=64-12           188.75n ± 11%   88.27n ± 7%  -53.24% (p=0.000 n=10)
    Get/ascending_keys/n=2048-12          318.8n ±  3%   156.1n ± 7%  -51.03% (p=0.000 n=10)
    Get/ascending_keys/n=65536-12         470.0n ±  8%   218.7n ± 5%  -53.47% (p=0.000 n=10)
    Get/descending_keys/n=64-12          214.90n ± 11%   90.30n ± 5%  -57.98% (p=0.000 n=10)
    Get/descending_keys/n=2048-12         305.3n ±  7%   151.1n ± 3%  -50.50% (p=0.000 n=10)
    Get/descending_keys/n=65536-12        467.3n ±  9%   217.5n ± 6%  -53.46% (p=0.000 n=10)
    Put/unsorted_keys/n=64-12             263.2n ± 11%   106.6n ± 6%  -59.53% (p=0.000 n=10)
    Put/unsorted_keys/n=2048-12           397.1n ±  8%   206.0n ± 2%  -48.12% (p=0.000 n=10)
    Put/unsorted_keys/n=65536-12          686.8n ±  5%   449.4n ± 2%  -34.55% (p=0.000 n=10)
    Put/asending_keys/n=64-12            232.15n ± 41%   89.07n ± 6%  -61.63% (p=0.000 n=10)
    Put/asending_keys/n=2048-12           365.2n ± 13%   143.1n ± 9%  -60.82% (p=0.000 n=10)
    Put/asending_keys/n=65536-12          451.4n ±  9%   206.5n ± 7%  -54.27% (p=0.000 n=10)
    Put/descending_keys/n=64-12          188.25n ± 14%   71.79n ± 4%  -61.86% (p=0.000 n=10)
    Put/descending_keys/n=2048-12        209.30n ± 27%   83.79n ± 3%  -59.97% (p=0.000 n=10)
    Put/descending_keys/n=65536-12        229.2n ±  9%   102.2n ± 1%  -55.38% (p=0.000 n=10)
    IterAll/unsorted_keys/n=64-12         469.6n ± 10%   166.2n ± 1%  -64.61% (p=0.000 n=10)
    IterAll/unsorted_keys/n=2048-12      18.622µ ±  8%   9.711µ ± 1%  -47.85% (p=0.000 n=10)
    IterAll/unsorted_keys/n=65536-12     1214.1µ ±  5%   950.5µ ± 4%  -21.71% (p=0.000 n=10)
    IterAll/asending_keys/n=64-12         456.8n ± 22%   167.4n ± 1%  -63.36% (p=0.000 n=10)
    IterAll/asending_keys/n=2048-12      16.380µ ± 10%   7.829µ ± 8%  -52.20% (p=0.000 n=10)
    IterAll/asending_keys/n=65536-12      598.6µ ±  8%   313.7µ ± 4%  -47.60% (p=0.000 n=10)
    IterAll/descending_keys/n=64-12       483.3n ± 28%   166.3n ± 1%  -65.58% (p=0.000 n=10)
    IterAll/descending_keys/n=2048-12    17.414µ ± 16%   7.964µ ± 4%  -54.27% (p=0.000 n=10)
    IterAll/descending_keys/n=65536-12    621.1µ ± 12%   338.9µ ± 3%  -45.45% (p=0.000 n=10)
    geomean                                                           -52.90%
    
  • 5477: Use row data hash to determine if table delta data changed
  • 5476: dolt diff behavior for dolt_schema table updated show DDL changes
    https://github.com/dolthub/dolt/issues/5388
    Example new behavior:
    lcl:~/Documents/data_dir_1/db1$ dolt diff HEAD~4 HEAD~3 dolt_schemas
    diff --dolt a/dolt_schemas b/dolt_schemas
    --- a/dolt_schemas @ p4j8pfq3pmub8fmketaes8ek0ghvgg1s
    +++ b/dolt_schemas @ bkf872if6l5jd79ue0130c90u8qh5o36
    create view males
    -as select first_name
    +as select first_name,last_name
    from people
    where gender = "M";
    
    lcl:~/Documents/data_dir_1/db1$ dolt diff HEAD~2 HEAD dolt_schemas
    diff --dolt a/dolt_schemas b/dolt_schemas
    --- a/dolt_schemas @ m12an7km8tnft6hole0185ds1d91n5is
    +++ b/dolt_schemas @ l8sa0c199fmng777t3v6mtjrfs1h5vdp
    CREATE TRIGGER avg_age AFTER INSERT ON people
    for each row
    -  update average_age set average = (SELECT AVG(age));
    +  update average_age set average = (SELECT AVG(age) FROM people);
    
    lcl:~/Documents/data_dir_1/db1$ dolt diff HEAD~5 HEAD dolt_schemas
    diff --dolt a/dolt_schemas b/dolt_schemas
    --- a/dolt_schemas @ 8nlac0sjnoetmcv01ps7phe5bp6mf9p3
    +++ b/dolt_schemas @ l8sa0c199fmng777t3v6mtjrfs1h5vdp
    +CREATE TRIGGER avg_age AFTER INSERT ON people
    +for each row
    +  update average_age set average = (SELECT AVG(age) FROM people);
    +create view males
    +as select first_name,last_name
    +from people
    +where gender = "M";
    lcl:~/Documents/data_dir_1/db1$ dolt diff HEAD HEAD~5 dolt_schemas
    diff --dolt a/dolt_schemas b/dolt_schemas
    --- a/dolt_schemas @ l8sa0c199fmng777t3v6mtjrfs1h5vdp
    +++ b/dolt_schemas @ 8nlac0sjnoetmcv01ps7phe5bp6mf9p3
    -CREATE TRIGGER avg_age AFTER INSERT ON people
    -for each row
    -  update average_age set average = (SELECT AVG(age) FROM people);
    -create view males
    -as select first_name,last_name
    -from people
    -where gender = "M";
    
  • 5460: Include all diff columns when a table is created or dropped
    https://github.com/dolthub/dolt/issues/5439
  • 5450: MySQL replication fixes for START/STOP REPLICA
    I found a few places where START REPLICA and STOP REPLICA weren't working correctly. There were two major cases where the binlog replication applier routine was blocking and not processing the stopReplication signal:
    • during connection retry and backoff
    • while blocking and waiting to read more binlog events over the MySQL connection
      I restructured how those cases work, including pulling out a separate goroutine that makes the blocking conn.ReadBinlogEvent() call and then feeds the results back to the applier routine through channels.
  • 5430: go/store/nbs: turn on chunk journal by default
  • 5422: add dolt stash
    First pass on dolt stash commands include:
    • dolt stash
    • dolt stash pop [<stash>]
    • dolt stash drop [<stash>]
    • dolt stash clear
    • dolt stash list
      No optional flags are supported for above commands.
      Staged changes are not handled in this version.
      Available only as CLI commands

go-mysql-server

  • 1638: Fixing incorrect size for SOURCE_HOST member of SHOW REPLICA STATUS
  • 1637: Workaround for Issue 5482
    This is a workaround for https://github.com/dolthub/dolt/issues/5482. This isn't a true fix as the behavior is wrong, but will at least unblock the user. I'm currently working on proper collation coercion handling, so this will be replaced in relatively short order.
  • 1635: Better error message for cannot drop index
  • 1634: add support for EXTRACT
    fix for: https://github.com/dolthub/dolt/issues/3006
    We don't support 0 for year, month, day, but MySQL does...
    I didn't fix here, because it seems to be a problem stemming from the time library, and the behavior is consistent with our existing DAY(), MONTH() and YEAR() functions.
  • 1631: Nil operand in outer join smarter about identifying nil's source rel
    We falsely attributed a nil operand to the left relation, early triggering the left outer join nil return path. Rather than iterate the row from left to right, use the comparison expression to directly evaluate for whether left comparison expr is nil.
  • 1630: Fix update resolve table bug
  • 1629: add support for ! and fix NOT operator not working for UPDATE trigger
    • ! was not supported for IF clause in TRIGGER statements
    • NOT clause was not working for UPDATE TRIGGER statements
  • 1625: return error for attempting to drop view with drop table statement
    • using DROP TABLE to drop view returns error
    • dropping non existent table with DROP TABLE IF EXISTS creates note warning.
  • 1605: Fix permissions on all Go files
    Some of the .go files don't have the usual 0644 permissions.
    Fix the permissions of all .go files:
    git ls-files | grep '.go$' | xargs chmod 0644
  • 1604: memory: use map lookup for rename index
    Slight improvement in the memory/ db implementation, instead of iterating over all the indexes, use a map lookup.
  • 1603: driver/: implement last insert id for ok result
    Fixes #1602

vitess

Closed Issues

  • 5519: Aliases in UPDATE query leads to error
  • 5481: update join combined with CTE throws error
  • 5388: dolt_schemas elements should show as equivalent SQL statements during dolt diff
  • 5482: Cannot connect using MySQL client due to error: Illegal mix of collations
  • 3006: Support the EXTRACT function
  • 5439: dolt_diff() missing from_ columns when table created
  • 573: Implement dolt stash
  • 5392: Latest dolt panics when dealing with nested aliases
  • 1860: support dolt clone file:///somepath-to-a-dolt-repo
  • 4925: DBeaver does not support updating a branch
  • 4380: Random failure during push, when folder is on removable media
  • 4406: JSON default column normalization issue causing merge conflict
  • 4352: Writes using branch reference syntax (ie. <db>/<branch>) should fail
  • 4094: dolt sql-server option to disable dolt write functions
  • 4101: Restrict dolt_commit and dolt_reset in read-only mode
  • 2429: Intra-column diff for text / JSON fields
  • 1311: dolt_schemas should be protected from DROP TABLE ...
  • 5434: DROP TABLE should return an error if a view is given
  • 5470: Error: "unsupported feature: unary operator: !" in IF in trigger definition
  • 1602: driver/: LastInsertId is not supported

Latency

Read Tests MySQL Dolt Multiple
covering_index_scan 1.93 2.66 1.4
groupby_scan 12.3 16.41 1.3
index_join 1.21 4.25 3.5
index_join_scan 1.16 2.07 1.8
index_scan 30.81 52.89 1.7
oltp_point_select 0.15 0.48 3.2
oltp_read_only 2.97 8.58 2.9
select_random_points 0.3 0.74 2.5
select_random_ranges 0.36 1.14 3.2
table_scan 31.37 53.85 1.7
types_table_scan 70.55 158.63 2.2
reads_mean_multiplier 2.3
Write Tests MySQL Dolt Multiple
bulk_insert 0.001 0.001 1.0
oltp_delete_insert 5.67 5.88 1.0
oltp_insert 2.66 2.86 1.1
oltp_read_write 6.79 15.55 2.3
oltp_update_index 2.81 3.02 1.1
oltp_update_non_index 2.76 2.86 1.0
oltp_write_only 3.89 7.43 1.9
types_delete_insert 5.18 6.67 1.3
writes_mean_multiplier 1.3
Overall Mean Multiple 1.9
dolt - 0.54.2

Published by github-actions[bot] over 1 year ago

Merged PRs

dolt

  • 5475: proto/third_party: Bump versions.
  • 5474: go/libraries/doltcore/remotesrv: Add some rudimentary input validation on request messages.
  • 5472: go/store/nbs: fix re-entrant deadlock in journal_writer
  • 5469: bug fix: binlog multi-db support
    We were missing the call to set the session's current database for binlog Query events. This was causing queries to execute against the wrong database when using binlog replication with multiple databases. Our binlog tests didn't catch this because the multi-db tests used fully qualified table names, so it didn't matter what database was currently selected.
    This change adds the call to set the current database and updates the multi-db tests to use a mix of use statements and fully qualified table names (and also cleans up some of our query error logging to make log output more helpful for debugging).
  • 5461: go/doltcore/migrate: modify migrated tuples sink to sort incoming tuples
    #4221 alters tuple ordering for NBF __LD_1__ to sort NULL fields last. In NBF __DOLT__, NULL fields are ordered first. This change to dolt migrate sorts migrated tuples on-the-fly to compensate for this mismatch
  • 5347: add stash to clientEventType

go-mysql-server

  • 1629: add support for ! and fix NOT operator not working for UPDATE trigger
    • ! was not supported for IF clause in TRIGGER statements
    • NOT clause was not working for UPDATE TRIGGER statements
  • 1627: Made signal statements work with user vars
    Fixes https://github.com/dolthub/dolt/issues/5452

Closed Issues

  • 5379: Running a GetRepoMetadata request against the remotesrv within the sql-server, without data crashes the sql-server
  • 5470: Error: "unsupported feature: unary operator: !" in IF in trigger definition
  • 3770: Support DELETE JOINs
  • 5452: dolt sql fails fails with "syntax error" on importing a trigger definition
  • 5453: dolt panics in query "unknown type" in memo.go

Latency

Read Tests MySQL Dolt Multiple
covering_index_scan 1.93 2.66 1.4
groupby_scan 12.3 16.41 1.3
index_join 1.16 4.18 3.6
index_join_scan 1.12 2.07 1.8
index_scan 30.26 51.94 1.7
oltp_point_select 0.15 0.48 3.2
oltp_read_only 3.02 8.43 2.8
select_random_points 0.3 0.74 2.5
select_random_ranges 0.35 1.12 3.2
table_scan 30.81 52.89 1.7
types_table_scan 69.29 158.63 2.3
reads_mean_multiplier 2.3
Write Tests MySQL Dolt Multiple
bulk_insert 0.001 0.001 1.0
oltp_delete_insert 2.61 12.3 4.7
oltp_insert 1.32 2.91 2.2
oltp_read_write 5.0 17.63 3.5
oltp_update_index 1.34 6.09 4.5
oltp_update_non_index 1.34 6.67 5.0
oltp_write_only 2.14 8.9 4.2
types_delete_insert 2.76 13.22 4.8
writes_mean_multiplier 3.7
Overall Mean Multiple 2.9
dolt - 0.54.1

Published by github-actions[bot] over 1 year ago

Merged PRs

dolt

go-mysql-server

  • 1627: Made signal statements work with user vars
    Fixes https://github.com/dolthub/dolt/issues/5452
  • 1624: Update logger field when a session's database is changed
    We use a connectionDb field to log the session's current database, but we don't always consistently update that logger field in every place where we set the session's current db. This change moves that logger field update directly into BaseSession.SetCurrentDatabase(string) to ensure it always stays in sync.
  • 1619: Memo includes costs and stars best plan
    Debugger memo print includes physical expression incremental processing costs, and stars the group best. The value corresponds to the incremental processing delta of executing an operator compared to a sequential processing of the inputs. The total for a group will be the group costs plus child group costs (recursively).
    Example:
    memo:
    ├── G1: (tableAlias: r 11444774.0)*
    ├── G2: (tableAlias: i 161.0)*
    ├── G3: (mergeJoin 1 2 114447.7) (mergeJoin 2 1 1.6) (hashJoin 1 2 114930.7) (hashJoin 2 1 34334323.6) (lookupJoin 1 2 23003834.7) (lookupJoin 2 1 -11444450.2)* (innerJoin 2 1 1861034699.1) (innerJoin 1 2 1861034699.1)
    ├── G4: (tableAlias: c 12293.0)*
    ├── G5: (hashJoin 3 4 36879.2) (hashJoin 2 12 4058.3) (hashJoin 12 2 496.5) (hashJoin 4 3 176.1) (lookupJoin 3 4 -12257.4)* (lookupJoin 12 2 2557.0) (innerJoin 4 3 219885.1) (innerJoin 12 2 219885.1) (innerJoin 2 12 219885.1) (innerJoin 3 4 219885.1)
    ├── G6: (tableAlias: pm 646.0)*
    ├── G7: (hashJoin 5 6 1938.0) (hashJoin 2 15 22.9) (hashJoin 15 2 483.1) (hashJoin 4 14 128.2) (hashJoin 14 4 36879.0) (hashJoin 6 5 11.8) (lookupJoin 5 6 -642.4) (lookupJoin 15 2 -146.7) (lookupJoin 14 4 -12289.4)* (innerJoin 6 5 1154.5) (innerJoin 14 4 21987.6) (innerJoin 4 14 21987.6) (innerJoin 15 2 1154.5) (innerJoin 2 15 1154.5) (innerJoin 5 6 1154.5)
    ├── G8: (tableAlias: trf 39874374.0)*
    ├── G9: (hashJoin 7 8 119623122.0) (hashJoin 2 22 3.7) (hashJoin 22 2 483.0) (hashJoin 4 21 123.5) (hashJoin 21 4 36879.0) (hashJoin 6 19 7.0) (hashJoin 19 6 1938.0) (hashJoin 8 7 398744.3) (lookupJoin 7 8 -39874373.6) (lookupJoin 22 2 -159.6) (lookupJoin 21 4 -12292.6) (lookupJoin 19 6 -645.6)* (innerJoin 8 7 7132368.2) (innerJoin 19 6 114.6) (innerJoin 6 19 114.6) (innerJoin 21 4 2197.9) (innerJoin 4 21 2197.9) (innerJoin 22 2 114.6) (innerJoin 2 22 114.6) (innerJoin 7 8 7132368.2)
    ├── G10: (tableAlias: nt 8735.0)*
    ├── G11: (hashJoin 9 10 26205.0) (hashJoin 2 30 1.8) (hashJoin 30 2 483.0) (hashJoin 4 29 123.0) (hashJoin 29 4 36879.0) (hashJoin 6 27 6.5) (hashJoin 27 6 1938.0) (hashJoin 7 23 2882.6) (hashJoin 23 7 10.1) (hashJoin 10 9 87.4) (lookupJoin 9 10 -8735.0)* (lookupJoin 30 2 -160.8) (lookupJoin 29 4 -12293.0) (lookupJoin 27 6 -646.0) (innerJoin 10 9 155.2) (innerJoin 23 7 170.9) (innerJoin 7 23 170.9) (innerJoin 27 6 11.7) (innerJoin 6 27 11.7) (innerJoin 29 4 240.9) (innerJoin 4 29 240.9) (innerJoin 30 2 11.7) (innerJoin 2 30 11.7) (innerJoin 9 10 155.2)
    ├── G12: (mergeJoin 1 4 114447.7) (mergeJoin 4 1 122.9) (hashJoin 1 4 151326.7) (hashJoin 4 1 34334444.9) (lookupJoin 1 4 22991702.7) (lookupJoin 4 1 -11420052.8)* (innerJoin 4 1 142097512848.8) (innerJoin 1 4 142097512848.8)
    ├── G13: (mergeJoin 1 6 114447.7) (mergeJoin 6 1 6.5) (hashJoin 1 6 116385.7) (hashJoin 6 1 34334328.5) (lookupJoin 1 6 23003349.7) (lookupJoin 6 1 -11443474.9)* (innerJoin 6 1 7467257243.0) (innerJoin 1 6 7467257243.0)
    ├── G14: (hashJoin 2 13 214.8) (hashJoin 13 2 483.7) (hashJoin 3 6 1938.2) (hashJoin 6 3 59.6) (lookupJoin 13 2 -18.2) (lookupJoin 3 6 -610.4)* (innerJoin 6 3 11554.1) (innerJoin 3 6 11554.1) (innerJoin 13 2 11554.1) (innerJoin 2 13 11554.1)
    ├── G15: (hashJoin 4 13 336.1) (hashJoin 13 4 36879.7) (hashJoin 12 6 1951.5) (hashJoin 6 12 4063.2) (lookupJoin 13 4 -12150.2)* (lookupJoin 12 6 2072.0) (innerJoin 6 12 882275.0) (innerJoin 12 6 882275.0) (innerJoin 13 4 882275.0) (innerJoin 4 13 882275.0)
    ├── G16: (mergeJoin 1 8 114447.7) (mergeJoin 8 1 398743.7) (hashJoin 1 8 119737569.7) (hashJoin 8 1 34733065.7) (lookupJoin 1 8 -16870378.3)* (lookupJoin 8 1 68702717.7) (innerJoin 8 1 460916730809689.8) (innerJoin 1 8 460916730809689.8)
    ├── G17: (hashJoin 2 16 3433433.8) (hashJoin 16 2 11927.8) (hashJoin 3 8 119623122.2) (hashJoin 8 3 398796.9) (lookupJoin 16 2 2300238.6) (lookupJoin 3 8 -39874338.4)* (innerJoin 8 3 713236914.2) (innerJoin 3 8 713236914.2) (innerJoin 16 2 186103469.0) (innerJoin 2 16 186103469.0)
    ├── G18: (hashJoin 4 16 3433555.1) (hashJoin 16 4 48323.8) (hashJoin 12 8 119623135.5) (hashJoin 8 12 402800.4) (lookupJoin 16 4 2288106.6) (lookupJoin 12 8 -39871656.0)* (innerJoin 8 12 54458518000.6) (innerJoin 12 8 54458518000.6) (innerJoin 16 4 14209751284.0) (innerJoin 4 16 14209751284.0)
    ├── G19: (hashJoin 2 18 407.3) (hashJoin 18 2 484.4) (hashJoin 4 17 128.2) (hashJoin 17 4 36879.0) (hashJoin 5 8 119623122.0) (hashJoin 8 5 398749.1) (lookupJoin 18 2 110.8) (lookupJoin 17 4 -12289.4)* (lookupJoin 5 8 -39874370.4) (innerJoin 8 5 71323690.5) (innerJoin 5 8 71323690.5) (innerJoin 17 4 21987.6) (innerJoin 4 17 21987.6) (innerJoin 18 2 21987.6) (innerJoin 2 18 21987.6)
    ├── G20: (hashJoin 6 16 3433438.7) (hashJoin 16 6 13382.8) (hashJoin 13 8 119623122.7) (hashJoin 8 13 398956.9) (lookupJoin 16 6 2299753.6) (lookupJoin 13 8 -39874231.2)* (innerJoin 8 13 2861807745.6) (innerJoin 13 8 2861807745.6) (innerJoin 16 6 746725723.4) (innerJoin 6 16 746725723.4)
    ├── G21: (hashJoin 2 20 22.9) (hashJoin 20 2 483.1) (hashJoin 6 17 11.8) (hashJoin 17 6 1938.0) (hashJoin 14 8 119623122.0) (hashJoin 8 14 398749.1) (lookupJoin 20 2 -146.7) (lookupJoin 17 6 -642.4)* (lookupJoin 14 8 -39874370.4) (innerJoin 8 14 71323690.5) (innerJoin 14 8 71323690.5) (innerJoin 17 6 1154.5) (innerJoin 6 17 1154.5) (innerJoin 20 2 1154.5) (innerJoin 2 20 1154.5)
    ├── G22: (hashJoin 4 20 144.2) (hashJoin 20 4 36879.1) (hashJoin 6 18 412.1) (hashJoin 18 6 1939.4) (hashJoin 15 8 119623122.1) (hashJoin 8 15 398765.1) (lookupJoin 20 4 -12278.7) (lookupJoin 18 6 -374.2) (lookupJoin 15 8 -39874359.7)* (innerJoin 8 15 286180773.7) (innerJoin 15 8 286180773.7) (innerJoin 18 6 88226.6) (innerJoin 6 18 88226.6) (innerJoin 20 4 88226.6) (innerJoin 4 20 88226.6)
    ├── G23: (mergeJoin 8 10 398743.7) (mergeJoin 10 8 87.4) (hashJoin 8 10 424948.7) (hashJoin 10 8 119623209.3) (lookupJoin 8 10 80178631.1) (lookupJoin 10 8 -39856807.9)* (innerJoin 10 8 351785683457.9) (innerJoin 8 10 351785683457.9)
    ├── G24: (hashJoin 1 23 117330.3) (hashJoin 23 1 34334331.6) (hashJoin 16 10 37649.8) (hashJoin 10 16 3433519.6) (lookupJoin 23 1 -11442842.7)* (lookupJoin 16 10 2292809.1) (innerJoin 10 16 10096980188.9) (innerJoin 16 10 10096980188.9) (innerJoin 23 1 11106678207.9) (innerJoin 1 23 11106678207.9)
    ├── G25: (hashJoin 2 24 289.9) (hashJoin 24 2 484.0) (hashJoin 3 23 2882.7) (hashJoin 23 3 62.7) (hashJoin 17 10 26205.0) (hashJoin 10 17 92.7) (lookupJoin 24 2 32.1) (lookupJoin 17 10 -8731.4)* (innerJoin 10 17 15623.4) (innerJoin 17 10 15623.4) (innerJoin 23 3 17185.8) (innerJoin 3 23 17185.8) (innerJoin 24 2 15623.4) (innerJoin 2 24 15623.4)
    ├── G26: (hashJoin 4 24 411.2) (hashJoin 24 4 36880.0) (hashJoin 12 23 2896.1) (hashJoin 23 12 4066.3) (hashJoin 18 10 26206.4) (hashJoin 10 18 493.0) (lookupJoin 24 4 -12099.9)* (lookupJoin 18 10 -8463.1) (innerJoin 10 18 1192983.6) (innerJoin 18 10 1192983.6) (innerJoin 23 12 1312282.1) (innerJoin 12 23 1312282.1) (innerJoin 24 4 1192983.6) (innerJoin 4 24 1192983.6)
    ├── G27: (hashJoin 2 26 30.4) (hashJoin 26 2 483.1) (hashJoin 4 25 123.5) (hashJoin 25 4 36879.0) (hashJoin 5 23 2882.6) (hashJoin 23 5 14.9) (hashJoin 19 10 26205.0) (hashJoin 10 19 87.9) (lookupJoin 26 2 -141.7) (lookupJoin 25 4 -12292.6) (lookupJoin 19 10 -8734.6)* (innerJoin 10 19 1561.4) (innerJoin 19 10 1561.4) (innerJoin 23 5 1717.7) (innerJoin 5 23 1717.7) (innerJoin 25 4 2417.7) (innerJoin 4 25 2417.7) (innerJoin 26 2 1561.4) (innerJoin 2 26 1561.4)
    ├── G28: (hashJoin 6 24 294.7) (hashJoin 24 6 1939.0) (hashJoin 13 23 2883.3) (hashJoin 23 13 222.8) (hashJoin 20 10 26205.1) (hashJoin 10 20 108.7) (lookupJoin 24 6 -452.9) (lookupJoin 20 10 -8720.7)* (innerJoin 10 20 62690.6) (innerJoin 20 10 62690.6) (innerJoin 23 13 68959.8) (innerJoin 13 23 68959.8) (innerJoin 24 6 62690.6) (innerJoin 6 24 62690.6)
    ├── G29: (hashJoin 2 28 4.0) (hashJoin 28 2 483.0) (hashJoin 6 25 7.0) (hashJoin 25 6 1938.0) (hashJoin 14 23 2882.6) (hashJoin 23 14 14.9) (hashJoin 21 10 26205.0) (hashJoin 10 21 87.9) (lookupJoin 28 2 -159.4) (lookupJoin 25 6 -645.6) (lookupJoin 21 10 -8734.6)* (innerJoin 10 21 1561.4) (innerJoin 21 10 1561.4) (innerJoin 23 14 1717.7) (innerJoin 14 23 1717.7) (innerJoin 25 6 126.1) (innerJoin 6 25 126.1) (innerJoin 28 2 126.1) (innerJoin 2 28 126.1)
    └── G30: (hashJoin 4 28 125.3) (hashJoin 28 4 36879.0) (hashJoin 6 26 35.3) (hashJoin 26 6 1938.1) (hashJoin 15 23 2882.6) (hashJoin 23 15 30.9) (hashJoin 22 10 26205.0) (hashJoin 10 22 89.5) (lookupJoin 28 4 -12291.4) (lookupJoin 26 6 -626.7) (lookupJoin 22 10 -8733.6)* (innerJoin 10 22 6268.2) (innerJoin 22 10 6268.2) (innerJoin 23 15 6895.1) (innerJoin 15 23 6895.1) (innerJoin 26 6 6268.2) (innerJoin 6 26 6268.2) (innerJoin 28 4 9704.0) (innerJoin 4 28 9704.0)
    
  • 1608: Delete Join Support
    Adds support for multi-table deletes.
    Dolt CI Tests: https://github.com/dolthub/dolt/pull/5406

    Remaining Work:

    Triggers: Trigger execution needs some refactoring in order to support: 1) updating GetField indexes in the trigger logic to account for a larger row coming into the TriggerExecutor when multiple tables are joined together, and 2) running triggers for multiple tables on the same child row from the wrapped iterator.
    Currently, if triggers are needed for a DELETE JOIN statement, the query will return an error message about the lack of support (engine tests assert this, too).
    Triggers are not currently supported for UPDATE JOIN statements either (https://github.com/dolthub/dolt/issues/5400); we should look at both of these together in a follow up PR, since TriggerExecutor will need the same changes to support both of these.
  • 1595: Attempt to identify and fix alias ambiguity issues with subqueries.
    Fixes https://github.com/dolthub/dolt/issues/5138
    The new file sql/analyzer/aliases_disambiguate.go has a header with documentation on how the new rule works.

vitess

  • 223: Made signal conditions accept vars
    Partially addresses https://github.com/dolthub/dolt/issues/5452
  • 222: Added known dynamic privileges
    Getting a general STRING rule to work without running into shift/reduce errors proved too time consuming, so I just added all known dynamic privileges according to MySQL's documentation (except SUPER_USER, which is also giving errors).

Closed Issues

dolt - 0.54.0

Published by github-actions[bot] over 1 year ago

Merged PRs

dolt

  • 5457: Panic fix for nil dolt env in multi repo env
  • 5448: Add from_table_name and to_table_name columns to dolt_diff_summary table function
    • Also fixes dolt_status system table output for renamed tables
    • Table name in dolt diff --summary CLI command for renamed table uses arrow syntax (i.e. from_table -> to_table)
  • 5440: go/store/nbs: file_table_persister: Rework PruneTableFiles so that writes can proceed while we cleanup the old files.
  • 5438: go/store/nbs: file_table_persister: Add a mechanism for a table persister to clean up newly unused sources after a successful conjoin.
  • 5413: add dolt_patch() stored procedure
    The result of dolt_patch() stored procedure is equivalent to dolt diff -r sql.
    The input to dolt_patch() stored procedure is dolt_patch(<from_revision>, <to_revision>, [<tablename>]), which are optional 2 revisions and optional table names.
    It does not support two and three dot diffs.
    Only --cached flag is supported for now.
    It returns both schema and data diff result.
    Error cases of not being able to get data diff go into warning.

go-mysql-server

  • 1623: Fixed Issue #1621
    When using the example server, we had primary key indexes disabled for the in-memory database, so this just enables them as that is what people would expect.
  • 1622: fix / and div operations on value of decimal type column
    The cases fixed are:
    • the scale of decimal type column is bigger than the value stored. For example, the decimal column type is DECIMAL(25,10) and the value stored is 4990. This value is evaluated with 0 scale, whereas this should be evaluated as value with scale of 10.
    • the IntPart() function of decimal package returns 0 as undefined value for out of range values. This causes it hard to differentiate between cases where the final result is valid value of 0 and the final result is out of range value.
  • 1620: expose some parts of show create table statement for dolt usage
  • 1619: Memo includes costs and stars best plan
  • 1617: Adding privilege checks for binlog commands
    Added support for binlog replication privilege checks, tests to assert dynamic privileges are only used at a global scope, and opChecker support for testing dynamic privileges.
  • 1615: update drop column logic to drop constraints first
    Updates the ordering of the drop column logic to ensure that constraints always get checked for references and dropped when columns are dropped.

Closed Issues

  • 5138: Alias scope issue
  • 5369: unexpected error when using div operation
  • 1621: Missing index for foreign key error
dolt - 0.53.2

Published by github-actions[bot] over 1 year ago

Merged PRs

dolt

  • 5428: Add support for using full length commit ids in hashof() procedure
  • 5423: updates reset script to disable foreign_key_checks temporarily
    Currently, when reset scripts run between Prepared Script Tests errors will occur as tables with foreign keys get dropped and re-added. This change disables foreign key checks while tables are being dropped and re-added as to avoid these foreign key errors.
  • 5421: Add new version of dolt_diff_summary table function
    The old version of the dolt_diff_summary table function was renamed to dolt_diff_stat
    This new version of dolt_diff_summary returns a summary of changed tables between two refs
    us_jails> select * from dolt_diff_summary("WORKING", "taylor/test");
    +-----------------------------+-----------+-------------+---------------+
    | table_name                  | diff_type | data_change | schema_change |
    +-----------------------------+-----------+-------------+---------------+
    | jails                       | modified  | true        | false         |
    | test                        | dropped   | false       | true          |
    | inmate_population_snapshots | added     | true        | true          |
    +-----------------------------+-----------+-------------+---------------+
    3 rows in set (0.01 sec)
    
  • 5420: Add new version of --summary option to dolt diff
    The old version of dolt diff --summary was renamed to dolt diff --stat
    This new version of dolt diff --summary returns a summary of what tables changed/how between two refs
    us-jails % dolt diff --summary
    +-----------------------------+-----------+-------------+---------------+
    | Table name                  | Diff type | Data change | Schema change |
    +-----------------------------+-----------+-------------+---------------+
    | inmate_population_snapshots | dropped   | true        | true          |
    | jails                       | modified  | true        | false         |
    | test                        | added     | false       | true          |
    +-----------------------------+-----------+-------------+---------------+
    
  • 5415: Bump golang.org/x/text from 0.3.3 to 0.3.8 in /go/gen/proto/dolt/services/eventsapi
    Bumps golang.org/x/text from 0.3.3 to 0.3.8.
  • 5409: Rename diff summary to diff stat
    CLI: dolt diff --summary -> dolt diff --stat
    SQL: dolt_diff_summary -> dolt_diff_stat
  • 5408: binlog bug fixes – stripping checksums and applying Query flags
    This PR fixes a couple of issues from binlog testing:

    Query flags

    Now that we have visibility to the additional flags in the Query binlog event (https://github.com/dolthub/vitess/pull/220), this PR adds handling for those flags.

    Checksum support

    To receive messages from the primary when binlog_checksums are enabled, the replica now sends a handshake signal to the primary and strips off any received checksum on binlog events. This lets us remove the requirement to disable checksums on the primary in order to use Dolt's binlog replication.

    Password auth for tests

    This PR also includes a change in the test code for the replica connect to the primary with a password, to ensure we're testing password auth.
  • 5407: Restored some needed images
  • 5403: Pruned docs directory. Renamed it images.
    It was stale.
  • 5393: go/store/nbs: use chunk journal index to speedup bootstrapping
  • 5360: go/doltcore/migrate: write table for migrated commit mapping
    Changes dolt migrate to write a special branch called migrated_commits containing a single table mapping with the schema:
    CREATE TABLE `mapping` (
    `old_commit_hash` varchar(16383) NOT NULL,
    `new_commit_hash` varchar(16383),
    PRIMARY KEY (`old_commit_hash`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin
    
  • 5335: Line-based diffs for modified rows
    This adds special git-style diffs for stored procedures. There are two modes. The default displays line changes with the familiar + and - prepended to each line. The second requires the flag --proc-in-place, and shows the changes in-place with the color signifying the change.

go-mysql-server

  • 1614: Bump golang.org/x/text from 0.3.7 to 0.3.8
    Bumps golang.org/x/text from 0.3.7 to 0.3.8.
  • 1611: Added support for dynamic privileges
  • 1610: Project reports correct outputCols
  • 1609: Added missing analyzer rule for block expressions
    Fixes https://github.com/dolthub/dolt/issues/5390
  • 1601: allow safe drops when column is referenced in check constraint
    MySQL allows columns which are referenced in check constraints to be dropped if they are the only column referenced in the constraint. This change updates dolt to match this behavior.
    fixes: https://github.com/dolthub/dolt/issues/3147
  • 1558: apply spatial index lookup
    Changes:
    • Add support for displaing SPATIAL KEY for SHOW CREATE TABLE.
    • Allow IndexedTableAccess for in-memory tables that have spatial indexes
    • dolt pr with interface changes: https://github.com/dolthub/dolt/pull/5164
    • added new testing suite for Spatial Indexes
    • some fixes to prepared queries for filtered tables

vitess

  • 222: Added known dynamic privileges
    Getting a general STRING rule to work without running into shift/reduce errors proved too time consuming, so I just added all known dynamic privileges according to MySQL's documentation (except SUPER_USER, which is also giving errors).
  • 220: Exposing SQL Option and SQL Mode flags for Query events
    Query binlog events are sent from the primary when the replica needs to execute a SQL statement directly. This is only for DDL operations, since DML operations are handled with a structured data message that indicates exactly which rows changed.
    There's extra metadata passed in Query binlog messages that wasn't getting exposed by Vitess that we need to execute the statements correctly (e.g. foreign_key_checks disabled). This PR exposes the SQL Options and SQL Mode metadata so that we can access them from Dolt.

Closed Issues

  • 4751: View overview of table changes between revisions
  • 5427: Connecting via linux mysql client won't accept password as '-p' option
  • 5390: panic on stored procedure call
  • 3147: Dolt does not allow the dropping of a column with check constraint
  • 251: LastInsertId always returns 0

Latency

Read Tests MySQL Dolt Multiple
covering_index_scan 1.96 2.76 1.4
groupby_scan 12.08 16.41 1.4
index_join 1.16 4.18 3.6
index_join_scan 1.12 2.07 1.8
index_scan 30.81 52.89 1.7
oltp_point_select 0.15 0.48 3.2
oltp_read_only 3.02 8.58 2.8
select_random_points 0.3 0.74 2.5
select_random_ranges 0.35 1.12 3.2
table_scan 31.37 54.83 1.7
types_table_scan 69.29 161.51 2.3
reads_mean_multiplier 2.3
Write Tests MySQL Dolt Multiple
bulk_insert 0.001 0.001 1.0
oltp_delete_insert 3.02 11.87 3.9
oltp_insert 1.55 2.97 1.9
oltp_read_write 5.37 17.95 3.3
oltp_update_index 1.7 5.67 3.3
oltp_update_non_index 1.58 5.77 3.7
oltp_write_only 2.48 8.9 3.6
types_delete_insert 3.19 11.87 3.7
writes_mean_multiplier 3.1
Overall Mean Multiple 2.6
dolt - 0.53.1

Published by github-actions[bot] over 1 year ago

Merged PRs

dolt

  • 5398: go/commands/engine: get NBF from database provider
  • 5396: go/commands/engine: set analyzer parallelism to 1
  • 5391: Fixes comments in entrypoint
    Fixes comments in entrypoint
    Actually server starts at line 151 https://github.com/dolthub/dolt/pull/5391/files#diff-7cfc2aa3796f096105480a1a669658cfc12d2688b6300eef89d9ce94eef44e26L151
  • 5386: go/store/nbs: aws_table_persister.go: Fix conjoin code to not error on a single short Read() by using io.ReadFull.
    In #5307 we started returning a real io.Reader for chunkSource.reader(ctx). That means the Read() calls can come back short if they are directly attached to a net.TCPConn, for example. It is not an error for a Read() to come back short. Use io.ReadFull to correctly express the intent in the conjoin code for AWS remotes.
    Fixes a bug where doltremoteapi fails commits sometimes.
  • 5383: Emit schema elements from dolt_schemas table as their DDL equivalents during dolt dump
    Fixes #5318
  • 5381: Bump golang.org/x/net from 0.2.0 to 0.7.0 in /go
    Bumps golang.org/x/net from 0.2.0 to 0.7.0.
  • 5380: dolt_diff respects qualified database
    This change corrects the dolt_diff system table to use the qualified database if provided instead of always defaulting to the session's current database.
    fixes: https://github.com/dolthub/dolt/issues/5226
  • 5374: go/store/nbs: Fix some quota leaks in conjoin, GC.
    Adds a paranoid mode where we noisely detect unclosed table files. The mode can be enabled by setting an environment variable.
    Fixes some unit tests, including all of go/store/... to run cleanly under the paranoid mode.
    Changes the quota interface to:
    • Release |sz int| bytes instead of requiring a []byte with the correct length to show up.
    • Work with |int| instead of |uint64|, since MaxUint64 is never allocatable and MaxInt32+z is only allocatable on 64-bit platforms.
    • Not return an error on Release(). Implementations should not fail to release quota.
  • 5373: go/store/nbs: rename chunks journal constants in preparation for jour…
    …nal index
  • 5368: Make dropping and adding the same view produce no diff
    Fixes #5313
    Also made dropping all views (and triggers) cause the dolt_schemas table to delete itself, so that you can create views and then drop them without causing a diff.
  • 5367: ArtifactEditor now resets after flushing
    ArtifactEditor held on to keys after flushing because it was a value receiver. Under the capacity threshold, constraint violations only flush once and we bypass this bug. For >50k constraint violations, every incremental CV will write the previous duplicate 40k CV's.
  • 5365: Handle multiple lines in tabular diffs
    This changes our tabular output so that multiline strings display in a consistent manner. This will allow us to properly display text diffs as previewed in https://github.com/dolthub/dolt/pull/5335. Modifications to that PR will follow this one.
    This is how diffs will look like with this PR:
    image
    Performance-wise, I tested a SELECT over 5000 rows with two text columns containing all multiline strings for every row, and I averaged around 10% faster than the old implementation. We now sample every 100 rows rather than only the first 100, and this makes each local chunk of 100 rows visually consistent. In addition, I've cut down on the amount of formatting that is done to the columns, which is what I believe is the source of the speed increase.
    As a side benefit, dolt sql-client uses the same tabular output logic, so now our SQL client will handle multiline strings from any compatible database, not just Dolt. The default MySQL client behaves like our old implementation, so I think this is another cool win.
  • 5362: Tweaks to README for binlog replication launch
  • 5353: Bump github.com/aws/aws-sdk-go from 1.33.0 to 1.34.0 in /go
    Bumps github.com/aws/aws-sdk-go from 1.33.0 to 1.34.0.
  • 5346: Block schema import when table has rows
    Fixes #1850
  • 5327: print something for FK diffs
    It is possible to commit foreign keys that haven't been resolved yet.
    If there are differences in the column tags referenced in a foreign key, but not in the tables' schemas, our diffs are blank (even the hashes are the same).
    This just prints that something was modified for the affected foreign keys.
  • 5164: implement spatial indexes
    Changes:
    • Add feature flag to enabled spatial indexes: DOLT_ENABLE_SPATIAL_INDEX
    • Changes to flatbuffer stuff to read/write spatial indexes
    • First pass at naive and unoptimized implementation of Spatial Indexes
    • Tests for Spatial Indexes, Spatial Index Plans, and their Prepared counterparts (some are skipped)
    • Contains some fixes for typeinfo not retaining SRID information for multi-geometries
    • Changes to fix some diff table prepared issues
      Companion PR: https://github.com/dolthub/go-mysql-server/pull/1558
      Note: prepared test that I changed here had a column anmed commit, which got confused with to_commit in the diff https://github.com/dolthub/dolt/issues/5188
      TODOs
    • Proper benchmarks
    • Potential Optimizations:
    • Level Pruning
    • Z-BBox skipping
    • Subdividing queries
    • Make Spatial Indexes Covering
    • Multi-Threading Level Searches

go-mysql-server

  • 1600: enginetest: Small cleanup for DROP DATABASE and DROP TABLE tests to be a little more hygienic in their use of state across the tests.
  • 1598: refactor(driver): adjust comments and interfaces to clarify behavior
    Improves the readability of the code w.r.t what purposes the Provider handles and points to the fact that the Provider can implement ContextBuilder.
    Adds a new DSN function to access the original dsn on the Connector.
    Fixes #1596
  • 1597: Restore driver tests
    This PR restores and updates the driver package's tests and example. I included tests and an example when I submitted my original PR but since then they were removed.
  • 1594: Fix join hints for scope unnesting
    Fixes join hints for recent subquery unnesting and semiJoin -> innerJoin rules, and fixes invalid testing setup issues.
    Tracking Dolt bump: https://github.com/dolthub/dolt/pull/5361
  • 1593: driver/conn: implement conn, execer, and queryer interfaces
    Implement more of the driver.Conn interfaces:
    • driver.Conn
    • driver.Execer
    • driver.ExecerContext
    • driver.Queryer
    • driver.QueryerContext
  • 1592: name unnamed values properly
    Fixes #1591
    Signed-off-by: Dave Henderson [email protected]
  • 1589: Separate cardinality from costing, convert semi to inner join
    This started out as a semiJoin optimization: semiJoin(xy ab) => project(ab) -> innerJoin(xy, distinct(ab)).
    Adding project and distinct to memo groups was hard because we did not differentiate between operator cost (estimation of compute time) and cardinality (number of rows returned by a relational expression). Refactoring costing to distinguish the two caused a lot of bugs. As a result, I converted many of the join tests into a format that will run each with a biased coster. All of those join op tests should be run with every join operator possible in its expression tree.
    The biggest effect is that we now choose merge and hash joins a lot more often for small tables, which are most of our preexisting tests.
    We also change a lot of integration test plans. The increase in testing makes me less worried about correctness and more worried about perf. But the current changes are necessary to bring us closer to histogram-based costing. I would rathe do this now, when we have more leeway for increasing perf compared to a month ago.
    There is still room for improvements organizing costing, merge join, and join tests as a whole.
  • 1558: apply spatial index lookup
    Changes:
    • Add support for displaing SPATIAL KEY for SHOW CREATE TABLE.
    • Allow IndexedTableAccess for in-memory tables that have spatial indexes
    • dolt pr with interface changes: https://github.com/dolthub/dolt/pull/5164
    • added new testing suite for Spatial Indexes
    • some fixes to prepared queries for filtered tables

vitess

  • 220: Exposing SQL Option and SQL Mode flags for Query events
    Query binlog events are sent from the primary when the replica needs to execute a SQL statement directly. This is only for DDL operations, since DML operations are handled with a structured data message that indicates exactly which rows changed.
    There's extra metadata passed in Query binlog messages that wasn't getting exposed by Vitess that we need to execute the statements correctly (e.g. foreign_key_checks disabled). This PR exposes the SQL Options and SQL Mode metadata so that we can access them from Dolt.
  • 219: Backporting client support for caching_sha2_password auth
    The MySQL client API in our fork of vitess is limited to the mysql_native_password auth plugin, but the default auth plugin as of MySQL 8.0 is caching_sha2_password. This means that to use Dolt binlog replication, customers either have to change the default auth plugin in MySQL or they have to create a user that is identified with the older mysql_native_password auth plugin. This additional configuration step adds friction for customers wanting to try out Dolt binlog replication.
    This PR pulls in selected changes from the tip of vitessio/vitess to pick up client support for connecting to MySQL servers that default to caching_sha2_password auth plugin (and will still fall back to mysql_native_password). All of these changes are pulled directly from vitessio/vitess, without any other changes mixed in.
    I'm not aware of anywhere else in our codebase where we're using the MySQL client API from vitess. As far as I know, it's only used by the binlog implementation. That means this change shouldn't have any effect on other parts of Dolt/GMS, and I've gone ahead and run the Dolt CI tests against this change as a sanity check:
    • https://github.com/dolthub/dolt/pull/5339
      I've pulled over additional tests from the tip of vitess for this logic. I've also tested locally and confirmed that my binlog replication integ tests all pass with this change, and no longer require overriding the default auth plugin for the MySQL server. I've also started on some additional binlog replication integ tests to make sure we cover password/no-password and ssl/no-ssl.

Closed Issues

  • 984: Dolt SQL select order is inconsistent on larger tables
  • 5292: Importing a dump using dolt sql creates an unexpected new database instead of using cwd
  • 5318: Dump of dolt_schemas table not compatible with MySQL. Maybe need a views option with dolt, none, or mysql as options?
  • 5226: dolt_diff system table doesn't respect qualified database
  • 1850: dolt removes data on incremental schema update
  • 4333: Support --user and --password sql-server args even if their is a config.yaml
  • 5313: Deleting and re-inserting the same view results in a dolt diff
  • 5316: Dolt creates secondary indexes of columns in a foreign when you run a delete query and there are foreign key constraints
  • 5372: A dolt gc'd repo is 5x the size of push/clone
  • 5366: Panic runtime error: index out of range [1] with length 1
  • 5370: Weird dropped final decimal query results
  • 5287: EXPLAIN with uuid_to_bin is not working in IntelliJ IDEA (like DataGrip)
  • 251: LastInsertId always returns 0
  • 1596: driver/: dsn database name appears to be ignored
  • 1591: unbound variable "v1" in query

Latency

Read Tests MySQL Dolt Multiple
covering_index_scan 1.93 2.66 1.4
groupby_scan 12.3 16.12 1.3
index_join 1.18 4.33 3.7
index_join_scan 1.14 2.03 1.8
index_scan 30.26 51.94 1.7
oltp_point_select 0.15 0.48 3.2
oltp_read_only 2.91 8.43 2.9
select_random_points 0.3 0.74 2.5
select_random_ranges 0.35 1.14 3.3
table_scan 30.81 53.85 1.7
types_table_scan 69.29 158.63 2.3
reads_mean_multiplier 2.3
Write Tests MySQL Dolt Multiple
bulk_insert 0.001 0.001 1.0
oltp_delete_insert 2.91 12.52 4.3
oltp_insert 1.47 2.97 2.0
oltp_read_write 5.18 17.63 3.4
oltp_update_index 1.52 6.09 4.0
oltp_update_non_index 1.5 6.79 4.5
oltp_write_only 2.39 8.9 3.7
types_delete_insert 3.13 12.98 4.1
writes_mean_multiplier 3.4
Overall Mean Multiple 2.8
dolt - 0.53.0

Published by github-actions[bot] over 1 year ago

Merged PRs

dolt

  • 5350: Dolt fixes for empty column projections
  • 5348: fix --track for dolt_checkout
    --track is not working with call dolt_checkout as expected. This change updates dolt_checkout to mirror the before of dolt checkout in the CLI.
    fixes: https://github.com/dolthub/dolt/issues/5189
  • 5340: go/store/nbs: Optimize memory and disk utilization during GC.
  • 5331: Add child refs to memtable only when a chunk was added.
    Fixes https://github.com/dolthub/dolt/issues/5301
  • 5330: Fixed race when multiple clients attempt to connect to the same branc…
    …h the first time a replica fetches it
  • 5326: fixes timing for multi statement queries
    This change fixes timing for multi statement queries to print the time to execute the query instead of the time to print the results or the time since the first query started.
  • 5320: store/datas: fix dropped errors
    This fixes three dropped err variables in the store/datas package.
  • 5319: don't create new index if matching on primary key
  • 5315: slightly better prefix compare
    A slight performance improvement for findPrefix when looking through table indexes that avoids a make() call and bytes.Compare
  • 5312: add --track flag for dolt_branch() procedure
    It is equivalent as using --track flag of CLI dolt branch command.
  • 5311: makes -f default behavior for dolt fetch
    This change makes force fetch the default behavior for dolt fetch and removes the -f force flag to prevent errors when fetching after a force push.
    fixes: https://github.com/dolthub/dolt/issues/4943
  • 5308: Allow the pprof server to handle connections from non-localhost
    Allow the pprof server to handle connections from non-localhost machines.
    This change is necessary to reach a Docker pprof server from host machine.
  • 5306: dolt_remote_branches table
    New system table shows remote branches with same schema as existing dolt_branches table
  • 5302: fix panic for unexpected json file format
    returns error message instead of panic
  • 5295: Trim compare string prefix
    this improves a low-selectivity index scan for a customer query.
  • 5294: add bats test for binary string encoded to utf8
    Depends on https://github.com/dolthub/go-mysql-server/pull/1583
    DataGrip sets the character_set_results system variable to utf8, which raw binary strings cannot be encoded into. MySQL returns binary type strings in hex format.
  • 5279: reuse cursor when verifying fks using secondary indexes
  • 5252: Fix int overflow on 32-bit architectures
    $  GOARCH=386 GOOS=linux go build ./...
    # github.com/dolthub/dolt/go/store/skip
    store/skip/list.go:152:21: maxCount (untyped int constant 4294967294) overflows int
    
    See also https://github.com/dolthub/vitess/pull/216
  • 5220: Dolt Binlog Replication
    Initial support for Dolt binlog replication from a MySQL server.
    Includes support for:
    • Configuring a replica's source – CHANGE REPLICATION SOURCE TO ...
    • Configuring optional replication filtering – CHANGE REPLICATION FILTER ...
    • Showing a replica's status – SHOW REPLICA STATUS;
    • Starting / stopping replication – START REPLICA;, STOP REPLICA;
    • Reseting a replica – RESET REPLICA [ALL];
      Notable limitations/restrictions:
    • Only the default ("") replication channel is supported
    • Requires row-based replication with GTID-based auto-positioning is supported
    • A subset of filtering options are present (i.e. REPLICATE_DO_TABLE, REPLICATE_IGNORE_TABLE); more can be added upon customer request
    • Replication privileges are not checked yet; I will follow up with this shortly
      Testing:
    • Integration tests currently live alongside the code, but since they take ~70s to run all of them, I'm thinking about moving them to the integration-tests directory and setting up a separate GitHub actions job to run them. It is convenient that they currently get run with all the storage format variants though.
      Documentation:
    • https://github.com/dolthub/docs/pull/1177
  • 5126: Bump knex from 1.0.7 to 2.4.0 in /integration-tests/mysql-client-tests/node
    Bumps knex from 1.0.7 to 2.4.0.

go-mysql-server

  • 1592: name unnamed values properly
    Fixes #1591
    Signed-off-by: Dave Henderson [email protected]
  • 1588: partially validate and create underlying indexes even if foreign_key_checks=0
    When FOREIGN_KEY_CHECKS is disabled, we should still create the underlying secondary index or assign the primary key indexes.
    Currently, we don't do that, but the moment any query is run with FOREIGN_KEY_CHECKS enabled, we create the indexes and assign any index references.
    Additionally, we need to do some of the validation according to MySQL Docs
    Related: https://github.com/dolthub/dolt/issues/5316
  • 1587: Changed how empty set of projected columns is handled
    Started with tightening the semantics of the ProjectedTable interface as it relates to an empty projection (nil v. empty slice). Then made changes to printing of ResolvedTable and IndexedTableAccess. This revealed problems in the prune columns rule when all columns were being pruned. Fixed those, which had been masking other bugs, where we hadn't been pruning when we could have been. This was in turn caused by other bugs in the prune rule dealing with case sensitivity.
    We should now be able to prune more columns than before, and we can see an empty column projection in plans.
  • 1586: Unnest IN_SUBQUERY GROUP_BY into partial join
    Resolving group by expressions used to happen in two phases, and now happens in one so that we can detect cacheable groupby subqueries at applyJoin time.
    Fix a miscellaneous bug in RightSemiLookupJoin. The right left node has to return distinct results, otherwise we will duplicate results.
    Dolt tests pass locally.
  • 1584: not perform optimization_rule on like clause for utf8mb3 charset
    optimization rule uses ÿ last character in the charset utf8mb4, which does not work for utf8mb3 charset values.
  • 1583: literal.String() returns hex string for binary type data
    DataGrip sets the character_set_results system variable to utf8, which raw binary strings cannot be encoded into. MySQL returns binary type strings in hex format.
  • 1563: Fix unsafe table pointer access in applyJoin

vitess

  • 219: Backporting client support for caching_sha2_password auth
    The MySQL client API in our fork of vitess is limited to the mysql_native_password auth plugin, but the default auth plugin as of MySQL 8.0 is caching_sha2_password. This means that to use Dolt binlog replication, customers either have to change the default auth plugin in MySQL or they have to create a user that is identified with the older mysql_native_password auth plugin. This additional configuration step adds friction for customers wanting to try out Dolt binlog replication.
    This PR pulls in selected changes from the tip of vitessio/vitess to pick up client support for connecting to MySQL servers that default to caching_sha2_password auth plugin (and will still fall back to mysql_native_password). All of these changes are pulled directly from vitessio/vitess, without any other changes mixed in.
    I'm not aware of anywhere else in our codebase where we're using the MySQL client API from vitess. As far as I know, it's only used by the binlog implementation. That means this change shouldn't have any effect on other parts of Dolt/GMS, and I've gone ahead and run the Dolt CI tests against this change as a sanity check:
    • https://github.com/dolthub/dolt/pull/5339
      I've pulled over additional tests from the tip of vitess for this logic. I've also tested locally and confirmed that my binlog replication integ tests all pass with this change, and no longer require overriding the default auth plugin for the MySQL server. I've also started on some additional binlog replication integ tests to make sure we cover password/no-password and ssl/no-ssl.
  • 217: Adding implicit string concatenation for a variable assignment needed for binlog replication
    When a mysqldump is taken for a database tracking GTIDs, it outputs GTID tracking information via a line like:
    SET @@GLOBAL.GTID_PURGED= /*!80000 '+'*/ 'beabe64c-9dc6-11ed-8021-a0f9021e8e70:1-126';
    
    In MySQL 8.0+, the MySQL comment inserts a '+' between the = and the assignment value, which gets implicitly concatenated with the adjacent quoted string in MySQL.
    GMS/Dolt doesn't support this implicit string concatenation, but I wanted to get this query to work – otherwise customers will have to manually edit their mysql dump files to remove this syntax before it can be imported into Dolt. I didn't think it was worth taking on the larger change right now to support implicit quoted string concatenation everywhere (https://github.com/dolthub/dolt/issues/5232), so instead, I added special handling for this case since it's important for the binlog setup experience.

Closed Issues

  • 5189: --track does not work in call dolt_checkout
  • 4245: Tables with hyphen character cause mysql client to drop connection
  • 3770: Support DELETE JOINs
  • 1660: Server logging for inserts is deceptive
  • 5344: Cloning a dolt repo onto a virtual machine
  • 3637: USE db/branch works differently than call dolt_checkout('branch')
  • 4503: Strange behavior with enum in composite unique key in a table without primary key
  • 4957: Support call procedure as of <commit>
  • 4853: Sporadic slowness in GCS read replica
  • 5148: High memory usage and long start up time for a database with thousands of branches
  • 5019: Feature request: Optimize initialization for large databases
  • 3296: Incorrect result for some cases of 'explicit join tree syntax for joins'
  • 4494: COUNT(*) select start impedance mismatch
  • 4482: Support JSON extract operators
  • 5301: Memory leak in latest dolt
  • 5237: dolt panic: invalid memory address or nil pointer dereference
  • 5287: EXPLAIN with uuid_to_bin is not working in IntelliJ IDEA (like DataGrip)
  • 5143: Attempting to Import Nested JSON Objects to Dolt can Cause Dolt to Crash
  • 5304: Need a system table to view all branches equivalent to dolt branch -va
  • 1592: dolt_branches table should contain remotes on clone
  • 1590: dolt checkout to most recently updated branch
  • 384: Dolt login opens browser for incorrect account
  • 935: Msi installer add option to install to user folder
  • 1300: dolt gc breaks sql-server inserts until restarted
  • 4943: Make -f the default behavior for dolt fetch
  • 1591: unbound variable "v1" in query

Latency

Read Tests MySQL Dolt Multiple
covering_index_scan 1.93 2.71 1.4
groupby_scan 12.3 16.41 1.3
index_join 1.18 4.57 3.9
index_join_scan 1.14 3.96 3.5
index_scan 30.26 52.89 1.7
oltp_point_select 0.15 0.48 3.2
oltp_read_only 2.97 8.43 2.8
select_random_points 0.3 0.75 2.5
select_random_ranges 0.35 1.14 3.3
table_scan 30.81 62.19 2.0
types_table_scan 70.55 183.21 2.6
reads_mean_multiplier 2.6
Write Tests MySQL Dolt Multiple
bulk_insert 0.001 0.001 1.0
oltp_delete_insert 2.76 12.52 4.5
oltp_insert 1.47 2.97 2.0
oltp_read_write 5.09 17.63 3.5
oltp_update_index 1.44 6.09 4.2
oltp_update_non_index 1.44 6.79 4.7
oltp_write_only 2.26 8.9 3.9
types_delete_insert 2.91 12.3 4.2
writes_mean_multiplier 3.5
Overall Mean Multiple 3.0
dolt - 0.52.20

Published by github-actions[bot] over 1 year ago

Merged PRs

dolt

  • 5307: Improve the performance of clone from AWS and GCS remotes.
  • 5300: go/doltcore/doltdb: catch panic in gc concurrency tests
  • 5291: update query timing to be accurate when using dolt sql-client
    related: https://github.com/dolthub/go-mysql-server/pull/1581
    fixes: https://github.com/dolthub/dolt/issues/5241
  • 5286: allow different format options for dolt branch with track flag
    Git allows:
    git branch feature --track origin/feature
    git branch --track request origin/feature
    git branch feature --track=direct origin/feature
    git branch --track=direct feature origin/feature
    for creating new branch that tracks given remote tracking branch
    does not allow:
    git branch feature --track direct origin/feature, but Dolt allows it as --track direct and --track=direct are considered the same
  • 5282: go/store/datas/pull: try to avoid unbounded growth of outstanding absent set
  • 5274, 5273, 5270, 5269: Improvements to prepare for reenabling call dolt_gc().

go-mysql-server

Closed Issues

  • 4216: Support additional Git ancestry syntax
  • 5241: The dolt sql-client query timings always show 0.00 sec
  • 5187: dolt branch --track does not create a new branch
  • 5171: translate count(*) to count(1) automatically
  • 5292: Importing a dump using dolt sql creates an unexpected new database instead of using cwd

Latency

Read Tests MySQL Dolt Multiple
covering_index_scan 1.96 2.81 1.4
groupby_scan 12.3 16.41 1.3
index_join 1.16 4.57 3.9
index_join_scan 1.12 3.96 3.5
index_scan 30.26 52.89 1.7
oltp_point_select 0.15 0.48 3.2
oltp_read_only 2.97 8.58 2.9
select_random_points 0.3 0.75 2.5
select_random_ranges 0.35 1.14 3.3
table_scan 30.81 61.08 2.0
types_table_scan 70.55 186.54 2.6
reads_mean_multiplier 2.6
Write Tests MySQL Dolt Multiple
bulk_insert 0.001 0.001 1.0
oltp_delete_insert 2.76 11.87 4.3
oltp_insert 1.44 2.97 2.1
oltp_read_write 5.09 17.95 3.5
oltp_update_index 1.42 5.47 3.9
oltp_update_non_index 1.37 5.99 4.4
oltp_write_only 2.22 9.06 4.1
types_delete_insert 2.97 11.87 4.0
writes_mean_multiplier 3.4
Overall Mean Multiple 2.9
dolt - 0.52.19

Published by github-actions[bot] over 1 year ago

Merged PRs

dolt

  • 5280: go/store/datas/pull: trim memory footprint for puller hash sets
  • 5275: verify fk with secondary index even when empty
    The optimization for verifying foreign keys using secondary indexes isn't used when the tables are completely different (so only additions to the merge) or if the index potentially didn't exist before merging. Rather than defaulting to using the primary key to verify the foreign keys, it's possible to just create an empty index and use the faster secondary index to verify.
    This includes code from https://github.com/dolthub/dolt/pull/5253
  • 5253: verify fk with secondary when available
    We resolve foreign key conflicts by:
    1. diffing a before/after index to generate keys
    2. constructing a lookup key for the reference index
    3. perform a lookup into the reference index
    4. report a conflict if reference dependency is missing
      For huge tables, we want the from keys to be ordered relative to the to index. When this is not the case, the to lookup will be random access and read a chunk from disk. Millions of random access lookups that all IO chunks from disk adds a ~1000x perf hit for validating a single FK relative to sorted lookups.
      This PR does a secondary key diff -> secondary foreign key lookup. The diffs are ordered relative to one-another, and this usually makes big merges faster.
      The main downside is that constraint violations still require a primary key lookup to backfill missing columns, which will usually be out-of-order relative to the secondary key iter order. Keyless fks are also excluded from the optimization for now.

go-mysql-server

  • 1574: Subquery caching correctness
    Rerunning cacheSubqueries recursively on subquery expressions led to an incorrect cacheability labelling. The rule should only be run once on a top-level tree.
  • 1573: add support for SHOW GLOBAL VARIABLES
  • 1570: Fix panic by rewriting how we move filter conditions up.
    Fix panic by rewriting how we move filter conditions up.
    Fixes https://github.com/dolthub/dolt/issues/5214

vitess

  • 218: Fixed bug in COM_FIELD_LIST command implementation for table names that need quoting in a statement
    Fixes https://github.com/dolthub/dolt/issues/5151
    Fixes https://github.com/dolthub/dolt/issues/4464
  • 217: Adding implicit string concatenation for a variable assignment needed for binlog replication
    When a mysqldump is taken for a database tracking GTIDs, it outputs GTID tracking information via a line like:
    SET @@GLOBAL.GTID_PURGED= /*!80000 '+'*/ 'beabe64c-9dc6-11ed-8021-a0f9021e8e70:1-126';
    
    In MySQL 8.0+, the MySQL comment inserts a '+' between the = and the assignment value, which gets implicitly concatenated with the adjacent quoted string in MySQL.
    GMS/Dolt doesn't support this implicit string concatenation, but I wanted to get this query to work – otherwise customers will have to manually edit their mysql dump files to remove this syntax before it can be imported into Dolt. I didn't think it was worth taking on the larger change right now to support implicit quoted string concatenation everywhere (https://github.com/dolthub/dolt/issues/5232), so instead, I added special handling for this case since it's important for the binlog setup experience.
  • 216: Fix int overflow on 32-bit architectures
    $ GOARCH=386 GOOS=linux go build ./...
    # github.com/dolthub/vitess/go/bucketpool
    go/bucketpool/bucketpool.go:57:15: math.MaxUint32 (untyped int constant 4294967295) overflows int
    
  • 215: Adding two new binlog replication statements: RESET REPLICA and CHANGE REPLICATION FILTERS

Closed Issues

  • 5151: mysql client's information_schema read with table names containing - can put the client in a bad state.
  • 4464: MySQL client with autocomplete enabled crashes connecting to Dolt if a table is named a reserved word like rows
  • 5214: dolt panic during JOIN
  • 5175: High load in 1) SELECT queries when we have 7000 rows and 21000 branches 2) create extra branches when we've already have 21000
  • 5080: Can't edit table's data in navicat

Latency

Read Tests MySQL Dolt Multiple
covering_index_scan 2.0 2.81 1.4
groupby_scan 12.75 16.71 1.3
index_join 1.16 4.57 3.9
index_join_scan 1.14 3.96 3.5
index_scan 30.26 53.85 1.8
oltp_point_select 0.15 0.49 3.3
oltp_read_only 2.97 8.58 2.9
select_random_points 0.3 0.75 2.5
select_random_ranges 0.35 1.14 3.3
table_scan 30.81 63.32 2.1
types_table_scan 70.55 189.93 2.7
reads_mean_multiplier 2.6
Write Tests MySQL Dolt Multiple
bulk_insert 0.001 0.001 1.0
oltp_delete_insert 3.02 13.22 4.4
oltp_insert 1.5 3.13 2.1
oltp_read_write 5.18 18.28 3.5
oltp_update_index 1.55 6.09 3.9
oltp_update_non_index 1.47 6.67 4.5
oltp_write_only 2.35 9.39 4.0
types_delete_insert 3.02 13.22 4.4
writes_mean_multiplier 3.5
Overall Mean Multiple 3.0