github dolthub/dolt v1.86.1
1.86.1

6 hours ago

Merged PRs

dolt

  • 10844: Truncate line comments when parsing sql statements
    Fixes #10828
    We were not able to detect delimiter statements that were preceded with a line comment since we look for the delimiter keyword at the beginning of a statement, and the delimiter statement would have a line comment in front of it.
    This PR strips out any line comments that either take up a whole line on its own or follow a delimited statement on the same line (line comments in the middle of a statement are preserved and parsed out later on). This allows us to detect the delimiter keyword even if there's a line comment that precedes it, since the line comment gets parsed out as its own empty statement.
    Also rearranged struct fields via fieldalignment and removed unused statementScanner struct
  • 10838: go/store/nbs: Fix races between GC PruneTableFiles and Conjoin/fetch/pull.
    The mechanisms that nbs.(*fileTablePersister) used to try to avoid cleaning up in-flight files were not safe in all cases. Under some conditions files which were in use could be removed.
    Rework the interfaces for landing new files into the store so that those files are never removed until the unit of work associated with them is completed.
  • 10830: go/store/nbs: archive_writer.go: Make an archive file's name (more) dependent on its contents, more closely matching the behavior of table file names.
    Table files are named based on a hash of their suffixes array. And their suffixes array is stored in insertion order. And their suffixes arrays reflect every "byte span" in the file. So the table files are named based on their chunks and their chunks' order in the file.
    Archive files used to be named based on a hash of their suffixes array as well. But their suffixes are stored sorted by chunk address. And they have dictionaries and stuff which aren't reflected in the suffixes array at all. So their names were dependent on the chunks they stored, but not fully dependent on their data section, and not even dependent on the order of their chunks within their data section.
    All existing TableFilePersisters are happy to overwrite files. The assumption is that the files themselves are named based on their contents and any version of it is as good as any other. For archives, that meant that two archives containing the same chunks but in a different order or with different dictionaries would get the same name and potentially cause misbehavior when one version changed out for another from underneath a Dolt.
    This change makes archive names much more data dependent. Their entire contents go into the file name, including the metadata payload. We changed the metadata payload to record source that contributed to the conjoin, when the archive is the result of a conjoin. The metadata payload also always includes the Dolt version. So this makes archive names much less deterministic across versions and provenance, but with the exact some contents, than their table file counterparts. However, deterministically building table files as part of pull/push or GC is not really a thing, and things are already written in a non-deterministic order on basically all write paths. So this is not deemed to be a concern.
  • 10818: error early when rebase cli operating against a remote server
    We overlooked the rebase cli command when talking to a remote server should error out quickly due to the inability to checkout the branch on the client.
  • 10714: feat(pull): add --rebase flag to dolt pull
    Running tests for: #10618
  • 10618: #10058 feat(pull): add --rebase flag to dolt pull

    Summary

    Changes

    • Add --rebase/-r flag to dolt pull (CLI) and CALL dolt_pull (SQL) so that after fetching, local commits are rebased onto the upstream branch instead of merging
    • Handles three cases: up-to-date, fast-forward, and diverged history (calls startRebase + continueRebase)
    • Validates flag conflicts (--rebase vs --squash, --no-ff, --ff-only, --no-commit)
    • CLI conflict resolution sets @@dolt_allow_commit_conflicts and syncs to the temp rebase branch so users can resolve and dolt rebase --continue

    Tests:

    • 21 CLI BATS tests in pull.bats
    • 19 SQL BATS tests in sql-pull.bats
    • covers: divergent history, fast-forward, up-to-date, flag conflicts, data/schema conflict resolution (--theirs/--ours), multi-commit rebase, empty commit drop,
      uncommitted changes guard, abort and retry, branch collision, explicit remote+branch args, conflict state inspection during paused rebase
      Closes #10058

go-mysql-server

  • 3505: trim analyzer rules for simple selects
    This PR adds a fast analysis pass for queries of the form SELECT ... FROM ... WHERE ....
    The idea is that simple select queries (no subqueries) can avoid many (recursive) analyzer rules like applying triggers and foreign keys.
    Benchmarks: #10824 (comment)
  • 3503: Preserve whether left join excludes null when building best plan
    fixes #10699
    Building all left joins using NewLeftOuterJoin was causing all left joins to be LeftOuterJoin[IncludingNulls], but for left joins created from an AntiJoin (which are used for NOT IN queries), we want to be using LeftOuterJoinExcludingNulls (left joins created from an AntiJoinIncludingNulls, which are used for NOT EXISTS queries, are default LeftOuterJoin since LeftOuterJoin does include null by default). Instead, we should be using NewJoin and specifying the join op type.
  • 3499: Support for unwrapping geometry values, which may be stored inline or out of band

Closed Issues

  • 10828: Parse error when comment precedes delimiter in a .sql file import
  • 10058: [Feature Request] dolt pull --rebase
  • 10699: Bug: NOT IN with subquery that returns NULL
  • 8572: Potential TUI tool like Lazygit

Don't miss a new dolt release

NewReleases is sending notifications on new releases.