mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:03:02 +01:00
Fixed index expression recursion errors after my recent changes
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
6b051ee65e
commit
6e58bd721c
@ -503,6 +503,7 @@ dsc* IndexExpression::evaluate(Record* record) const
|
||||
return result;
|
||||
}
|
||||
|
||||
// IndexKey class
|
||||
|
||||
idx_e IndexKey::compose(Record* record)
|
||||
{
|
||||
@ -669,6 +670,7 @@ idx_e IndexKey::compose(Record* record)
|
||||
return idx_e_ok;
|
||||
}
|
||||
|
||||
|
||||
void BTR_all(thread_db* tdbb, jrd_rel* relation, IndexDescList& idxList, RelationPages* relPages)
|
||||
{
|
||||
/**************************************
|
||||
|
@ -333,6 +333,11 @@ class IndexCondition
|
||||
{
|
||||
public:
|
||||
IndexCondition(thread_db* tdbb, index_desc* idx);
|
||||
|
||||
IndexCondition(const IndexCondition& other)
|
||||
: m_tdbb(other.m_tdbb), m_condition(other.m_condition), m_request(other.m_request)
|
||||
{}
|
||||
|
||||
~IndexCondition();
|
||||
|
||||
bool evaluate(Record* record) const;
|
||||
@ -347,6 +352,11 @@ class IndexExpression
|
||||
{
|
||||
public:
|
||||
IndexExpression(thread_db* tdbb, index_desc* idx);
|
||||
|
||||
IndexExpression(const IndexExpression& other)
|
||||
: m_tdbb(other.m_tdbb), m_expression(other.m_expression), m_request(other.m_request)
|
||||
{}
|
||||
|
||||
~IndexExpression();
|
||||
|
||||
dsc* evaluate(Record* record) const;
|
||||
@ -376,6 +386,12 @@ public:
|
||||
fb_assert(m_segments && m_segments <= idx->idx_count);
|
||||
}
|
||||
|
||||
IndexKey(const IndexKey& other)
|
||||
: m_tdbb(other.m_tdbb), m_relation(other.m_relation), m_index(other.m_index),
|
||||
m_keyType(other.m_keyType), m_segments(other.m_segments), m_expression(other.m_expression)
|
||||
{
|
||||
}
|
||||
|
||||
idx_e compose(Record* record);
|
||||
|
||||
operator temporary_key*()
|
||||
|
@ -1143,8 +1143,7 @@ void IDX_garbage_collect(thread_db* tdbb, record_param* rpb, RecordStack& going,
|
||||
IndexErrorContext context(rpb->rpb_relation, &idx);
|
||||
IndexCondition condition(tdbb, &idx);
|
||||
|
||||
IndexKey key1(tdbb, rpb->rpb_relation, &idx);
|
||||
IndexKey key2(tdbb, rpb->rpb_relation, &idx);
|
||||
IndexKey key1(tdbb, rpb->rpb_relation, &idx), key2(key1);
|
||||
|
||||
for (RecordStack::iterator stack1(going); stack1.hasData(); ++stack1)
|
||||
{
|
||||
@ -1181,6 +1180,7 @@ void IDX_garbage_collect(thread_db* tdbb, record_param* rpb, RecordStack& going,
|
||||
if (key1 == key2)
|
||||
break;
|
||||
}
|
||||
|
||||
if (stack2.hasData())
|
||||
continue;
|
||||
|
||||
@ -1263,8 +1263,7 @@ void IDX_modify(thread_db* tdbb,
|
||||
IndexErrorContext context(new_rpb->rpb_relation, &idx);
|
||||
idx_e error_code;
|
||||
|
||||
IndexKey newKey(tdbb, new_rpb->rpb_relation, &idx);
|
||||
IndexKey orgKey(tdbb, org_rpb->rpb_relation, &idx);
|
||||
IndexKey newKey(tdbb, new_rpb->rpb_relation, &idx), orgKey(newKey);
|
||||
|
||||
if ( (error_code = newKey.compose(new_rpb->rpb_record)) )
|
||||
{
|
||||
@ -1340,8 +1339,7 @@ void IDX_modify_check_constraints(thread_db* tdbb,
|
||||
IndexErrorContext context(new_rpb->rpb_relation, &idx);
|
||||
idx_e error_code;
|
||||
|
||||
IndexKey newKey(tdbb, new_rpb->rpb_relation, &idx);
|
||||
IndexKey orgKey(tdbb, org_rpb->rpb_relation, &idx);
|
||||
IndexKey newKey(tdbb, new_rpb->rpb_relation, &idx), orgKey(newKey);
|
||||
|
||||
if ( (error_code = newKey.compose(new_rpb->rpb_record)) )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user