mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-02-02 10:00:38 +01:00
Misc.
This commit is contained in:
parent
1698d395a0
commit
132eedb7a6
4
extern/icu/source/common/umutex.c
vendored
4
extern/icu/source/common/umutex.c
vendored
@ -540,7 +540,7 @@ umtx_atomic_inc(int32_t *p) {
|
||||
} else {
|
||||
#if defined (WIN32) && ICU_USE_THREADS == 1
|
||||
retVal = InterlockedIncrement(p);
|
||||
#elif (defined (POSIX)||defined (SOLARIS_MT)) && ICU_USE_THREADS == 1
|
||||
#elif (defined (POSIX) || defined (SOLARIS_MT)) && ICU_USE_THREADS == 1
|
||||
umtx_lock(&gIncDecMutex);
|
||||
retVal = ++(*p);
|
||||
umtx_unlock(&gIncDecMutex);
|
||||
@ -560,7 +560,7 @@ umtx_atomic_dec(int32_t *p) {
|
||||
} else {
|
||||
#if defined (WIN32) && ICU_USE_THREADS == 1
|
||||
retVal = InterlockedDecrement(p);
|
||||
#elif (defined (POSIX)||defined (SOLARIS_MT)) && ICU_USE_THREADS == 1
|
||||
#elif (defined (POSIX) || defined (SOLARIS_MT)) && ICU_USE_THREADS == 1
|
||||
umtx_lock(&gIncDecMutex);
|
||||
retVal = --(*p);
|
||||
umtx_unlock(&gIncDecMutex);
|
||||
|
@ -803,7 +803,7 @@ IndexScratch::IndexScratch(MemoryPool& p, thread_db* tdbb, index_desc* ix,
|
||||
|
||||
int length = 0;
|
||||
const Format* format = csb_tail->csb_format;
|
||||
index_desc::idx_repeat* idx_desc = idx->idx_rpt;
|
||||
const index_desc::idx_repeat* idx_desc = idx->idx_rpt;
|
||||
IndexScratchSegment** segment = segments.begin();
|
||||
for (int i = 0; i < segments.getCount(); i++, idx_desc++) {
|
||||
segment[i] = FB_NEW(p) IndexScratchSegment(p);
|
||||
@ -1619,7 +1619,7 @@ bool OptimizerRetrieval::getInversionCandidates(InversionCandidateList* inversio
|
||||
invCandidate->unique = unique;
|
||||
invCandidate->selectivity = scratch[i]->selectivity;
|
||||
// Calculate the cost (only index pages) for this index.
|
||||
// The constant 3 is an avergae for the rootpage and non-leaf pages.
|
||||
// The constant 3 is an average for the rootpage and non-leaf pages.
|
||||
invCandidate->cost = 3 + (scratch[i]->selectivity * scratch[i]->cardinality);
|
||||
invCandidate->nonFullMatchedSegments =
|
||||
scratch[i]->nonFullMatchedSegments;
|
||||
@ -2058,8 +2058,8 @@ InversionCandidate* OptimizerRetrieval::makeInversion(InversionCandidateList* in
|
||||
totalCost += (newTotalSelectivity * csb->csb_rpt[stream].csb_cardinality);
|
||||
}
|
||||
|
||||
// Test if the new totalCost will be higher as the maximumCost or previous totalCost
|
||||
// and if the current selectivty (without the bestCandidate) is already good enough.
|
||||
// Test if the new totalCost will be higher than the maximumCost or previous totalCost
|
||||
// and if the current selectivity (without the bestCandidate) is already good enough.
|
||||
//if (plan || bestCandidate->selectivity < (totalSelectivity * SELECTIVITY_THRESHOLD_FACTOR_ADD)) {
|
||||
if (plan || ((totalCost < maximumCost) && (totalCost < previousTotalCost) &&
|
||||
(totalSelectivity > minimumSelectivity)))
|
||||
@ -2509,7 +2509,7 @@ InversionCandidate* OptimizerRetrieval::matchOnIndexes(
|
||||
|
||||
|
||||
#ifdef OPT_DEBUG_RETRIEVAL
|
||||
void OptimizerRetrieval::printCandidate(InversionCandidate* candidate) const
|
||||
void OptimizerRetrieval::printCandidate(const InversionCandidate* candidate) const
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2544,7 +2544,7 @@ void OptimizerRetrieval::printCandidate(InversionCandidate* candidate) const
|
||||
fclose(opt_debug_file);
|
||||
}
|
||||
|
||||
void OptimizerRetrieval::printCandidates(InversionCandidateList* inversions) const
|
||||
void OptimizerRetrieval::printCandidates(const InversionCandidateList* inversions) const
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2559,18 +2559,18 @@ void OptimizerRetrieval::printCandidates(InversionCandidateList* inversions) con
|
||||
FILE *opt_debug_file = fopen(OPTIMIZER_DEBUG_FILE, "a");
|
||||
fprintf(opt_debug_file, " retrieval candidates:\n");
|
||||
fclose(opt_debug_file);
|
||||
InversionCandidate** inversion = inversions->begin();
|
||||
const InversionCandidate* const* inversion = inversions->begin();
|
||||
for (int i = 0; i < inversions->getCount(); i++) {
|
||||
InversionCandidate* candidate = inversion[i];
|
||||
const InversionCandidate* candidate = inversion[i];
|
||||
printCandidate(candidate);
|
||||
}
|
||||
}
|
||||
|
||||
void OptimizerRetrieval::printFinalCandidate(InversionCandidate* candidate) const
|
||||
void OptimizerRetrieval::printFinalCandidate(const InversionCandidate* candidate) const
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
* p r i n t C a n d i d a t e
|
||||
* p r i n t F i n a l C a n d i d a t e
|
||||
*
|
||||
**************************************
|
||||
*
|
||||
|
@ -183,9 +183,9 @@ protected:
|
||||
jrd_nod* boolean, USHORT scope) const;
|
||||
|
||||
#ifdef OPT_DEBUG_RETRIEVAL
|
||||
void printCandidate(InversionCandidate* candidate) const;
|
||||
void printCandidates(InversionCandidateList* inversions) const;
|
||||
void printFinalCandidate(InversionCandidate* candidate) const;
|
||||
void printCandidate(const InversionCandidate* candidate) const;
|
||||
void printCandidates(const InversionCandidateList* inversions) const;
|
||||
void printFinalCandidate(const InversionCandidate* candidate) const;
|
||||
#endif
|
||||
|
||||
bool validateStarts(IndexScratch* indexScratch, jrd_nod* boolean, USHORT segment) const;
|
||||
|
Loading…
Reference in New Issue
Block a user