| 409 | } |
| 410 | |
| 411 | void DsqlBatch::addBlobStream(thread_db* tdbb, unsigned length, const void* inBuffer) |
| 412 | { |
| 413 | // Sanity checks |
| 414 | if (length == 0) |
| 415 | return; |
| 416 | if (length % BLOB_STREAM_ALIGN) |
| 417 | { |
| 418 | ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) << |
| 419 | Arg::Gds(isc_batch_stream_align)); |
| 420 | } |
| 421 | |
| 422 | blobCheckMode(true, "addBlobStream"); |
| 423 | blobPrepare(); |
| 424 | |
| 425 | // We have no idea where is the last blob located in the stream |
| 426 | m_lastBlob = MAX_ULONG; |
| 427 | |
| 428 | // store stream for further processing |
| 429 | DEB_BATCH(fprintf(stderr, "Store stream %d\n", length)); |
| 430 | fb_assert(m_blobs.getSize() % BLOB_STREAM_ALIGN == 0); |
| 431 | m_blobs.put(inBuffer, length); |
| 432 | } |
| 433 | |
| 434 | void DsqlBatch::registerBlob(thread_db*, const ISC_QUAD* existingBlob, ISC_QUAD* blobId) |
| 435 | { |