8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 00:03:03 +01:00

Rolled back the optimization committed recently due to the found regressions. A better solution is researched.

This commit is contained in:
dimitr 2012-04-08 05:57:12 +00:00
parent 3e192470ae
commit c781f51ecf
2 changed files with 1 additions and 8 deletions

View File

@ -155,18 +155,13 @@ namespace Jrd
lock->lck_object = counter;
LCK_lock(tdbb, lock, LCK_PW, LCK_WAIT);
counter->isProtected = true;
counter->curVal = 1;
counter->maxVal = 0;
}
if (counter->curVal > counter->maxVal)
{
if (!counter->isProtected)
{
LCK_convert(tdbb, counter->lock, LCK_PW, LCK_WAIT);
counter->isProtected = true;
}
LCK_convert(tdbb, counter->lock, LCK_PW, LCK_WAIT);
counter->curVal = LCK_read_data(tdbb, counter->lock);
@ -201,7 +196,6 @@ namespace Jrd
Jrd::ContextPoolHolder context(tdbb, dbb->dbb_permanent);
LCK_downgrade(tdbb, counter->lock);
counter->isProtected = false;
}
catch (const Firebird::Exception&)
{} // no-op

View File

@ -287,7 +287,6 @@ public:
struct ValueCache
{
Lock* lock;
bool isProtected;
SLONG curVal;
SLONG maxVal;
};