mirror of
https://github.com/postgres/postgres.git
synced 2025-07-17 06:41:09 +03:00
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...
This commit is contained in:
@ -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,
|
|||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user