| 342 | } |
| 343 | |
| 344 | void DsqlBatch::addBlob(thread_db* tdbb, ULONG length, const void* inBuffer, ISC_QUAD* blobId, |
| 345 | unsigned parLength, const unsigned char* par) |
| 346 | { |
| 347 | blobCheckMode(false, "addBlob"); |
| 348 | blobPrepare(); |
| 349 | |
| 350 | // Get ready to appendBlobData() |
| 351 | m_lastBlob = m_blobs.getSize(); |
| 352 | fb_assert(m_lastBlob % BLOB_STREAM_ALIGN == 0); |
| 353 | |
| 354 | // Generate auto blob ID if needed |
| 355 | if (m_blobPolicy == IBatch::BLOB_ID_ENGINE) |
| 356 | genBlobId(blobId); |
| 357 | |
| 358 | // Determine type of current blob |
| 359 | setFlag(FLAG_CURRENT_SEGMENTED, parLength ? fb_utils::isBpbSegmented(parLength, par) : m_flags & (1 << FLAG_DEFAULT_SEGMENTED)); |
| 360 | |
| 361 | // Store header |
| 362 | m_blobs.put(blobId, sizeof(ISC_QUAD)); |
| 363 | ULONG fullLength = length + parLength; |
| 364 | m_blobs.put(&fullLength, sizeof(ULONG)); |
| 365 | m_blobs.put(&parLength, sizeof(ULONG)); |
| 366 | DEB_BATCH(fprintf(stderr, "addBlob %08x.%08x par %u full %u ", |
| 367 | blobId->gds_quad_high, blobId->gds_quad_low, parLength, fullLength)); |
| 368 | |
| 369 | // Store BPB |
| 370 | if (parLength) |
| 371 | m_blobs.put(par, parLength); |
| 372 | |
| 373 | // Finally store user data |
| 374 | putSegment(length, inBuffer); |
| 375 | } |
| 376 | |
| 377 | void DsqlBatch::appendBlobData(thread_db* tdbb, ULONG length, const void* inBuffer) |
| 378 | { |
nothing calls this directly
no test coverage detected