Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit99c5852

Browse files
committed
Add missing NULL check when building Result Cache paths
Code added in9e21537 to disable building of Result Cache paths whennot all join conditions are part of the parameterization of a uniquejoin failed to first check if the inner path's param_info was set beforechecking the param_info's ppi_clauses.Add a check for NULL values here and just bail on trying to build thepath if param_info is NULL. lateral_vars are not considered whendeciding if the join is unique, so we're not missing out on doing theoptimization when there are lateral_vars and no param_info.Reported-by: Coverity, via Tom LaneDiscussion:https://postgr.es/m/457998.1621779290@sss.pgh.pa.us
1 parentf5024d8 commit99c5852

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/backend/optimizer/path/joinpath.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,8 +530,9 @@ get_resultcache_path(PlannerInfo *root, RelOptInfo *innerrel,
530530
* considering doing that?
531531
*/
532532
if (extra->inner_unique&&
533-
list_length(inner_path->param_info->ppi_clauses)<
534-
list_length(extra->restrictlist))
533+
(inner_path->param_info==NULL||
534+
list_length(inner_path->param_info->ppi_clauses)<
535+
list_length(extra->restrictlist)))
535536
returnNULL;
536537

537538
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp