Merged PRs
dolt
- 11257: go: merge: Fix two bugs in merge related to adaptive encoding.
When the left and right side of a merge have identical columns but the columns have different encoding, the merge logic did the wrong thing.- When running check expressions, it would (try to) read the tuples using the wrong encoding in some cases.
- When performing a structural merge, it would fail to correctly rewrite the tuples in the resulting tables in some cases.
In most cases this resulted in failed merges. In some cases, this resulted in corrupted tables where the misencoded values could no longer be successfully read.
Developed with red/green tests which are left as regression tests.
- 11254: go: doltcore/merge,prolly/tree: Make merge paths recover from panics encountered during merge and return errors directly, instead of crashing.
Not recovering while in a goroutine causes the process to crash. Especially in server context, we would rather return the error. - 11252: go/store/types: serial_message: Fix a bug which caused a panic when debug printing a schema with a CheckConstraint.
- 11248: Add a global credential helper for remotesapi
- 11234: Fix dolt_log system table on shallow clones
On a shallow clone, theDOLT_LOGsystem table failed to properly show commits when ghost commits were encountered. The table now skips ghost commits so it stops at the shallow boundary.- Skip ghost commits in
DOLT_LOGwalk - Report the row count as inexact only on shallow clones; full clones keep the existing O(1) fast count
- Add
DoltDB.IsShallow(), backed by a newchunks.GhostChunkStoreinterface
Fix #11230
- Skip ghost commits in
go-mysql-server
- 3605: Use
TableIds instead of names when mapping filters to tables
Split off from #3591
Using table names prevented us from being able to distinguish between tables from different databases with the same unqualified name.
This PR also updates places where we were not using the correctTableId- when condensing a
SubqueryAliasinto aTableAlias, the newTableAliasshould have the sameTableIdas theSubqueryAlias - A view should be getting its
TableIdfrom the scope via its name, not the name of its first column
- when condensing a
- 3603: Only get projection expressions once when creating filterSet during filter pushdown
Split off from #3591
getProjectionExpressionsis only called once, instead of for eachFilternode.tableAliasesis also removed because it's never actually used anywhere. - 3602: Create single override point for
SplitConjunction
SplitConjunctionworks differently for Doltgres expressions. The integration with Doltgres relied onanalyzer.SplitConjunctionandmemo.SplitConjunctionbeing replaced and called instead ofexpression.SplitConjunction; however,expression.SplitConjunctionwas still being called in many places in the analyzer. Not calling the correct version ofSplitConjunctionwas preventing filter expressions from being properly pushed down in Doltgres. Furthermore,expression.SplitConjunctionwas still being called inrowexecand callinganalyzer.SplitConjunctionfrom therowexecpackage causes a cyclical import.
To avoid confusion between the variousSplitConjunctioninstances, this PR replaces the various override variables with a single one in theexpressionpackage. This allowsSplitConjunctionto be consistently replaced throughout GMS without requiring GMS developers to have knowledge ofSplitConjunctionworking differently in Doltgres.
This change is integrated into Dolgres in dolthub/doltgresql#2865.
This issue was originally encountered while working on #3591. - 3601: cache
GeneralizeTypesoutput and avoidfmt.SprintfinHashOfSimple
This PR adds some optimizations to CASE statements and HashLookups - 3598: Fix
JSON_LENGTHand member-access lookups to match MySQL
JSON_LENGTHreturnedNULLfor empty arrays and the JSON null literal, and member-access paths (.key/.*) on an array returned[]instead ofNULL. - 3594: allow using star expr after sql value for Doltgres
vitess
- 474: go/mysql: add Conn.WaitForClientActivity to detect a departed client
On context cancelation, the function returns with anilerror. If the client unexpectedly writes to the connection or closes it, then this method will return a non-nilerror.
Unlike the first attempt at this method, this new implementation accounts for LoadDataInFile. It uses a preempt-able read lease to let the handler read from the client socket even while WaitForClientActivity is outstanding. The Peek becomes active once again after the reads are issued and completed. - 473: Revert "Merge pull request #472 from dolthub/aaron/vitess-async-read-eof"
This reverts commit 02705d5447c2e7062c3ae31f6909d4e5e1c97812, reversing changes made to 0893abc805429d8a31ea9fa395ff118fa95474da.