SortedStream.cpp (Firebird-3.0.2.32703-0.tar.bz2) | : | SortedStream.cpp (Firebird-3.0.4.33054-0.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 348 | skipping to change at line 348 | |||
// a sort key, there is a later nod_field in the item | // a sort key, there is a later nod_field in the item | |||
// list that contains the data to send back | // list that contains the data to send back | |||
if (IS_INTL_DATA(&item->desc) && | if (IS_INTL_DATA(&item->desc) && | |||
(ULONG)(IPTR) item->desc.dsc_address < m_map->keyLength) | (ULONG)(IPTR) item->desc.dsc_address < m_map->keyLength) | |||
{ | { | |||
continue; | continue; | |||
} | } | |||
record_param* const rpb = &request->req_rpb[item->stream]; | record_param* const rpb = &request->req_rpb[item->stream]; | |||
jrd_rel* const relation = rpb->rpb_relation; | ||||
const SSHORT id = item->fieldId; | const SSHORT id = item->fieldId; | |||
if (id < 0) | if (id < 0) | |||
{ | { | |||
switch (id) | switch (id) | |||
{ | { | |||
case ID_TRANS: | case ID_TRANS: | |||
rpb->rpb_transaction_nr = *reinterpret_cast<SINT6 4*>(from.dsc_address); | rpb->rpb_transaction_nr = *reinterpret_cast<SINT6 4*>(from.dsc_address); | |||
break; | break; | |||
case ID_DBKEY: | case ID_DBKEY: | |||
rpb->rpb_number.setValue(*reinterpret_cast<SINT64 *>(from.dsc_address)); | rpb->rpb_number.setValue(*reinterpret_cast<SINT64 *>(from.dsc_address)); | |||
break; | break; | |||
case ID_DBKEY_VALID: | case ID_DBKEY_VALID: | |||
rpb->rpb_number.setValid(*from.dsc_address != 0); | rpb->rpb_number.setValid(*from.dsc_address != 0); | |||
break; | break; | |||
default: | default: | |||
fb_assert(false); | fb_assert(false); | |||
} | } | |||
rpb->rpb_runtime_flags |= RPB_refetch; | if (relation && | |||
!relation->rel_file && | ||||
!relation->rel_view_rse && | ||||
!relation->isVirtual()) | ||||
{ | ||||
rpb->rpb_runtime_flags |= RPB_refetch; | ||||
} | ||||
continue; | continue; | |||
} | } | |||
if (item->stream != stream) | if (item->stream != stream) | |||
{ | { | |||
stream = item->stream; | stream = item->stream; | |||
// For the sake of prudence, set all record parameter blo cks to contain | // For the sake of prudence, set all record parameter blo cks to contain | |||
// the most recent format. This will guarantee that all f ields mapped | // the most recent format. This will guarantee that all f ields mapped | |||
// back to records have homes in the target record. | // back to records have homes in the target record. | |||
// dimitr: I've added the check for !isValid to ensu re that we don't overwrite | // dimitr: I've added the check for !isValid to ensu re that we don't overwrite | |||
// the format for an active rpb (i.e . the one having some record fetched). | // the format for an active rpb (i.e . the one having some record fetched). | |||
// See CORE-3806 for example. | // See CORE-3806 for example. | |||
if (rpb->rpb_relation && !rpb->rpb_number.isValid()) | if (relation && !rpb->rpb_number.isValid()) | |||
VIO_record(tdbb, rpb, MET_current(tdbb, rpb->rpb_ | VIO_record(tdbb, rpb, MET_current(tdbb, relation) | |||
relation), tdbb->getDefaultPool()); | , tdbb->getDefaultPool()); | |||
} | } | |||
Record* const record = rpb->rpb_record; | Record* const record = rpb->rpb_record; | |||
record->reset(); | record->reset(); | |||
if (flag) | if (flag) | |||
record->setNull(id); | record->setNull(id); | |||
else | else | |||
{ | { | |||
EVL_field(rpb->rpb_relation, record, id, &to); | EVL_field(rpb->rpb_relation, record, id, &to); | |||
End of changes. 3 change blocks. | ||||
4 lines changed or deleted | 12 lines changed or added |