|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.18 1998/07/27 19:37:58 vadim Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.19 1998/07/31 15:10:40 vadim Exp $ |
12 | 12 | *
|
13 | 13 | *-------------------------------------------------------------------------
|
14 | 14 | */
|
@@ -405,10 +405,10 @@ group_clauses_by_indexkey(RelOptInfo *rel,
|
405 | 405 | intcurIndxKey;
|
406 | 406 | OidcurClass;
|
407 | 407 |
|
408 |
| -if (clauseinfo_list==NIL) |
| 408 | +if (clauseinfo_list==NIL||indexkeys[0]==0) |
409 | 409 | returnNIL;
|
410 | 410 |
|
411 |
| -while (!DoneMatchingIndexKeys(indexkeys,index)) |
| 411 | +do |
412 | 412 | {
|
413 | 413 | List*tempgroup=NIL;
|
414 | 414 |
|
@@ -438,7 +438,7 @@ group_clauses_by_indexkey(RelOptInfo *rel,
|
438 | 438 | indexkeys++;
|
439 | 439 | classes++;
|
440 | 440 |
|
441 |
| -} |
| 441 | +}while (!DoneMatchingIndexKeys(indexkeys,index)); |
442 | 442 |
|
443 | 443 | /* clausegroup holds all matched clauses ordered by indexkeys */
|
444 | 444 |
|
@@ -469,10 +469,10 @@ group_clauses_by_ikey_for_joins(RelOptInfo *rel,
|
469 | 469 | OidcurClass;
|
470 | 470 | booljfound= false;
|
471 | 471 |
|
472 |
| -if (join_cinfo_list==NIL) |
| 472 | +if (join_cinfo_list==NIL||indexkeys[0]==0) |
473 | 473 | returnNIL;
|
474 | 474 |
|
475 |
| -while (!DoneMatchingIndexKeys(indexkeys,index)) |
| 475 | +do |
476 | 476 | {
|
477 | 477 | List*tempgroup=NIL;
|
478 | 478 |
|
@@ -518,7 +518,7 @@ group_clauses_by_ikey_for_joins(RelOptInfo *rel,
|
518 | 518 | indexkeys++;
|
519 | 519 | classes++;
|
520 | 520 |
|
521 |
| -} |
| 521 | +}while (!DoneMatchingIndexKeys(indexkeys,index)); |
522 | 522 |
|
523 | 523 | /* clausegroup holds all matched clauses ordered by indexkeys */
|
524 | 524 |
|
|