8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 07:23:04 +01:00

Avoid repeating evaluation of the invariant pre-condition which is already known to be TRUE

This commit is contained in:
Dmitry Yemanov 2023-11-18 21:37:17 +03:00
parent 05614ce166
commit d91029d8ed

View File

@ -94,6 +94,17 @@ bool FilteredStream::internalGetRecord(thread_db* tdbb) const
if (!(impure->irsb_flags & irsb_open))
return false;
if (m_invariant)
{
if (!m_next->getRecord(tdbb))
{
invalidateRecords(request);
return false;
}
return true;
}
if (!evaluateBoolean(tdbb))
{
invalidateRecords(request);