Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit cbb4213

Browse files
committed
if ( new_rel->size <= 0 )
new_rel->size = compute_rel_size(new_rel);
1 parent 71b3e93 commit cbb4213

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/backend/optimizer/geqo/geqo_eval.c

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: geqo_eval.c,v 1.10 1997/06/06 03:18:02 vadim Exp $
8+
* $Id: geqo_eval.c,v 1.11 1997/06/10 07:53:53 vadim Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -157,9 +157,8 @@ gimme_tree (Query *root, Gene *tour, int rel_count, int num_gene, Rel *outer_rel
157157
geqo_rel_paths(new_rel);
158158

159159
/* processing of other new_rel attributes */
160-
#if 0 /* compute_joinrel_size already called by geqo_rel_paths */
161-
new_rel->size = compute_rel_size(new_rel);
162-
#endif
160+
if ( new_rel->size <= 0 )
161+
new_rel->size = compute_rel_size(new_rel);
163162
new_rel->width = compute_rel_width(new_rel);
164163

165164
root->join_relation_list_ = lcons(new_rel, NIL);

src/backend/optimizer/geqo/geqo_paths.c

+9-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: geqo_paths.c,v 1.2 1997/02/19 14:52:06 scrappy Exp $
8+
* $Id: geqo_paths.c,v 1.3 1997/06/10 07:53:55 vadim Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -102,16 +102,17 @@ geqo_rel_paths(Rel *rel)
102102
Path *path = (Path*)NULL;
103103
JoinPath *cheapest = (JoinPath*)NULL;
104104

105-
foreach(y, rel->pathlist) {
106-
path = (Path*)lfirst(y);
105+
rel->size = 0;
106+
foreach(y, rel->pathlist)
107+
{
108+
path = (Path*)lfirst(y);
107109

108-
if(!path->p_ordering.ord.sortop) {
110+
if(!path->p_ordering.ord.sortop)
109111
break;
110-
}
111-
}
112+
}
112113

113-
cheapest = (JoinPath*)set_paths(rel, path);
114-
rel->size = compute_joinrel_size(cheapest);
114+
cheapest = (JoinPath*)set_paths(rel, path);
115+
rel->size = compute_joinrel_size(cheapest);
115116
}
116117

117118

0 commit comments

Comments
 (0)