@@ -283,9 +283,9 @@ struct RBlobInfo
283283};
284284
285285// Used in XDR
286- class RemBlobBuffer : public Firebird ::HalfStaticArray <UCHAR, BLOB_LENGTH >
286+ class RemBlobBuffer : public Firebird ::Array <UCHAR>
287287{
288- using Firebird::HalfStaticArray <UCHAR, BLOB_LENGTH >::HalfStaticArray ;
288+ using Firebird::Array <UCHAR>::Array ;
289289};
290290
291291struct Rbl : public Firebird ::GlobalStorage, public TypedHandle<rem_type_rbl>
@@ -319,11 +319,11 @@ struct Rbl : public Firebird::GlobalStorage, public TypedHandle<rem_type_rbl>
319319 };
320320
321321public:
322- Rbl () :
322+ Rbl (unsigned int initialSize ) :
323323 rbl_data (getPool()), rbl_rdb(0 ), rbl_rtr(0 ),
324- rbl_buffer (rbl_data.getBuffer(BLOB_LENGTH )), rbl_ptr(rbl_buffer), rbl_iface(NULL ),
324+ rbl_buffer (rbl_data.getBuffer(initialSize )), rbl_ptr(rbl_buffer), rbl_iface(NULL ),
325325 rbl_blob_id (NULL_BLOB), rbl_offset(0 ), rbl_id(0 ), rbl_flags(0 ),
326- rbl_buffer_length (BLOB_LENGTH ), rbl_length(0 ), rbl_fragment_length(0 ),
326+ rbl_buffer_length (initialSize ), rbl_length(0 ), rbl_fragment_length(0 ),
327327 rbl_source_interp (0 ), rbl_target_interp(0 ), rbl_self(NULL )
328328 { }
329329
@@ -339,6 +339,7 @@ struct Rbl : public Firebird::GlobalStorage, public TypedHandle<rem_type_rbl>
339339 static ISC_STATUS badHandle () { return isc_bad_segstr_handle; }
340340
341341 bool isCached () const { return rbl_flags & CACHED; }
342+ unsigned getCachedSize () const { return sizeof (Rbl) + rbl_data.getCapacity (); }
342343
343344 static const SQUAD& generate (const void *, const Rbl* item) { return item->rbl_blob_id ; }
344345};
0 commit comments