Re: [Firebird-devel] Response to op_get_segment under with compression on

2016-08-22 Thread Jiří Činčura
Alex,

something interesting. After I've put the message for op_fetch into
output stream, I also added, just as I'm trying to bisect it, 1k of 0s
at the end (and these will be compressed). Then not only the
op_fetch_response code came, but also the rest of the response.

-- 
Mgr. Jiří Činčura
Independent IT Specialist

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


Re: [Firebird-devel] Response to op_get_segment under with compression on

2016-08-22 Thread Alex Peshkoff

On 08/22/2016 11:53 AM, Jiří Činčura wrote:

with some debugging code turned on.

Can I turn that on?



Please :)

diff --git a/src/remote/protocol.cpp b/src/remote/protocol.cpp
index 042d879..7f0648b 100644
--- a/src/remote/protocol.cpp
+++ b/src/remote/protocol.cpp
@@ -285,6 +285,10 @@ bool_t xdr_protocol(XDR* xdrs, PACKET* p)
 	if (!xdr_enum(xdrs, reinterpret_cast(>p_operation)))
 		return P_FALSE(xdrs, p);
 
+#ifdef COMPRESS_DEBUG
+	fprintf(stderr, "operation=%d\n", p->p_operation);
+#endif
+
 	switch (p->p_operation)
 	{
 	case op_reject:
diff --git a/src/remote/remote.h b/src/remote/remote.h
index 933c316..b7bd57b 100644
--- a/src/remote/remote.h
+++ b/src/remote/remote.h
@@ -61,7 +61,7 @@
 
 #ifdef WIRE_COMPRESS_SUPPORT
 #include 
-//#define COMPRESS_DEBUG 1
+#define COMPRESS_DEBUG 1
 #endif // WIRE_COMPRESS_SUPPORT
 
 #define REM_SEND_OFFSET(bs) (0)
--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Response to op_get_segment under with compression on

2016-08-22 Thread Jiří Činčura
> In that case please send me (preferably not too big, I use CDMA 
> connection now) test database.
> Artificial test with select  from rdb$database shows no errors. I've 
> checked in on latest FB3 and it passed also fine.

I'm sending you privately test app (403kB) that surfaces it. But it's a
.NET app, obviously. Not sure you can run it, as I know you're on Linux.

-- 
Mgr. Jiří Činčura
Independent IT Specialist

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


Re: [Firebird-devel] Response to op_get_segment under with compression on

2016-08-22 Thread Alex Peshkoff
On 08/22/2016 11:53 AM, Jiří Činčura wrote:
>> with some debugging code turned on.
> Can I turn that on?
>
>> So must say I see no problems with protocol.
> Oh no, sure. I'm not saying something is wrong with the protocol. It
> works fine when I turn compression off or if the data is all 0 (see my
> previous email).
>
> BTW me running the "select first(1) JOB_REQUIREMENT from JOB where
> JOB_REQUIREMENT is not null;" works as well. I think it needs to be
> binary blob of some size.
>

In that case please send me (preferably not too big, I use CDMA 
connection now) test database.
Artificial test with select  from rdb$database shows no errors. I've 
checked in on latest FB3 and it passed also fine.



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


Re: [Firebird-devel] Response to op_get_segment under with compression on

2016-08-22 Thread Alex Peshkoff
On 08/22/2016 11:44 AM, Jiří Činčura wrote:
> OK, I was able to strip it down to single select on a fresh empty
> database.
>
> If I do "select
> x'681B03629D04E427E638384EF8117D8BC7B7312B7B03D0DB210DB2C4561A770283CADA0DB5A7E0A305E56C93DAFB91EF065F7C5B28EE94654A264190501FCFCBBF36C92E3570D51FD58C2594963D00257BC2BDF59D1BD9943674C28F665053E5169FD2A43163B995895C859AC8FECE0D261B148C60D92EA45B34F6C0AD45B884393F7EF5695AF21809286B40953FCB37A5B4684B3CC5843B702E49FC6BF7E743A30160897FD7A2CA28FB83386EEC0F1C68BF1BF7DC6C4872B943853B11F5AB103F279C93DD42B6CC129D233F424CCB831E2C93AADCEF6636B8ECCE3B5266B8315072F746507A3D26094DE43E4909306D76021CE36201324FBF65DAF0727A79ABE3F0EECF538432A3EE6CA08F0A27EBAEBC61C45049D4CE4E3FA886EA9E4BB38DD2395A58196019F0CE78F4F45FA24497782B3411B529610F229F8FAAFD4704A2B812BBD0CC93955C47D280D0DFD9ED9C63ED717317A1D7A9D64B3679D06DF18673513B4DE673CAE395D6C8E1A7902F47B1F14710D5908A163A12F8815D1B8AD9DFF85C8D9DA0B4EE238CDC40D8F501461CEDC6DD26E1B0E2C62413D47A4886794BEE01AD34A0A9113C58EC48B24A3D4310B1656F54ACB3FD4878C6788DDF74D90663F3E9F353127A43B5A0CCF3682F7BE6CEC3C7E217259E3A0365BAD931835CE313424F56524FBC9FE92B9D0CE509DE484A90BD1CABF5ED3D54AEEFEC579F123243E8E026DF24937E0728F7EA869154F885718E9FC440371C531101A35ECE4849196BC7FB28B86826FC3F1483FC03B6C25AF666E411716C03B1C3D1CD23EF1F38DEAED11BC857D0CC0968A2842BB31F505A3E4967676338A6FDC34A63E599020C20DBA34E309BF8022699DAA8CDE6D7FCA48173E4A6B6CF7B752A1C040D6CE56F6596644F0FCF1FBE444641CD878FD816EB4CBE64261D65680B28D7057EF3F4B9B26B42378288EDD361B39F5F7501F3E5510518BFAC81494830FB43E6F7193F4F51871B1B4DA093635EEA03717C05F10933F1B379DB340C3122F906854406DA4774500EEDE5D898B071B461C07DD6CA2B0939B20565C5731C7AE9F752990D1E570FBBFC2CF504235A59030826D14BB24A2FDA7B0A53D5E0ADDCF073FBDF451663950AB0C1D99D34051658AA62BD4C492E36AC23BD90130439D94E4E058F267A14EBA390C799EF7090A676F3F92A7EEF90A644C4322157D1820677E78A4E2E75EEDC967619BB8193463C92171A1F090E5B5DBD5D4A6047F193D10DC12208E4417700041C9307D6D325B07EF58E40B763FB688C2D8FD02A8E95A3E146ADBE713D56519E191AEB7A5386E93899E15163521AA9C4B87AB7B0A6D57586EE258F26653E409E3DA09D4810ED38A5A59890AC43408F2C03F9B7C29E9FF743A3648B2EF6C2D15AA0B125B07C61B4CA41110A0D44C842AD9562226B867D009CA859A3AA61'
> from rdb$database"
>
> then I get stuck on op_fetch. I get the op_fetch_response (66), but
> trying to get then the status and count numbers for the response no
> luck. There're nothing more in the stream from server (compressed or
> uncompressed).
>
> Surprisingly doing "select
> x''
> from rdb$database"
>
> works fine. Isn't that kind of weird?
>

Definitely weird - but works for me

operation=65
Data to deflate 60 port 0x7ff0c34013d0
Deflated data 16
Data to inflate 1094 port 0x7ff0c34013d0
Inflated data 1084
operation=9
operation=66

CONSTANT
=== 


Re: [Firebird-devel] Response to op_get_segment under with compression on

2016-08-22 Thread Jiří Činčura
> with some debugging code turned on.

Can I turn that on?

> So must say I see no problems with protocol.

Oh no, sure. I'm not saying something is wrong with the protocol. It
works fine when I turn compression off or if the data is all 0 (see my
previous email). 

BTW me running the "select first(1) JOB_REQUIREMENT from JOB where
JOB_REQUIREMENT is not null;" works as well. I think it needs to be
binary blob of some size.

-- 
Mgr. Jiří Činčura
Independent IT Specialist

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


Re: [Firebird-devel] Response to op_get_segment under with compression on

2016-08-22 Thread Jiří Činčura
OK, I was able to strip it down to single select on a fresh empty
database.

If I do "select
x'681B03629D04E427E638384EF8117D8BC7B7312B7B03D0DB210DB2C4561A770283CADA0DB5A7E0A305E56C93DAFB91EF065F7C5B28EE94654A264190501FCFCBBF36C92E3570D51FD58C2594963D00257BC2BDF59D1BD9943674C28F665053E5169FD2A43163B995895C859AC8FECE0D261B148C60D92EA45B34F6C0AD45B884393F7EF5695AF21809286B40953FCB37A5B4684B3CC5843B702E49FC6BF7E743A30160897FD7A2CA28FB83386EEC0F1C68BF1BF7DC6C4872B943853B11F5AB103F279C93DD42B6CC129D233F424CCB831E2C93AADCEF6636B8ECCE3B5266B8315072F746507A3D26094DE43E4909306D76021CE36201324FBF65DAF0727A79ABE3F0EECF538432A3EE6CA08F0A27EBAEBC61C45049D4CE4E3FA886EA9E4BB38DD2395A58196019F0CE78F4F45FA24497782B3411B529610F229F8FAAFD4704A2B812BBD0CC93955C47D280D0DFD9ED9C63ED717317A1D7A9D64B3679D06DF18673513B4DE673CAE395D6C8E1A7902F47B1F14710D5908A163A12F8815D1B8AD9DFF85C8D9DA0B4EE238CDC40D8F501461CEDC6DD26E1B0E2C62413D47A4886794BEE01AD34A0A9113C58EC48B24A3D4310B1656F54ACB3FD4878C6788DDF74D90663F3E9F353127A43B5A0CCF3682F7BE6CEC3C7E217259E3A0365BAD931835CE313424F56524FBC9FE92B9D0CE509DE484A90BD1CABF5ED3D54AEEFEC579F123243E8E026DF24937E0728F7EA869154F885718E9FC440371C531101A35ECE4849196BC7FB28B86826FC3F1483FC03B6C25AF666E411716C03B1C3D1CD23EF1F38DEAED11BC857D0CC0968A2842BB31F505A3E4967676338A6FDC34A63E599020C20DBA34E309BF8022699DAA8CDE6D7FCA48173E4A6B6CF7B752A1C040D6CE56F6596644F0FCF1FBE444641CD878FD816EB4CBE64261D65680B28D7057EF3F4B9B26B42378288EDD361B39F5F7501F3E5510518BFAC81494830FB43E6F7193F4F51871B1B4DA093635EEA03717C05F10933F1B379DB340C3122F906854406DA4774500EEDE5D898B071B461C07DD6CA2B0939B20565C5731C7AE9F752990D1E570FBBFC2CF504235A59030826D14BB24A2FDA7B0A53D5E0ADDCF073FBDF451663950AB0C1D99D34051658AA62BD4C492E36AC23BD90130439D94E4E058F267A14EBA390C799EF7090A676F3F92A7EEF90A644C4322157D1820677E78A4E2E75EEDC967619BB8193463C92171A1F090E5B5DBD5D4A6047F193D10DC12208E4417700041C9307D6D325B07EF58E40B763FB688C2D8FD02A8E95A3E146ADBE713D56519E191AEB7A5386E93899E15163521AA9C4B87AB7B0A6D57586EE258F26653E409E3DA09D4810ED38A5A59890AC43408F2C03F9B7C29E9FF743A3648B2EF6C2D15AA0B125B07C61B4CA41110A0D44C842AD9562226B867D009CA859A3AA61'
from rdb$database"

then I get stuck on op_fetch. I get the op_fetch_response (66), but
trying to get then the status and count numbers for the response no
luck. There're nothing more in the stream from server (compressed or
uncompressed).

Surprisingly doing "select
x''
from rdb$database" 

works fine. Isn't that kind of weird?

-- 
Mgr. Jiří Činčura
Independent IT Specialist

On Sun, Aug 21, 2016, at 15:35, Jiří Činčura wrote:
> Maybe surprisingly, when the blob I'm trying to read is all zeros, the
> server responds in expected way. Random bytes make it all fall apart.
> 
> I have a simple test app, that surfaces it. If some core devs would like
> to have a look from the other side.
> 
> -- 
> Mgr. Jiří Činčura
> Independent IT Specialist


Re: [Firebird-devel] Response to op_get_segment under with compression on

2016-08-22 Thread Alex Peshkoff
On 08/21/2016 12:51 PM, Jiří Činčura wrote:
> Hi *,
>
> when I try to read response to op_get_segment (which works fine without
> compression), after flush I only get op_response (9) code and then
> nothing is in the stream. The next piece I'm trying to read is 4
> bytes/integer for object handle of generic response.
>
> So I clearly get some response from server (I get the op_response), aka
> flush went fine, server was able to process my request and it was
> properly compressed. But why I get only the 4 bytes and nothing more to
> get complete response?
>
> I'm running x64 3.0.0.32483.
>

This is ISQL Version: LI-T4.0.0.338-dev Firebird 4.0 Unstable
but there were no related changes.

I try in employee
select first(1) JOB_REQUIREMENT from JOB where JOB_REQUIREMENT is not null;
with some debugging code turned on.


   JOB_REQUIREMENT
=
81:1ea
  ** Blob handle is here

==
JOB_REQUIREMENT:

operation=56
Data to deflate 20 port 0x7ff0c34013d0
Deflated data 16
Data to inflate 11 port 0x7ff0c34013d0
Inflated data 32
operation=9

 *** First packets exchange - op_open_blob2 => op_response (with 
remote blob ID)

operation=36
Data to deflate 16 port 0x7ff0c34013d0
Deflated data 14
Data to inflate 40 port 0x7ff0c34013d0
Inflated data 60
operation=9

 ** Second packets exchange - op_get_segment => op_response 
(with segment data)

No specific requirements.

 ** And right after it isql print that data.

So must say I see no problems with protocol.



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


Re: [Firebird-devel] Response to op_get_segment under with compression on

2016-08-21 Thread Jiří Činčura
Maybe surprisingly, when the blob I'm trying to read is all zeros, the
server responds in expected way. Random bytes make it all fall apart.

I have a simple test app, that surfaces it. If some core devs would like
to have a look from the other side.

-- 
Mgr. Jiří Činčura
Independent IT Specialist

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


[Firebird-devel] Response to op_get_segment under with compression on

2016-08-21 Thread Jiří Činčura
Hi *,

when I try to read response to op_get_segment (which works fine without
compression), after flush I only get op_response (9) code and then
nothing is in the stream. The next piece I'm trying to read is 4
bytes/integer for object handle of generic response.

So I clearly get some response from server (I get the op_response), aka
flush went fine, server was able to process my request and it was
properly compressed. But why I get only the 4 bytes and nothing more to
get complete response?

I'm running x64 3.0.0.32483.

-- 
Mgr. Jiří Činčura
Independent IT Specialist

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