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

2021-12-26 Thread Mark Rotteveel

On 26-12-2021 09:59, Alex Peshkoff via Firebird-devel wrote:

On 12/16/21 11:51, Jiří Činčura wrote:

Or maybe more broadly, is there some high level description of the 
batching? I'm failing to find something, except batch interface 
description in Using_OO_API.html, but that's about API, not about the 
"protocol".




Added chapter to
https://github.com/FirebirdSQL/firebird-documentation/blob/master/src/docs/asciidoc/en/firebirddocs/wireprotocol/firebird-wire-protocol.adoc#wireprotocol-batches-release 


I did some minor copy editing and published it.

Mark
--
Mark Rotteveel


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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

2021-12-26 Thread Mark Rotteveel

On 26-12-2021 09:59, Alex Peshkoff via Firebird-devel wrote:

On 12/16/21 11:51, Jiří Činčura wrote:

Or maybe more broadly, is there some high level description of the 
batching? I'm failing to find something, except batch interface 
description in Using_OO_API.html, but that's about API, not about the 
"protocol".




Added chapter to
https://github.com/FirebirdSQL/firebird-documentation/blob/master/src/docs/asciidoc/en/firebirddocs/wireprotocol/firebird-wire-protocol.adoc#wireprotocol-batches-release 


Thanks Alex!

Mark
--
Mark Rotteveel


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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

2021-12-26 Thread Alex Peshkoff via Firebird-devel

On 12/16/21 11:51, Jiří Činčura wrote:


Or maybe more broadly, is there some high level description of the batching? I'm failing 
to find something, except batch interface description in Using_OO_API.html, but that's 
about API, not about the "protocol".



Added chapter to
https://github.com/FirebirdSQL/firebird-documentation/blob/master/src/docs/asciidoc/en/firebirddocs/wireprotocol/firebird-wire-protocol.adoc#wireprotocol-batches-release



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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

2021-12-17 Thread Jiří Činčura
Thanks. 

Weird, that's exactly what I'm sending. Looks like there's something else I'm 
missing on protocol level. Guess it's gonna be good old days fiddling with 
bytes until I see what I'm doing wrong. :)

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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

2021-12-17 Thread Alex Peshkoff via Firebird-devel

On 12/16/21 21:47, Jiří Činčura wrote:

Sending binary to devel failed - Jiri if you still need it send me your 
private email.


A.

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 one message. Baby steps.

But still no success. Can you maybe build Firebird with truck-load 
(and I mean borderline masochistic amount) of logging around the 
batching, so I can see at what point was something not as expected?


Both patch and fbclient.

Will print this way:

# ./isql -user sysdba -pas masterkey localhost:employee
Send: 00 00 00 01 00 00 00 13 00 00 00 03 00 00 00 24 00 00 00 08 65 6d 
70 6c 6f 79 65 65 00 00 00 08 00 00 01 44 09 06 73 79 73 64 62 61 08 06 
53 72 70 32 35 36 0a 18 53 72 70 32 35 36 2c 20 53 72 70 2c 20 4c 65 67 
61 63 79 5f 41 75 74 68 07 ff 00 35 45 44 38 38 42 45 31 37 42 41 45 43 
44 38 30 41 43 41 34 39 37 34 32 36 45 45 44 43 32 36 34 34 37 33 43 38 
34 41 43 42 30 30 31 34 46 41 34 32 31 34 36 46 41 34 45 37 45 39 44 34 
46 41 34 44 31 43 37 35 30 37 41 42 42 38 45 36 37 41 41 37 30 35 30 41 
33 46 38 36 45 30 33 31 44 41 45 46 41 35 41 30 41 33 39 43 43 34 35 42 
32 34 41 44 45 32 43 36 30 39 32 44 42 33 33 33 35 34 31 30 41 34 44 43 
41 42 45 39 30 42 45 35 36 36 39 37 32 42 46 31 36 44 38 43 32 30 41 43 
39 35 32 35 31 30 42 36 31 41 31 43 33 33 34 38 43 45 32 37 31 37 37 31 
45 39 33 35 34 30 32 32 43 45 38 45 42 33 37 37 43 39 34 31 33 45 37 32 
44 31 41 39 45 46 41 33 36 36 31 31 39 30 33 45 41 46 31 44 41 31 46 35 
46 41 36 46 37 43 37 41 30 45 42 37 31 46 32 43 36 34 34 34 31 32 42 46 
42 07 03 01 45 39 0b 04 01 00 00 00 01 04 72 6f 6f 74 04 04 66 62 73 33 
06 00 00 00 00 0a 00 00 00 01 00 00 00 00 00 00 00 05 00 00 00 02 ff ff 
80 0b 00 00 00 01 00 00 00 00 00 00 00 05 00 00 00 04 ff ff 80 0c 00 00 
00 01 00 00 00 00 00 00 00 05 00 00 00 06 ff ff 80 0d 00 00 00 01 00 00 
00 00 00 00 00 05 00 00 00 08 ff ff 80 0e 00 00 00 01 00 00 00 00 00 00 
00 05 00 00 00 0a ff ff 80 0f 00 00 00 01 00 00 00 00 00 00 00 05 00 00 
00 0c ff ff 80 10 00 00 00 01 00 00 00 00 00 00 00 05 00 00 00 0e ff ff 
80 11 00 00 00 01 00 00 00 00 00 00 00 05 00 00 00 10
Send: 00 00 00 5c 00 00 00 3f 43 35 44 45 45 44 34 45 38 42 44 38 37 32 
30 44 32 41 34 39 41 39 33 46 44 31 39 33 34 44 30 41 44 32 30 37 37 34 
39 38 32 39 34 34 46 39 46 36 44 37 39 32 31 32 46 36 32 41 45 30 43 39 
34 00 00 00 00 06 53 72 70 32 35 36 00 00 00 00 00 18 53 72 70 32 35 36 
2c 20 53 72 70 2c 20 4c 65 67 61 63 79 5f 41 75 74 68 00 00 00 00
Send: 00 00 00 60 00 00 00 08 43 68 61 43 68 61 36 34 00 00 00 09 53 79 
6d 6d 65 74 72 69 63 00 00 00
Send: 00 00 00 13 00 00 00 00 00 00 00 08 65 6d 70 6c 6f 79 65 65 00 00 
00 ad 01 4a 3b 2f 75 73 72 2f 68 6f 6d 65 2f 66 69 72 65 62 69 72 64 2f 
42 34 2e 30 2d 72 65 6c 65 61 73 65 2f 67 65 6e 2f 44 65 62 75 67 2f 66 
69 72 65 62 69 72 64 2f 62 69 6e 2f 69 73 71 6c 50 1f 4c 49 2d 56 34 2e 
30 2e 31 2e 32 36 38 39 2d 64 65 76 20 46 69 72 65 62 69 72 64 20 34 2e 
30 3e 36 2f 75 73 72 2f 68 6f 6d 65 2f 66 69 72 65 62 69 72 64 2f 42 34 
2e 30 2d 72 65 6c 65 61 73 65 2f 67 65 6e 2f 44 65 62 75 67 2f 66 69 72 
65 62 69 72 64 2f 62 69 6e 4d 00 1c 06 73 79 73 64 62 61 3a 04 00 00 00 
00 47 04 13 55 00 00 00 00 00

Send: 00 00 00 5b 00 00 00 01
Send: 00 00 00 28 00 00 00 00 00 00 00 00 00 00 00 06 20 21 3e 65 01 01 
00 00 00 00 04 00
Send: 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00 0f 53 45 
54 20 54 52 41 4e 53 41 43 54 49 4f 4e 00 00 00 00 00 00 00 00 00

Send: 00 00 00 1d 00 00 00 00 00 00 00 05 01 09 0f 06 12 00 00 00
Send: 00 00 00 28 00 00 00 00 00 00 00 00 00 00 00 02 93 94 00 00 00 00 
02 02

Database: localhost:employee, User: SYSDBA
SQL>


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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

2021-12-17 Thread Alex Peshkoff via Firebird-devel

On 12/17/21 12:06, Jiří Činčura wrote:

Should be 0, NULL.

And with (TAG_RECORD_COUNTS, 1)?



10
{1, 2, 4, 0, 0, 0, 1, 0, 0, 0}

But please don't use me as XpbBuilder more ;-)




Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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

2021-12-17 Thread Jiří Činčura
> Should be 0, NULL.

And with (TAG_RECORD_COUNTS, 1)?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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

2021-12-17 Thread Alex Peshkoff via Firebird-devel

On 12/16/21 22:27, Jiří Činčura wrote:

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();



Should be 0, NULL.




Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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 one message. Baby steps. 

But still no success. Can you maybe build Firebird with truck-load (and I mean 
borderline masochistic amount) of logging around the batching, so I can see at 
what point was something not as expected?

This is, high level (low level in parentheses), what I'm sending now. This is 
not resulting in error, but server is not responding to this operation, so 
something is missing.

op_batch_create (0,0,0,99)
p_batch_statement (0,0,0,2)
p_batch_blr buffer length (0,0,0,12)
p_batch_blr - 1x SQL_LONG (5,2,4,0,2,0,8,0,7,0,255,76)
  - let's assume the BLR correct, because the same code is used in other parts, 
like in op_fetch and it works
p_batch_msglen (0,0,0,6)
p_batch_pb buffer length (0,0,0,1)
p_batch_pb - empty PB VERSION1 (1)
padding (0,0,0)

In fact, I'm not creating a new code, just using other parts and putting in the 
parameters. So something is lost in my understanding from reading the server 
code.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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 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.




Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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 of the p_batch_blr (which looked weird). 
But you're saying it's "message size". What's that exactly?



Size of a message that should be transfered in a format defined by BLR. 
I.e. inMessage->getMessageLength()





Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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 too basic/simple and glosses over things.

I'll add one pain point. Companies/people/developers are using Firebird and 
expect to have new features available (in .NET in my case) in timely manner. 
But when I need to keep fishing and trying options here and there the progress 
is slow and everybody is unhappy (and even looking for other options).

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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 
weird). But you're saying it's "message size". What's that exactly?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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 code.
Key ops are op_batch_msg, op_batch_blob_stream & also op_batch_cs
(retuning batch execution state to client).


That is not entirely true, there is [1] which was basically 
reverse-engineerd by Carlos Guzman Alvarez, and I updated some of it 
for protocol 11. Personally, I really don't like the current situation 
that 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 too basic/simple and glosses over things.


Mark

 [1]: 
https://firebirdsql.org/file/documentation/html/en/firebirddocs/wireprotocol/firebird-wire-protocol.html




And where is the source of this docs?



It's in the firebird-documentation project[1], specifically 
https://github.com/FirebirdSQL/firebird-documentation/blob/master/src/docs/asciidoc/en/firebirddocs/wireprotocol/firebird-wire-protocol.adoc


Mark

 [1]: https://github.com/FirebirdSQL/firebird-documentation


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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 op_batch_cs
(retuning batch execution state to client).


That is not entirely true, there is [1] which was basically 
reverse-engineerd by Carlos Guzman Alvarez, and I updated some of it 
for protocol 11. Personally, I really don't like the current situation 
that 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 too basic/simple and glosses over things.


Mark

 [1]: 
https://firebirdsql.org/file/documentation/html/en/firebirddocs/wireprotocol/firebird-wire-protocol.html




And where is the source of this docs?




Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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 to client).


That is not entirely true, there is [1] which was basically 
reverse-engineerd by Carlos Guzman Alvarez, and I updated some of it for 
protocol 11. Personally, I really don't like the current situation that 
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 too basic/simple and glosses over things.


Mark

 [1]: 
https://firebirdsql.org/file/documentation/html/en/firebirddocs/wireprotocol/firebird-wire-protocol.html



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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 fishing it 
out from source code takes time and also misses often important details of 
handling some edge cases.

I'm trying to make it work now mostly with hardcoded values and later somehow 
fit it into DbBatch 
(https://docs.microsoft.com/en-us/dotnet/api/system.data.common.dbbatch?view=net-6.0)
 which is new in recent .NET 6. But that has broader features than what's 
possible in Firebird now.
  
I do op_allocate_statement and op_prepare_statement and then I'm trying op_batch_create. That seems to be reasonable order. But I'm getting (in)famous SQL error code = -804, SQLDA error (isc_sqlerr, isc_dsql_sqlda_err). I'm sending:

0,0,0,99 (op_batch_create)
0,0,0,2 (p_batch_statement - (from op_allocate_statement))
0,0,0,12 (buffer length)
5,2,4,0,2,0,8,0,7,0,255,76 (p_batch_blr buffer)
0,0,0,0,0,0,0,12 (p_batch_msglen)
0,0,0,10 (buffer length)
1,2,4,0,0,0,1,0,0,0 (p_batch_pb buffer - (TAG_RECORD_COUNTS,1))
0,0 (pad)

The BLR is if I'm not mistaken (1 bigint parameter):
5 => blr_version5
2 => blr_begin
4 => blr_message
0 => constant
2,0 => 1 param * 2
8 => blr_long
0 => scale
7 => blr_short
0 => constant
255 => blr_end
76 => blr_eoc

That all looks (obviously :)) correct to me. But it's not, why else would 
server complain? :D What looks weird to me is the length in p_batch_msglen, 
because it's already sent as part of the buffer sending. I'm playing with that 
now.



What makes me very hard to answer your question is that I've never used 
to look at wire protocol on that low level like exact bytes sequence 
when writing and debugging batch code. (I've used to do that once, when 
fixed sending decfloat values between LE/BE machines, but that was only 
once - and only that problematic 16 bytes.) There are standard ways to 
send and receive standard things over the wire, and I need not care what 
exactly was sent.


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.





Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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 takes time and also misses often important details of 
handling some edge cases.

I'm trying to make it work now mostly with hardcoded values and later somehow 
fit it into DbBatch 
(https://docs.microsoft.com/en-us/dotnet/api/system.data.common.dbbatch?view=net-6.0)
 which is new in recent .NET 6. But that has broader features than what's 
possible in Firebird now.
 
I do op_allocate_statement and op_prepare_statement and then I'm trying 
op_batch_create. That seems to be reasonable order. But I'm getting (in)famous 
SQL error code = -804, SQLDA error (isc_sqlerr, isc_dsql_sqlda_err). I'm 
sending:
0,0,0,99 (op_batch_create)
0,0,0,2 (p_batch_statement - (from op_allocate_statement))
0,0,0,12 (buffer length)
5,2,4,0,2,0,8,0,7,0,255,76 (p_batch_blr buffer)
0,0,0,0,0,0,0,12 (p_batch_msglen)
0,0,0,10 (buffer length)
1,2,4,0,0,0,1,0,0,0 (p_batch_pb buffer - (TAG_RECORD_COUNTS,1))
0,0 (pad)

The BLR is if I'm not mistaken (1 bigint parameter):
5 => blr_version5
2 => blr_begin
4 => blr_message
0 => constant
2,0 => 1 param * 2
8 => blr_long 
0 => scale
7 => blr_short
0 => constant
255 => blr_end
76 => blr_eoc

That all looks (obviously :)) correct to me. But it's not, why else would 
server complain? :D What looks weird to me is the length in p_batch_msglen, 
because it's already sent as part of the buffer sending. I'm playing with that 
now.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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 batching? I'm failing to find something, except batch interface 
description in Using_OO_API.html, but that's about API, not about the 
"protocol".



Sooner of all there is no other description except interface description 
in Using_OO_API. What about particular parameters block - here protocol 
is very simple, it's as always sent 'as is' (remember, we store data in 
all parameters block in network form). Sending data over the wire does 
not differ from other places - it's a stream of messages, no difference 
with other places where messages are sent. A more complicated thing is 
blob transfer because blobs are also always sent in a stream but we must 
take into an account that actual data may 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 
to client).





Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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 something, except 
batch interface description in Using_OO_API.html, but that's about API, not 
about the "protocol".

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


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

2021-12-10 Thread Alex Peshkoff via Firebird-devel

On 12/10/21 15:30, Jiří Činčura wrote:

Hello,

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).




Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Content for p_batch_create.p_batch_pb

2021-12-10 Thread Jiří Činčura
Hello,

What should be in p_batch_create.p_batch_pb? Is this some new format or 
something like DPB?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel