|
5 | 5 | *
|
6 | 6 | * Copyright (c) 1994, Regents of the University of California
|
7 | 7 | *
|
8 |
| - * $Id: geqo_eval.c,v 1.5 1997/03/01 22:22:21 momjian Exp $ |
| 8 | + * $Id: geqo_eval.c,v 1.6 1997/03/03 23:26:45 scrappy Exp $ |
9 | 9 | *
|
10 | 10 | *-------------------------------------------------------------------------
|
11 | 11 | */
|
@@ -371,10 +371,18 @@ new_joininfo_list(List *joininfo_list, List *join_relids)
|
371 | 371 | List*xjoininfo=NIL;
|
372 | 372 |
|
373 | 373 | foreach (xjoininfo,joininfo_list) {
|
| 374 | +List*or; |
374 | 375 | JInfo*joininfo= (JInfo*)lfirst(xjoininfo);
|
375 | 376 |
|
376 | 377 | new_otherrels=joininfo->otherrels;
|
377 |
| -if (nonoverlap_sets(new_otherrels,join_relids)) { |
| 378 | +foreach (or,new_otherrels) |
| 379 | +{ |
| 380 | +if (intMember (lfirsti(or),join_relids) ) |
| 381 | +new_otherrels=lremove ((void*)lfirst(or),new_otherrels); |
| 382 | +} |
| 383 | +joininfo->otherrels=new_otherrels; |
| 384 | +if (new_otherrels!=NIL ) |
| 385 | +{ |
378 | 386 | other_joininfo=joininfo_member(new_otherrels,
|
379 | 387 | current_joininfo_list);
|
380 | 388 | if(other_joininfo) {
|
|