Merged PRs
dolt
-
11073: dolt revert to more closely match git
Related: dolthub/doltlite#961
-
11067: proto,go/serial: Bump some bazel version, some module versions.
-
11059: Fix SchemaTable.Updater panic on direct UPDATE dolt_schemas
A direct UPDATE dolt_schemas reached SchemaTable.Updater, which panicked with "should never be called" — an unprivileged user could crash the SQL server with it. dolt_schemas is not directly modifiable via SQL, so this returns a clean error unconditionally instead of panicking; adds a regression test. -
11058: go: sqle: Fix a dolt_branch_control bypass involving the session table cache.
On a new connection, a SELECT against information_schema.tables or information_schema.columns would populate the session's table cache is a Table value that embedded a revision-less Database value. An incoming write request against the cached table would run its permissions check against the revision-less database, instead of the revisioned database which correctly encoded the branch the write was running against. This allowed connections to bypass dolt_branch_control, elevating towritepermissions on all branches. -
11057: Branch_control regression tests for more user-table write shapes
Adds branch_control regression tests for the user-table write shapes that TestBranchControlBlocks wasn't already pinning; all were already correctly gated, so this is pure regression coverage with no behavior change. -
11050: Gate branch_control on writable dolt system tables
Most writable dolt system tables had no branch_control check, so a read- or merge-permission user could write to them; this gates the user-space tables (dolt_docs/ignore/query_catalog/nonlocal/tests via the shared createWriteableSystemTable helper), dolt_constraint_violations_, dolt_workspace_, and ConflictRootObjectTable with Permissions_Write. dolt_branches/dolt_remotes (already read-only), dolt_branch_control/namespace (own admin gating), and dolt_conflicts_ (already gated) are left as-is; tests cover every writer factory and pin the read-only behavior. -
11049: Audit and test branch control coverage for dolt procedures
Survey ofdprocedures/dolt_*.goturned up four procedures with nobranch_controlcheck that mutate branch or working-set state. Three of them belong underPermissions_Write:dolt_rebase— mutates the active rebase plan and the working setdolt_stash— push/pop/apply/drop/clear all write through to working statedolt_update_column_tag— schema change committed to the working root
Gate added at the procedure entry in each.
dolt_undropwas the fourth — leaving it alone. It restores a dropped database, not a table on the current branch, so the branch-control entry for the current branch isn't a sensible gate. MySQLSUPERalready covers it.
Test side: every otherdolt_*procedure now has at least one branch_control assertion.
-
11047: Gate
DOLT_CHECKOUT('<table>')with branch_control Write permission
dolt_checkout(<table>)was previously ungated, so a user with areadormergepermission on a branch could clear working set changes. This gatesdolt_checkout(<table>)while leavingdolt_checkout(<branch>)ungated
go-mysql-server
- 3551: star expression used in function
- 3546: Cache context to use for
String()methods
This is a replacement for:- dolthub/go-mysql-server#3525
This accomplishes the same effective goal of passing context in the areas that we previously were not (primarily theString()function, which is load-bearing). The above PR changed the interfaces such that nodes and expressions no longer respected thefmt.Stringerinterface. This PR instead caches the context inside of all nodes that need a context in theirString()function by providing that context at node creation time. This was a tactic that we were already using before my original context threading PR: - dolthub/go-mysql-server#3513
...and should therefore be no worse than we were before I embarked on this journey.
It's worth noting that theinformation_schematables do not have a proper context inside of theirString()function, as those tables are created when the engine is created, and SQL contexts only exist inside of connections/sessions. For now this doesn't impact anything as theSchema(ctx)methods (which use the context fromString()) return a precomputed schema, however there are comments in place that warn about thenilcontext if those methods are ever modified.
- dolthub/go-mysql-server#3525
- 3532: replace all
decimal.Decimalwith*apd.Decimal