@@ -2488,9 +2488,6 @@ RecordNumber DPM_store_blob(thread_db* tdbb, blb* blob, jrd_rel* relation, Recor
24882488 rpb.rpb_transaction_nr = tdbb->getTransaction()->tra_number;
24892489 rpb.rpb_flags = rpb_blob;
24902490
2491- if (blob->blb_flags & BLB_bulk)
2492- rpb.rpb_stream_flags |= RPB_s_bulk;
2493-
24942491 blh* header = (blh*) locate_space(tdbb, &rpb, (SSHORT) (BLH_SIZE + length),
24952492 stack, record, DPM_other);
24962493 header->blh_flags = rhd_blob;
@@ -3691,17 +3688,9 @@ static rhd* locate_space(thread_db* tdbb,
36913688 ULONG pp_sequence =
36923689 (type == DPM_primary ? relPages->rel_pri_data_space : relPages->rel_sec_data_space);
36933690
3694- const bool bulkInsert = (type == DPM_primary || isBlob) && (rpb->rpb_stream_flags & RPB_s_bulk);
3695-
36963691 for (;; pp_sequence++)
36973692 {
3698- // Bulk inserts looks up for empty DP only to avoid contention with
3699- // another attachments doing bulk inserts. Note, DP number is saved in
3700- // relPages->rel_last_free_pri_dp and next insert by same attachment
3701- // will use same DP while concurrent bulk attachments will ignore it as
3702- // non-empty. Take write lock on PP early to clear 'empty' flag.
3703-
3704- locklevel_t ppLock = bulkInsert ? LCK_write : LCK_read;
3693+ locklevel_t ppLock = LCK_read;
37053694
37063695 if (type == DPM_primary)
37073696 relPages->rel_pri_data_space = pp_sequence;
@@ -3745,9 +3734,6 @@ static rhd* locate_space(thread_db* tdbb,
37453734 bool dp_is_empty = PPG_DP_BIT_TEST(bits, slot, ppg_dp_empty);
37463735 bool dp_is_secondary = PPG_DP_BIT_TEST(bits, slot, ppg_dp_secondary);
37473736
3748- if (bulkInsert && !dp_is_empty)
3749- continue;
3750-
37513737 if (dp_is_empty)
37523738 {
37533739 if (ppLock == LCK_read)
0 commit comments