Skip to content

Various bug fixes for checking foreign key constraints during merge#10418

Merged
zachmu merged 26 commits intomainfrom
zachmu/merge-bug-2
Feb 5, 2026
Merged

Various bug fixes for checking foreign key constraints during merge#10418
zachmu merged 26 commits intomainfrom
zachmu/merge-bug-2

Conversation

@zachmu
Copy link
Copy Markdown
Member

@zachmu zachmu commented Feb 4, 2026

This PR mainly addresses the need to perform type conversions when performing index lookups when determining whether a diff introduces a foreign key constraint violation. The old code assumed that the key values were binary identical between parent and child table, and this isn't always the case (esp in Doltgres).

Also fixes a related bug in constructing the primary key from a secondary key, which occurs when a secondary index contains primary key columns.

@coffeegoddd
Copy link
Copy Markdown
Contributor

@zachmu DOLT

comparing_percentages
100.000000 to 100.000000
version result total
fc712b8 ok 5937471
version total_tests
fc712b8 5937471
correctness_percentage
100.0

Copy link
Copy Markdown
Contributor

@Hydrocharged Hydrocharged left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! No real comments to make

@zachmu zachmu merged commit 38d7488 into main Feb 5, 2026
19 of 20 checks passed
@coffeegoddd
Copy link
Copy Markdown
Contributor

@zachmu DOLT

comparing_percentages
100.000000 to 100.000000
version result total
827faa1 ok 5937471
version total_tests
827faa1 5937471
correctness_percentage
100.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants