citus icon indicating copy to clipboard operation
citus copied to clipboard

Fix crash caused by some form of ALTER TABLE ADD COLUMN statements.

Open emelsimsek opened this issue 1 year ago • 1 comments

DESCRIPTION: Fixes a crash caused by some form of ALTER TABLE ADD COLUMN statements. When adding multiple columns, if one of the ADD COLUMN statements contains a FOREIGN constraint ommitting the referenced columns in the statement, a SEGFAULT occurs.

For instance, the following statement results in a crash:

  ALTER TABLE lt ADD COLUMN new_col1 bool,
                          ADD COLUMN new_col2 int references rt;

Fixes #7520.

emelsimsek avatar Feb 20 '24 09:02 emelsimsek

Codecov Report

Merging #7522 (4d0fb50) into main (0acb5f6) will decrease coverage by 0.04%. The diff coverage is 66.66%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7522      +/-   ##
==========================================
- Coverage   89.69%   89.65%   -0.04%     
==========================================
  Files         283      283              
  Lines       60427    60428       +1     
  Branches     7524     7525       +1     
==========================================
- Hits        54197    54178      -19     
- Misses       4078     4097      +19     
- Partials     2152     2153       +1     

codecov[bot] avatar Feb 20 '24 09:02 codecov[bot]

@JelteF @onurctirtir, is this change good to go?

emelsimsek avatar Mar 19 '24 08:03 emelsimsek