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

Commit72826fb

Browse files
committed
Guard against incoming rowcount estimate of NaN in cost_mergejoin().
Although rowcount estimates really ought not be NaN, a bug elsewherecould perhaps result in that, and that would cause Assert failure incost_mergejoin, which I believe to be the explanation for bug #5977 fromAnton Kuznetsov. Seems like a good idea to expend a couple more cyclesto prevent that, even though the real bug is elsewhere. Not back-patching,though, because we don't encourage running production systems withAsserts on.
1 parentd5a7bf8 commit72826fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,10 +1704,10 @@ cost_mergejoin(MergePath *path, PlannerInfo *root, SpecialJoinInfo *sjinfo)
17041704
innerendsel;
17051705
Pathsort_path;/* dummy for result of cost_sort */
17061706

1707-
/* Protect some assumptions below that rowcounts aren't zero */
1708-
if (outer_path_rows <=0)
1707+
/* Protect some assumptions below that rowcounts aren't zeroor NaN*/
1708+
if (outer_path_rows <=0||isnan(outer_path_rows))
17091709
outer_path_rows=1;
1710-
if (inner_path_rows <=0)
1710+
if (inner_path_rows <=0||isnan(inner_path_rows))
17111711
inner_path_rows=1;
17121712

17131713
if (!enable_mergejoin)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp