"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/jrd/idx.cpp" between
Firebird-3.0.2.32703-0.tar.bz2 and Firebird-3.0.4.33054-0.tar.bz2

About: Firebird is a relational database offering many ANSI SQL standard features.

idx.cpp  (Firebird-3.0.2.32703-0.tar.bz2):idx.cpp  (Firebird-3.0.4.33054-0.tar.bz2)
skipping to change at line 368 skipping to change at line 368
IndexErrorContext context(relation, idx, index_name); IndexErrorContext context(relation, idx, index_name);
// Loop thru the relation computing index keys. If there are old version s, find them, too. // Loop thru the relation computing index keys. If there are old version s, find them, too.
temporary_key key; temporary_key key;
while (DPM_next(tdbb, &primary, LCK_read, false)) while (DPM_next(tdbb, &primary, LCK_read, false))
{ {
if (!VIO_garbage_collect(tdbb, &primary, transaction)) if (!VIO_garbage_collect(tdbb, &primary, transaction))
continue; continue;
if (primary.rpb_flags & rpb_deleted) const bool deleted = primary.rpb_flags & rpb_deleted;
if (deleted)
CCH_RELEASE(tdbb, &primary.getWindow(tdbb)); CCH_RELEASE(tdbb, &primary.getWindow(tdbb));
else else
{ {
primary.rpb_record = gc_record; primary.rpb_record = gc_record;
VIO_data(tdbb, &primary, relation->rel_pool); VIO_data(tdbb, &primary, relation->rel_pool);
stack.push(primary.rpb_record); stack.push(primary.rpb_record);
} }
secondary.rpb_page = primary.rpb_b_page; secondary.rpb_page = primary.rpb_b_page;
secondary.rpb_line = primary.rpb_b_line; secondary.rpb_line = primary.rpb_b_line;
skipping to change at line 485 skipping to change at line 487
{ {
memset(p, pad, l); memset(p, pad, l);
p += l; p += l;
} }
const bool key_is_null = (key.key_nulls == (1 << idx->idx _count) - 1); const bool key_is_null = (key.key_nulls == (1 << idx->idx _count) - 1);
index_sort_record* isr = (index_sort_record*) p; index_sort_record* isr = (index_sort_record*) p;
isr->isr_record_number = primary.rpb_number.getValue(); isr->isr_record_number = primary.rpb_number.getValue();
isr->isr_key_length = key.key_length; isr->isr_key_length = key.key_length;
isr->isr_flags = (stack.hasData() ? ISR_secondary : 0) | (key_is_null ? ISR_null : 0); isr->isr_flags = ((stack.hasData() || deleted) ? ISR_seco ndary : 0) | (key_is_null ? ISR_null : 0);
if (record != gc_record) if (record != gc_record)
delete record; delete record;
} }
if (ifl_data.ifl_duplicates > 0) if (ifl_data.ifl_duplicates > 0)
break; break;
if (--tdbb->tdbb_quantum < 0) if (--tdbb->tdbb_quantum < 0)
JRD_reschedule(tdbb, 0, true); JRD_reschedule(tdbb, 0, true);
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)