MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / putSegment

Method putSegment

src/jrd/jrd.cpp:3769–3813  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3767
3768
3769void JBlob::putSegment(CheckStatusWrapper* user_status, unsigned int buffer_length, const void* buffer)
3770{
3771/**************************************
3772 *
3773 * g d s _ $ p u t _ s e g m e n t
3774 *
3775 **************************************
3776 *
3777 * Functional description
3778 * Abort a partially completed blob.
3779 *
3780 **************************************/
3781 try
3782 {
3783 EngineContextHolder tdbb(user_status, this, FB_FUNCTION);
3784 check_database(tdbb);
3785
3786 try
3787 {
3788 blb* b = getHandle();
3789
3790 if (buffer_length <= MAX_USHORT)
3791 b->BLB_put_segment(tdbb, buffer, buffer_length);
3792 else if (!b->isSegmented())
3793 b->BLB_put_data(tdbb, static_cast<const UCHAR*>(buffer), buffer_length);
3794 else
3795 {
3796 ERR_post(Arg::Gds(isc_imp_exc) << Arg::Gds(isc_blobtoobig) <<
3797 Arg::Gds(isc_big_segment) << Arg::Num(buffer_length));
3798 }
3799 }
3800 catch (const Exception& ex)
3801 {
3802 transliterateException(tdbb, ex, user_status, "JBlob::putSegment");
3803 return;
3804 }
3805 }
3806 catch (const Exception& ex)
3807 {
3808 ex.stuffException(user_status);
3809 return;
3810 }
3811
3812 successful_completion(user_status);
3813}
3814
3815
3816void JAttachment::putSlice(CheckStatusWrapper* user_status, ITransaction* tra, ISC_QUAD* array_id,

Callers 5

blobWriteMethod · 0.45
writeMethod · 0.45
flushMethod · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 10

check_databaseFunction · 0.85
GdsClass · 0.85
NumClass · 0.85
transliterateExceptionFunction · 0.85
successful_completionFunction · 0.85
BLB_put_segmentMethod · 0.80
isSegmentedMethod · 0.80
BLB_put_dataMethod · 0.80
ERR_postFunction · 0.70
stuffExceptionMethod · 0.45

Tested by

no test coverage detected