Skip to content

Conversation

kalalannn
Copy link
Contributor

@kalalannn kalalannn commented Sep 24, 2025

Fixed panic that occurred when processing ALTER TABLE ... FOREIGN KEY statements where foreign key column names differ from referenced column names (e.g., referee_id references user_id). The bug was caused by searching for the wrong column name in the source table, resulting in nil pointer dereference. Added proper column lookup using FkAttrs instead of PkAttrs and nil check before accessing column properties.

Copy link
Contributor

@VojtechVitek VojtechVitek left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you!

@VojtechVitek VojtechVitek merged commit f5184d8 into master Sep 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants