You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Merged PRs
dolt
7727: Version Command Refactor
The Version command is currently used by doltgres, but there are some issues. You can't add extra args to it, and it prints out the wrong binary name. This refactor makes the binary name printed by the Version command configurable, and it also refactors the Exec so that its functionality can be extended by doltgres without having to duplicate things like checkAndPrintVersionOutOfDateWarning, and the printing of the feature version.
7724: Move Version
Moves Version into a package where it can be referenced by external code.
7721: Improve error messaging when encountering a primary key schema change during a merge.
When a merge encounters a table that can't be merged because its primary key changed, we now:
Include the name of the affected table
Indicate whether the primary key discrepancy is between the two branches or between one branch and the common ancestor.
7718: [store] use struct{} as a value in a hashset
Testing if CI works with branch in repo. Original: #7706
7711: match mysql fk name generation
This PR removes logic where we would use a consistent hash to create foreign key names, when one isn't explicitly provided.
Instead, we use logic in GMS to generate a name with the template "<tbl_name>_ibfk_<num>", which matches MySQL behavior.
As a result, we now allow multiple foreign keys over the same sets of columns (as long as the names are different).
companion pr: dolthub/go-mysql-server#2438
fixes: #7650
7707: go/libraries/doltcore/dbfactory, misc: Ensure we close a *grpc.ClientConn when we are done with it.
In the cluster commithook, we had a failure mode where we would leak a *grpc.ClientConn without closing it. It turns out, if an outbound request has made on a ClientConn, it will continue retrying the connection. And we would leak one on a fixed interval, resulting in ever-increasing CPU utilization.
7706: [store] use struct{} as a value in a hashset
7704: Implement traditional auto-increment lock mode hold the lock for the duration of the insert iter.
Fixes #7634
This is the dolt half of dolthub/go-mysql-server#2439
This adds support for innodb_autoinc_lock_mode=0 ("traditional"). When this system variable is set, the engine will guarantee that every insert statement generates consecutive IDs for AUTO INCREMENT columns.
This PR also allows the user to set innodb_autoinc_lock_mode=1 ("consecutive"), although the behavior is currently identical to "traditional". This is acceptable because both modes make the same guarantees (that each statement gets consecutive IDs), and the observed behavior is the same in almost all cases.
(The "consecutive" contains an additional optimization: if there is a known upper bound on the number of IDs that must be generated for an insert, under "consecutive" mode the engine will just increment the counter by that upper bound and immediately release the lock. In places where not all of those IDs are actually used, the excess are wasted. This PR does not include that optimization. Thus, with this PR, traditional and consecutive behave the same.)
7699: Add per-table locking for AutoIncrementTracker
This PR refactors the AutoIncrementTracker to hold a separate mutex for each table instead of a single mutex for the entire database.
7689: Allow 'old' versions of Dolt to handle future table file versions
Now that we are fairly certain that the dolt table format for compressed history files will have a new file signature, we want current versions of dolt to provide decent messages if one of those files is encountered.
Automated testing of this is tricky at the moment. I hand edited an existing table file to ensure that a sane message comes back.
Also, dolt sql-server doesn't currently print a message at all when a bad table file is encountered.
7670: Add name on cd-release-pgo workflows
add name on cd-release-pgo workflows
go-mysql-server
2442: prevent panic on triggers with declare statements
We're reusing a code from stored procedures to handle begin end blocks, but we're missing a lot of set up that prevents certain variables from being nil. Consequently, we panic in a couple places.
This PR fixes some of those panics, but reveals other problems we have in resolving/executing triggers of this format.
Partially addresses: #7720
2440: support ALTER TABLE ... RENAME CONSTRAINT ... for foreign key constraints
This PR adds support for ALTER TABLE ... RENAME CONSTRAINT ... for foreign key constraints.
This is a feature that is NOT supported in MySQL, but we're adding it to make it easier to resolve merge conflicts resulting from foreign key name collisions.
related: dolthub/go-mysql-server#2438
2439: For AutoIncrement lock modes other than "interleaved", hold the lock for the duration of the insert iter.
This is the GMS side of #7634
This PR changes the engine to make it acquire a lock (provided by the storage layer) when innodb_autoinc_lock_mode is set to the "consecutive" or "traditional" values. More specifically, it calls a new function in the AutoIncrementSetter interface which optionally acquires a lock and returns a callback for releasing the lock.
The in-memory DB doesn't have multithreading support, so when just using GMS, this is a no-op. A followup PR in Dolt will update its implementation of AutoIncrementSetter to handle the locking.
2438: have generated index and foreign key names match mysql
changes:
auto-generated secondary index names don't match (after a conflict)
we started at 0, while mysql starts at 2
auto-generate foreign key names in a way that matches mysql
in-memory used to just have empty string as the constraint name
we used to error when generating foreign keys over the same sets of columns, but not anymore
related: #7650
2437: lowercase when looking up self referential foreign key columns
fixes: #7700
330: support rename constraint syntax
This PR adds syntax support for ALTER TABLE ... RENAME CONSTRAINT [FOREIGN KEY / CHECK]... for foreign key constraints.
Exposing the Length() function in the BinlogEvent interface so calling code can access the event size present in a binlog event's header. Needed for calculating binlog file position.
Renaming FakeBinlogStream → BinlogStream so calling code can use it when serializing binlog events.
Closed Issues
7634: Support for traditional and consecutive behavior for innodb_autoinc_lock_mode