Re: [Firebird-devel] Content for p_batch_create.p_batch_pb

2021-12-16 Thread Alex Peshkoff via Firebird-devel
On 12/16/21 13:48, Jiří Činčura wrote: Afraid there is - as always :( - no protocol description except source code. Key ops are op_batch_msg, op_batch_blob_stream & also op_batch_cs (retuning batch execution state to client). Can you create some simple paragraph with the description? Because

Re: [Firebird-devel] Content for p_batch_create.p_batch_pb

2021-12-16 Thread Alex Peshkoff via Firebird-devel
On 12/16/21 11:51, Jiří Činčura wrote: What should be in p_batch_create.p_batch_pb? Is this some new format or something like DPB? Exactly like DPB v.2 (i.e. 32-bit clumplet lengths). And what should - logically - be inside? Or maybe more broadly, is there some high level description of the

Re: [Firebird-devel] Content for p_batch_create.p_batch_pb

2021-12-16 Thread Jiří Činčura
>> What should be in p_batch_create.p_batch_pb? Is this some new format or >> something like DPB? >> > > Exactly like DPB v.2 (i.e. 32-bit clumplet lengths). And what should - logically - be inside? Or maybe more broadly, is there some high level description of the batching? I'm failing to find

Re: [Firebird-devel] Content for p_batch_create.p_batch_pb

2021-12-16 Thread Jiří Činčura
> Afraid there is - as always :( - no protocol > description except source code. Key ops are op_batch_msg, > op_batch_blob_stream & also op_batch_cs (retuning batch execution state > to client). Can you create some simple paragraph with the description? Because fishing it out from source code

Re: [Firebird-devel] Content for p_batch_create.p_batch_pb

2021-12-16 Thread Mark Rotteveel
On 2021-12-16 14:23, Alex Peshkoff via Firebird-devel wrote: On 12/16/21 15:12, Mark Rotteveel wrote: On 2021-12-16 10:28, Alex Peshkoff via Firebird-devel wrote: be segmented and swap bytes in segment length when needed. Afraid there is - as always :( - no protocol description except source

Re: [Firebird-devel] Content for p_batch_create.p_batch_pb

2021-12-16 Thread Jiří Činčura
> I'm bit confused here. I thought it's the size of the p_batch_blr > (which looked weird). But you're saying it's "message size". What's > that exactly? Is that the msgLen in BlrFromMessage::buildBlr? Looking at the code then the length for SQL_LONG should be 6 (4 + 2), isn't it? -- Mgr.

Re: [Firebird-devel] Content for p_batch_create.p_batch_pb

2021-12-16 Thread Alex Peshkoff via Firebird-devel
On 12/16/21 17:11, Jiří Činčura wrote: I'm bit confused here. I thought it's the size of the p_batch_blr (which looked weird). But you're saying it's "message size". What's that exactly? Is that the msgLen in BlrFromMessage::buildBlr? Looking at the code then the length for SQL_LONG should be

Re: [Firebird-devel] Content for p_batch_create.p_batch_pb

2021-12-16 Thread Jiří Činčura
> the core developers don't document the actual protocol, because reverse > engineering from the code and by using things like WireShark is > extremely painful, confusing and error prone. With the batch API it's > even worse IMHO, because even the usage examples seem to be incomplete, > and

Re: [Firebird-devel] Content for p_batch_create.p_batch_pb

2021-12-16 Thread Alex Peshkoff via Firebird-devel
On 12/16/21 16:49, Jiří Činčura wrote: p_batch_msglen is needed for server to check that in matches message size, calculated based on BLR. And it seems that in your case it does not match - may be because you want bigint parameter but use blr_long. I'm bit confused here. I thought it's the size

Re: [Firebird-devel] Content for p_batch_create.p_batch_pb

2021-12-16 Thread Alex Peshkoff via Firebird-devel
On 12/16/21 15:12, Mark Rotteveel wrote: On 2021-12-16 10:28, Alex Peshkoff via Firebird-devel wrote: be segmented and swap bytes in segment length when needed. Afraid there is - as always :( - no protocol description except source code. Key ops are op_batch_msg, op_batch_blob_stream & also

Re: [Firebird-devel] Content for p_batch_create.p_batch_pb

2021-12-16 Thread Jiří Činčura
> p_batch_msglen is needed for server to check that in matches message > size, calculated based on BLR. And it seems that in your case it does > not match - may be because you want bigint parameter but use blr_long. I'm bit confused here. I thought it's the size of the p_batch_blr (which looked

Re: [Firebird-devel] Content for p_batch_create.p_batch_pb

2021-12-16 Thread Jiří Činčura
> Is that the msgLen in BlrFromMessage::buildBlr? Looking at the code > then the length for SQL_LONG should be 6 (4 + 2), isn't it? *One* SQL_LONG, to be precise. -- Mgr. Jiří Činčura https://www.tabsoverspaces.com/ Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] Content for p_batch_create.p_batch_pb

2021-12-16 Thread Mark Rotteveel
On 2021-12-16 10:28, Alex Peshkoff via Firebird-devel wrote: be segmented and swap bytes in segment length when needed. Afraid there is - as always :( - no protocol description except source code. Key ops are op_batch_msg, op_batch_blob_stream & also op_batch_cs (retuning batch execution state

Re: [Firebird-devel] Content for p_batch_create.p_batch_pb

2021-12-16 Thread Jiří Činčura
>> Is that the msgLen in BlrFromMessage::buildBlr? Looking at the code then the >> length for SQL_LONG should be 6 (4 + 2), isn't it? >> > > Yes. > When you will send >1 message - pay attention that there is also > alignedMessageLength, which is 8 in this case. For now I'm just trying to send

Re: [Firebird-devel] Content for p_batch_create.p_batch_pb

2021-12-16 Thread Jiří Činčura
BTW just to make sure, what is the 2nd and 3rd line going to return? IXpbBuilder* pb = utl->getXpbBuilder(, IXpbBuilder::BATCH, NULL, 0); pb->getBufferLength(); pb->getBuffer(); -- Mgr. Jiří Činčura https://www.tabsoverspaces.com/ Firebird-Devel mailing list, web interface at