Skip to content

Commit 881c218

Browse files
committed
This should fix bug #7044 : Error: Data page N {sequence M} marked as secondary but contains primary record versions in table T
1 parent 74933b9 commit 881c218

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/jrd/dpm.epp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3018,6 +3018,16 @@ static UCHAR* find_space(thread_db* tdbb,
30183018
const SSHORT aligned_size = ROUNDUP(size, ODS_ALIGNMENT);
30193019
data_page* page = (data_page*) rpb->getWindow(tdbb).win_buffer;
30203020

3021+
if ((page->dpg_count > 0) && (type == DPM_primary) && (page->dpg_header.pag_flags & dpg_secondary))
3022+
{
3023+
// Attempt to put primary record on secondary data page - seems
3024+
// flags on PP is not correct. Fix flags and let caller to find
3025+
// space for record at another data page.
3026+
3027+
mark_full(tdbb, rpb);
3028+
return NULL;
3029+
}
3030+
30213031
// Scan allocated lines looking for an empty slot, the high water mark,
30223032
// and the amount of space potentially available on the page
30233033

0 commit comments

Comments
 (0)