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

Method putSegment

src/remote/client/interface.cpp:522–555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

520 }
521
522 void putSegment(ULONG size, const void* ptr)
523 {
524 if (!sizePointer)
525 {
526 newBlob();
527
528 ISC_QUAD quadZero = {0, 0};
529 putBlobData(sizeof quadZero, &quadZero);
530 setSizePointer();
531 ULONG longZero = 0;
532 putBlobData(sizeof longZero, &longZero);
533 putBlobData(sizeof longZero, &longZero);
534 }
535
536 *sizePointer += size;
537
538 if (segmented)
539 {
540 if (size > MAX_USHORT)
541 {
542 (Arg::Gds(isc_imp_exc) << Arg::Gds(isc_blobtoobig)
543 << Arg::Gds(isc_big_segment) << Arg::Num(size)).raise();
544 }
545
546 *sizePointer += sizeof(USHORT);
547
548 alignBlobBuffer(BLOB_SEGHDR_ALIGN, sizePointer);
549
550 USHORT segSize = size;
551 putBlobData(sizeof segSize, &segSize);
552 }
553
554 putBlobData(size, ptr);
555 }
556
557 void flashBatch()
558 {

Callers

nothing calls this directly

Calls 3

GdsClass · 0.85
NumClass · 0.85
raiseMethod · 0.45

Tested by

no test coverage detected