Commit 11a0027e authored by Tom Lane's avatar Tom Lane

Fix nasty little typo that prevented get_cheapest_path_for_joinkeys

from ever returning a path.  This put a bit of a crimp in the system's
ability to generate intelligent merge-join plans...
parent 52f1b2f3
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/pathkeys.c,v 1.7 1999/02/22 05:26:20 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/pathkeys.c,v 1.8 1999/04/30 03:59:06 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -240,10 +240,8 @@ get_cheapest_path_for_joinkeys(List *joinkeys, ...@@ -240,10 +240,8 @@ get_cheapest_path_for_joinkeys(List *joinkeys,
pathorder_match(ordering, path->pathorder, &better_sort) && pathorder_match(ordering, path->pathorder, &better_sort) &&
better_sort == 0) better_sort == 0)
{ {
if (matched_path) if (matched_path == NULL ||
if (path->path_cost < matched_path->path_cost) path->path_cost < matched_path->path_cost)
matched_path = path;
else
matched_path = path; matched_path = path;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment