| 3208 | |
| 3209 | |
| 3210 | void Batch::registerBlob(CheckStatusWrapper* status, const ISC_QUAD* existingBlob, ISC_QUAD* blobId) |
| 3211 | { |
| 3212 | try |
| 3213 | { |
| 3214 | // Check and validate handles, etc. |
| 3215 | |
| 3216 | if (!stmt) |
| 3217 | { |
| 3218 | Arg::Gds(isc_bad_req_handle).raise(); |
| 3219 | } |
| 3220 | |
| 3221 | Rsr* statement = stmt->getStatement(); |
| 3222 | CHECK_HANDLE(statement, isc_bad_req_handle); |
| 3223 | Rdb* rdb = statement->rsr_rdb; |
| 3224 | CHECK_HANDLE(rdb, isc_bad_db_handle); |
| 3225 | rem_port* port = rdb->rdb_port; |
| 3226 | RefMutexGuard portGuard(*port->port_sync, FB_FUNCTION); |
| 3227 | |
| 3228 | if (blobPolicy == IBatch::BLOB_ID_ENGINE) |
| 3229 | genBlobId(blobId); |
| 3230 | |
| 3231 | PACKET* packet = &rdb->rdb_packet; |
| 3232 | packet->p_operation = op_batch_regblob; |
| 3233 | P_BATCH_REGBLOB* batch = &packet->p_batch_regblob; |
| 3234 | batch->p_batch_statement = statement->rsr_id; |
| 3235 | batch->p_batch_exist_id = *existingBlob; |
| 3236 | batch->p_batch_blob_id = *blobId; |
| 3237 | |
| 3238 | sendDeferredPacket(status, port, packet, true); |
| 3239 | } |
| 3240 | catch (const Exception& ex) |
| 3241 | { |
| 3242 | ex.stuffException(status); |
| 3243 | } |
| 3244 | } |
| 3245 | |
| 3246 | |
| 3247 | IBatchCompletionState* Batch::execute(CheckStatusWrapper* status, ITransaction* apiTra) |
no test coverage detected