From 5186898135f03a6324d96de41cb69240f4085c1a Mon Sep 17 00:00:00 2001 From: dimitr Date: Fri, 15 Jan 2010 11:40:08 +0000 Subject: [PATCH] Misc. --- src/jrd/Optimizer.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/jrd/Optimizer.cpp b/src/jrd/Optimizer.cpp index 303223c27c..94846fe42e 100644 --- a/src/jrd/Optimizer.cpp +++ b/src/jrd/Optimizer.cpp @@ -2834,8 +2834,6 @@ InnerJoinStreamInfo::InnerJoinStreamInfo(MemoryPool& p) : baseIndexes = 0; baseConjunctionMatches = 0; used = false; - - indexedRelationships.shrink(0); previousExpectedStreams = 0; } @@ -2905,13 +2903,13 @@ OptimizerInnerJoin::~OptimizerInnerJoin() for (size_t i = 0; i < innerStreams.getCount(); i++) { - for (size_t j = 0; j < innerStreams[i]->indexedRelationships.getCount(); j++) { + for (size_t j = 0; j < innerStreams[i]->indexedRelationships.getCount(); j++) + { delete innerStreams[i]->indexedRelationships[j]; } - innerStreams[i]->indexedRelationships.clear(); + delete innerStreams[i]; } - innerStreams.clear(); } void OptimizerInnerJoin::calculateCardinalities() @@ -3150,6 +3148,7 @@ int OptimizerInnerJoin::findJoinOrder() if (optimizer->opt_best_count == 0) { IndexedRelationships indexedRelationships(pool); + for (i = 0; i < innerStreams.getCount(); i++) { if (!innerStreams[i]->used)