fix index bug

Offering: openGaussDev

More detail: fix index bug

Match-id-0f03a389aa14be42e77b3ae7dc9aa5b0d94cf863
This commit is contained in:
openGaussDev
2022-03-04 14:52:43 +08:00
committed by yanghao
parent 9dd8fb38e7
commit 1763fab84f
2 changed files with 3 additions and 2 deletions

View File

@ -138,7 +138,7 @@ static TupleTableSlot* IndexOnlyNext(IndexOnlyScanState* node)
slot = node->ss.ss_ScanTupleSlot;
isUHeap = RelationIsUstoreFormat(node->ss.ss_currentRelation);
tmpslot = MakeSingleTupleTableSlot(RelationGetDescr(scandesc->heapRelation),
false, scandesc->indexRelation->rd_tam_type);
false, scandesc->heapRelation->rd_tam_type);
/*
* OK, now that we have what we need, fetch the next tuple.

View File

@ -221,7 +221,8 @@ TupleTableSlot *IndexOnlyScanFusion::getTupleSlotInternal()
bool isUStore = RelationIsUstoreFormat(m_rel);
bool bucket_changed = false;
TupleTableSlot* tmpreslot = NULL;
tmpreslot = MakeSingleTupleTableSlot(RelationGetDescr(m_scandesc->heapRelation), false, rel->rd_tam_type);
tmpreslot = MakeSingleTupleTableSlot(RelationGetDescr(m_scandesc->heapRelation),
false, m_scandesc->heapRelation->rd_tam_type);
while ((tid = scan_handler_idx_getnext_tid(m_scandesc, *m_direction, &bucket_changed)) != NULL) {
HeapTuple tuple = NULL;