Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Created by
brew bumpCreated with
brew bump-formula-pr.release notes
Bumps mysql2 from 3.9.4 to 3.9.7.
This is an old check from before we had schema merge. I'm convinced that it was never actually needed. This PR has the necessary changes in order to remove it.
It's important that the user is able to resolve data conflicts even if the table schema has changed, because otherwise it is not possible to manually resolve data conflicts after a schema merge.
This PR also contains some additional tests, some of which are currently disabled because of Inconsistent detection of merge conflict, depending on direction of merge. dolthub/dolt#7767 and Panic during schema merge dolthub/dolt#7762
Currently, when a column's type changes to a new type family (e.g. changing from
varchartoint), we assign a new column tag. This prevents us from easily identifying the column across type changes. For example:dolt_patch()anddolt diff -r sqland also prevents us from generating correct DDL statements for binlog replication.This PR changes schema alterations so that columns now retain their original column tag across type changes, which fixes the issues above.
A side effect of this change is that if a customer is working on a branch, creates a column, and changes its type, the tag won't match if the schema on another branch is updated to the final type change (i.e. without going through the initial/intermediary type). Code was originally added for this case (see: Cant merge and because dolt does not let me resolve conflicts dolthub/dolt#3950), however, since then, we have added support for schema merging and this isn't an issue anymore. I've confirmed that we can successfully merge non-matching column tags, from both directions, and added a test for this case, too.
Longer-term, I agree we should continue exploring removing tags completely, but in the short-term, this fixes a correctness problem with SQL patch statement generation that binlog support needs.
Related to: Optimize SQL returned from
dolt_patch()dolthub/dolt#6710 (comment)AUTO_INCREMENTcolumns haveNOT NULLconstraintcompanion pr: improve
DESCRIBEcolumns and auto_increment bugs dolthub/go-mysql-server#2467Add read planning for journal getMany so instead of doing randIO we get seqIO. SeqIO has a large effect for disk storage systems. Also parallelize getMany calls. The biggest change here is the semantics around how reading locks the journal file. Reads hold the journal lock for longer, which could lower write throughput in some cases. If we see evidence of this, we can do more work to limit the amount of time batch reads can interruptibly holding the journal lock.
go-mysql-server
Avoid concurrent ctx use in doQuery. I standardized the session status variables to uint64 to make it easier to have them be atomics. The return types for these variables in MySQL seem to be strings, so switching them from int640->uint64 seems OK. We could always change the presentation layer later. Removing the session mutex appears to be safe after these changes.
DESCRIBEcolumns and auto_increment bugsThis PR makes it so our DESCRIBE statement is more correct when there are unique keys.
There's an edge case we miss:
UNIQUE KEY jis created beforeUNIQUE KEY i, so describe makesjasPRI.In Dolt, we store indexes in a map and return them in order of index name, so we mark
iasPRI.There are skipped tests for this
Additionally, this adds the
NOT NULLconstraint to columns that are markedAUTO_INCREMENT.partially addresses: First Unique Key in a keyless table should be represented as a primary key dolthub/dolt#2289
fixes: Schema of "Create table t SELECT * FROM tbl" drops default values when compared to MySql dolthub/dolt#6016
I was wrong, this is very broken in dolt.
Could not find a quick fix, so skipping tests to unblock auto-bumps.
reopens: Auto Increment increments despite error dolthub/dolt#3157
vitess
partially addresses: Parser support for
PARTITION BYdolthub/go-mysql-server#2472Once again, golang reminds me that a value type implementing an interface forces the pointer type to also implement the interface, and mixing the two messes up our runtime type reflection.
I changed all uses of the AliasedValues in InsertRows interface to be pointers so that we can interact with them consistently on the GMS side.
Closed Issues
dolt loginworks with DoltHub, but not a DoltLab instance