| 3059 | |
| 3060 | |
| 3061 | void Batch::setDefaultBpb(CheckStatusWrapper* status, unsigned parLength, const unsigned char* par) |
| 3062 | { |
| 3063 | try |
| 3064 | { |
| 3065 | // Check and validate handles, etc. |
| 3066 | if (!stmt) |
| 3067 | Arg::Gds(isc_bad_req_handle).raise(); |
| 3068 | |
| 3069 | Rsr* statement = stmt->getStatement(); |
| 3070 | CHECK_HANDLE(statement, isc_bad_req_handle); |
| 3071 | Rdb* rdb = statement->rsr_rdb; |
| 3072 | CHECK_HANDLE(rdb, isc_bad_db_handle); |
| 3073 | rem_port* port = rdb->rdb_port; |
| 3074 | RefMutexGuard portGuard(*port->port_sync, FB_FUNCTION); |
| 3075 | |
| 3076 | // Check for presence of any data in batch buffers |
| 3077 | if (batchHasData()) |
| 3078 | Arg::Gds(isc_batch_defbpb).raise(); |
| 3079 | |
| 3080 | // Set default segmentation flag |
| 3081 | defSegmented = fb_utils::isBpbSegmented(parLength, par); |
| 3082 | |
| 3083 | // Prepare and send the packet |
| 3084 | PACKET* packet = &rdb->rdb_packet; |
| 3085 | packet->p_operation = op_batch_set_bpb; |
| 3086 | P_BATCH_SETBPB* batch = &packet->p_batch_setbpb; |
| 3087 | batch->p_batch_statement = statement->rsr_id; |
| 3088 | batch->p_batch_blob_bpb.cstr_address = par; |
| 3089 | batch->p_batch_blob_bpb.cstr_length = parLength; |
| 3090 | |
| 3091 | sendDeferredPacket(status, port, packet, true); |
| 3092 | } |
| 3093 | catch (const Exception& ex) |
| 3094 | { |
| 3095 | ex.stuffException(status); |
| 3096 | } |
| 3097 | } |
| 3098 | |
| 3099 | |
| 3100 | unsigned Batch::getBlobAlignment(CheckStatusWrapper* status) |
no test coverage detected