|
7 | 7 | *
|
8 | 8 | *
|
9 | 9 | * IDENTIFICATION
|
10 |
| - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.31 1999/02/11 21:05:28 momjian Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.32 1999/02/12 02:37:52 momjian Exp $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
@@ -211,19 +211,25 @@ better_path(Path *new_path, List *unique_paths, bool *is_new)
|
211 | 211 | new_path->path_cost <=path->path_cost))
|
212 | 212 | {
|
213 | 213 | *is_new= false;
|
214 |
| -returnnew_path; |
| 214 | +returnpath; |
215 | 215 | }
|
216 | 216 |
|
217 | 217 | /* same keys, new is more expensive, stop */
|
218 |
| -elseif |
219 |
| -((better_key==0&&better_sort==0&& |
220 |
| -new_path->path_cost >=path->path_cost)|| |
| 218 | +if ((better_key==0&&better_sort==0&& |
| 219 | +new_path->path_cost >=path->path_cost)|| |
221 | 220 |
|
222 | 221 | /* old is better, and less expensive, stop */
|
223 | 222 | (((better_key==2&&better_sort!=1)||
|
224 | 223 | (better_key!=1&&better_sort==2))&&
|
225 | 224 | new_path->path_cost >=path->path_cost))
|
226 | 225 | {
|
| 226 | +#ifdefOPTDB_DEBUG |
| 227 | +printf("better key %d better sort %d\n",better_key,better_sort); |
| 228 | +printf("new\n"); |
| 229 | +pprint(new_path); |
| 230 | +printf("old\n"); |
| 231 | +pprint(path); |
| 232 | +#endif |
227 | 233 | *is_new= false;
|
228 | 234 | returnNULL;
|
229 | 235 | }
|
|