| 2432 |
return (count >= 1); |
return (count >= 1); |
| 2433 |
} |
} |
| 2434 |
|
|
| 2435 |
|
namespace |
| 2436 |
|
{ |
| 2437 |
|
class IndexScratchListHolder |
| 2438 |
|
{ |
| 2439 |
|
public: |
| 2440 |
|
IndexScratchListHolder (IndexScratchList& Scratches) : |
| 2441 |
|
m_Scratches(Scratches) {}; |
| 2442 |
|
|
| 2443 |
|
~IndexScratchListHolder() |
| 2444 |
|
{ |
| 2445 |
|
clear(); |
| 2446 |
|
} |
| 2447 |
|
|
| 2448 |
|
void clear() |
| 2449 |
|
{ |
| 2450 |
|
for (int i = 0; i < m_Scratches.getCount(); i++) |
| 2451 |
|
{ |
| 2452 |
|
IndexScratch* s = m_Scratches[i]; |
| 2453 |
|
m_Scratches[i] = 0; |
| 2454 |
|
delete s; |
| 2455 |
|
} |
| 2456 |
|
m_Scratches.clear(); |
| 2457 |
|
} |
| 2458 |
|
|
| 2459 |
|
private: |
| 2460 |
|
IndexScratchList& m_Scratches; |
| 2461 |
|
}; |
| 2462 |
|
} // namespace |
| 2463 |
|
|
| 2464 |
InversionCandidate* OptimizerRetrieval::matchOnIndexes( |
InversionCandidate* OptimizerRetrieval::matchOnIndexes( |
| 2465 |
IndexScratchList* indexScratches, jrd_nod* boolean, USHORT scope) const |
IndexScratchList* indexScratches, jrd_nod* boolean, USHORT scope) const |
| 2466 |
{ |
{ |
| 2487 |
|
|
| 2488 |
// Make list for index matches |
// Make list for index matches |
| 2489 |
IndexScratchList indexOrScratches; |
IndexScratchList indexOrScratches; |
| 2490 |
|
IndexScratchListHolder scratchHolder(indexOrScratches); |
| 2491 |
|
|
| 2492 |
// Copy information from caller |
// Copy information from caller |
| 2493 |
IndexScratch** indexScratch = indexScratches->begin(); |
IndexScratch** indexScratch = indexScratches->begin(); |
| 2494 |
int i = 0; |
int i = 0; |
| 2515 |
} |
} |
| 2516 |
|
|
| 2517 |
// Clear list to remove previously matched conjunctions |
// Clear list to remove previously matched conjunctions |
| 2518 |
indexOrScratches.clear(); |
scratchHolder.clear(); |
| 2519 |
// Copy information from caller |
// Copy information from caller |
| 2520 |
indexScratch = indexScratches->begin(); |
indexScratch = indexScratches->begin(); |
| 2521 |
i = 0; |
i = 0; |