-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix segfault. Issue #7381 #7554
Conversation
@microsoft-github-policy-service agree company="Fors" |
Thank you for the contribution! On first glance the fix looks reasonable. Could you add a the repro case from the linked issue as a regression test? That way we can make sure we wont re-introduce this issue accidentally in the future. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #7554 +/- ##
=======================================
Coverage 89.68% 89.68%
=======================================
Files 282 282
Lines 60460 60461 +1
Branches 7529 7530 +1
=======================================
+ Hits 54224 54226 +2
Misses 4083 4083
+ Partials 2153 2152 -1 |
I've added test to multi_schedule, do not know if it is ok, but only there it works |
src/test/regress/multi_schedule
Outdated
@@ -134,3 +134,5 @@ test: check_mx | |||
test: generated_identity | |||
test: drop_database | |||
test: check_cluster_state | |||
|
|||
test: function_with_case_when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you move this test to somewhere above line 125, which contains ensure_no_intermediate_data_leak
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -0,0 +1,22 @@ | |||
-- create function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid leaking objects from one test to another we generally create a dedicated schema for the test and set the search_path accordingly. The easiest way to do that is by running this script: https://github.com/citusdata/citus/blob/main/src/test/regress/bin/create_test.py
end;$$ ; | ||
|
||
-- call function | ||
SELECT test_err('test'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should end with DROP SCHEMA function_with_case
When using a CASE WHEN expression in the body of the function that is used in the DO block, a segmentation fault occured. This fixes that. Fixes #7381 --------- Co-authored-by: Konstantin Morozov <vzbdryn@yahoo.com>
Hi!
DESCRIPTION: Fixes segmentation fault when using CASE WHEN in DO block functions
Fixes #7381