| 3767 | |
| 3768 | |
| 3769 | void 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 | |
| 3816 | void JAttachment::putSlice(CheckStatusWrapper* user_status, ITransaction* tra, ISC_QUAD* array_id, |
no test coverage detected