Re: [Firebird-devel] Transaction id size in Firebird 3

2016-06-17 Thread Dmitry Yemanov
17.06.2016 21:23, Mark Rotteveel wrote:
>
> Does this BigIntSpb also work with a v2 SPB, or do I need to change it
> to a v3 SPB (code suggests v2 will work, but confirmation would be nice)?

It works.

> Is there an easy trick to get Firebird to produce a 33 bit or longer
> transaction id without having to commit 32^2 + 1 transactions so I can
> check if my implementation will work with FB 3.0.1?

I don't know any, unfortunately. Hacking the header page counters does 
not work, as the engine expects TIPs backing all the transactions ids to 
exist on disk.

Dmitry


--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Transaction id size in Firebird 3

2016-06-17 Thread Leyne, Sean

> Is there an easy trick to get Firebird to produce a 33 bit or longer 
> transaction
> id without having to commit 32^2 + 1 transactions so I can check if my
> implementation will work with FB 3.0.1?

Hack the header of an existing database file with a Hex editor?


Sean


--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Transaction id size in Firebird 3

2016-06-17 Thread Mark Rotteveel
On 2-5-2016 08:40, Dmitry Yemanov wrote:
> 01.05.2016 13:01, Mark Rotteveel wrote:
>>
>>> But it seems that these inputs tags were forgotten re. their longer
>>> counterparts: isc_spb_rpr_commit_trans, isc_spb_rpr_rollback_trans,
>>> isc_spb_rpr_recover_two_phase. Please file a ticket.
>>
>> Done: http://tracker.firebirdsql.org/browse/CORE-5224
>
> Fixed. I have to admit that extensibility of SPB really sucks. I hope to
> see a day when all *PBs are unified (as WideTagged?) with all the legacy
> crap moved to y-valve as a thin compatibility layer converting older
> formats to the new one.

I'm just now getting to implementing this, and I have two questions:

Does this BigIntSpb also work with a v2 SPB, or do I need to change it 
to a v3 SPB (code suggests v2 will work, but confirmation would be nice)?

Is there an easy trick to get Firebird to produce a 33 bit or longer 
transaction id without having to commit 32^2 + 1 transactions so I can 
check if my implementation will work with FB 3.0.1?

Mark
-- 
Mark Rotteveel

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Problem with Firebird 2.1 embedded and libncurses6 (Linux)

2016-06-17 Thread Ismael L. Donis Garcia
You can solve it with:

cd /usr/lib
ln -sf libncursesw.so.6.0 libncurses.so.5

I have tried it in Manjaro

Best Regards

| ISMAEL |


- Original Message - 
From: "Fulvio Senore" 
To: "For discussion among Firebird Developers" 

Sent: Friday, June 17, 2016 9:12 AM
Subject: [Firebird-devel] Problem with Firebird 2.1 embedded and libncurses6 
(Linux)


>I have developed a couple of open source programs that use Firebird as
> an embedded database. The programs are some years old so they use
> version 2.1.
>
> I am using an embedded setup under Linux with a copy of Firebird that I
> compiled at the time and everything worked fine until now. I compiled in
> an old distribution and I created an archive file that contained
> everything is needed to run the programs: in this way I have been able
> to have a single file that worked on every distribution. I do not have
> the resources to build custom versions for different distributions.
>
> Now some users are reporting that the program does not run under newer
> distributions because those distros ship with libncurses 6 and firebird
> has been built against version 5.
> The problem can be solved by installing the libncurses 5 package but it
> looks like this package is not available under Arch, for example.
> Moreover not all users are experienced enough to install that package.
>
> Of course I might build Firebird in a distribution using libncurses 6
> but this would require doubling the effort and users ought to know which
> version to download.
>
> I think that a solution might be to statically link libncurses with
> Firebird but I don't know if it would work.
> I checked and the following files link to libncurses:
>
> libfbembed.so
> intl/fbintl
> bin/fb_lock_mgr
>
> do you know if it is safe to statically link libncurses?
>
> My Linux knowledge is rather limited: if statically linking is safe do
> you have suggestions on how to do it? Should I change something in the
> makefiles or should I use some ambient variable or should I do something
> else?
>
> Thanks in advance
>
> Fulvio Senore
>
> --
> What NetFlow Analyzer can do for you? Monitors network bandwidth and 
> traffic
> patterns at an interface-level. Reveals which users, apps, and protocols 
> are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity 
> planning
> reports. http://sdm.link/zohomanageengine
> Firebird-Devel mailing list, web interface at 
> https://lists.sourceforge.net/lists/listinfo/firebird-devel
> 



--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Test bugs.core_3554 randomly fails

2016-06-17 Thread Dimitry Sibiryakov
17.06.2016 17:58, Dmitry Yemanov wrote:
> Or perhaps do such a check in the remote client, or even better in the
> Y-valve?

   In this case the test will fail always.


-- 
   WBR, SD.

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Test bugs.core_3554 randomly fails

2016-06-17 Thread Dmitry Yemanov
17.06.2016 17:13, Dimitry Sibiryakov wrote:
>
> As most of you know, when routine protocol.cpp:alloc_cstring() receives zero 
> length, it
> behaves differently, depending on previous allocations. In some cases it 
> returns pointer
> to zero-length string, in some - NULL pointer.
> Because of this, used in subj test query "EXECUTE STATEMENT ''" can throw 
> different
> errors. If the routine has returned NULL, user will get code 335544608 from 
> Y-valve,
> otherwise it will be set of 335544569, 335544436, 335544851 from DSQL.
> In first case the test will fail, as it always expects the second case.
>
> Is it a problem in the test or in the server?

Wouldn't it be better to check for empty SQL string earlier, inside 
ExecStatementNode::execute(), and throw error directly from there, 
before passing it through the layers?

Or perhaps do such a check in the remote client, or even better in the 
Y-valve?


Dmitry


--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Wire compression

2016-06-17 Thread Alex Peshkoff
On 06/17/2016 11:54 AM, Jiří Činčura wrote:
> Hi,
>
>> Yes. May be the only detail is that zlib may compress data in slightly
>> different ways. In our case data compressed not as a set of packets -
>> the stream is compressed as a whole with flashes in the end of each
>> packet.
> Can i turn on some flag on Firebird to see whether it's happy with the
> data coming? I hardcoded the pflag_compress and I'm wrapping both input
> and output streams in compression. But looks like there's some
> incompatibility.
>
> I do the op_connect without compression, obviously.

Do you receive pflag_compress set in  accept->p_acpt_type? You should 
check this value to decide use compression later or not.

> Then for following
> op_attach I wrap the streams in compression. When I manually flush the
> output data to the server, the server closes the connection with me. So
> I think the data might not be in format that server expects.
>

As far as I know no such flag exists.
Try to make sure std client does work with this server using compressed 
connection.


--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Problem with Firebird 2.1 embedded and libncurses 6 (Linux)

2016-06-17 Thread Alex Peshkoff
On 06/17/2016 04:12 PM, Fulvio Senore wrote:
> I have developed a couple of open source programs that use Firebird as
> an embedded database. The programs are some years old so they use
> version 2.1.
>
> I am using an embedded setup under Linux with a copy of Firebird that I
> compiled at the time and everything worked fine until now. I compiled in
> an old distribution and I created an archive file that contained
> everything is needed to run the programs: in this way I have been able
> to have a single file that worked on every distribution. I do not have
> the resources to build custom versions for different distributions.
>
> Now some users are reporting that the program does not run under newer
> distributions because those distros ship with libncurses 6 and firebird
> has been built against version 5.
> The problem can be solved by installing the libncurses 5 package but it
> looks like this package is not available under Arch, for example.
> Moreover not all users are experienced enough to install that package.
>
> Of course I might build Firebird in a distribution using libncurses 6
> but this would require doubling the effort and users ought to know which
> version to download.
>
> I think that a solution might be to statically link libncurses with
> Firebird but I don't know if it would work.
> I checked and the following files link to libncurses:
>
> libfbembed.so
> intl/fbintl
> bin/fb_lock_mgr

Not sure for 2.1 build process (unsupported version, sorry) but the only 
binary that actually needs curses is isql for readline's command line 
editor.

> do you know if it is safe to statically link libncurses?

as far as I know yes

> My Linux knowledge is rather limited: if statically linking is safe do
> you have suggestions on how to do it? Should I change something in the
> makefiles

yes
replace -lncurses with /usr/lib/libncurses.a (or how is it called on 
your box)

> or should I use some ambient variable or should I do something
> else?
>


--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Test bugs.core_3554 randomly fails

2016-06-17 Thread Dimitry Sibiryakov
   Hello, all.

   As most of you know, when routine protocol.cpp:alloc_cstring() receives zero 
length, it 
behaves differently, depending on previous allocations. In some cases it 
returns pointer 
to zero-length string, in some - NULL pointer.
   Because of this, used in subj test query "EXECUTE STATEMENT ''" can throw 
different 
errors. If the routine has returned NULL, user will get code 335544608 from 
Y-valve, 
otherwise it will be set of 335544569, 335544436, 335544851 from DSQL.
   In first case the test will fail, as it always expects the second case.

   Is it a problem in the test or in the server?

-- 
   WBR, SD.

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Problem with Firebird 2.1 embedded and libncurses 6 (Linux)

2016-06-17 Thread Fulvio Senore
I have developed a couple of open source programs that use Firebird as 
an embedded database. The programs are some years old so they use 
version 2.1.

I am using an embedded setup under Linux with a copy of Firebird that I 
compiled at the time and everything worked fine until now. I compiled in 
an old distribution and I created an archive file that contained 
everything is needed to run the programs: in this way I have been able 
to have a single file that worked on every distribution. I do not have 
the resources to build custom versions for different distributions.

Now some users are reporting that the program does not run under newer 
distributions because those distros ship with libncurses 6 and firebird 
has been built against version 5.
The problem can be solved by installing the libncurses 5 package but it 
looks like this package is not available under Arch, for example. 
Moreover not all users are experienced enough to install that package.

Of course I might build Firebird in a distribution using libncurses 6 
but this would require doubling the effort and users ought to know which 
version to download.

I think that a solution might be to statically link libncurses with 
Firebird but I don't know if it would work.
I checked and the following files link to libncurses:

libfbembed.so
intl/fbintl
bin/fb_lock_mgr

do you know if it is safe to statically link libncurses?

My Linux knowledge is rather limited: if statically linking is safe do 
you have suggestions on how to do it? Should I change something in the 
makefiles or should I use some ambient variable or should I do something 
else?

Thanks in advance

Fulvio Senore

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-5284) Firebird fails to build with USE_VALGRIND

2016-06-17 Thread Paul Reeves (JIRA)
Firebird fails to build with USE_VALGRIND
-

 Key: CORE-5284
 URL: http://tracker.firebirdsql.org/browse/CORE-5284
 Project: Firebird Core
  Issue Type: Bug
  Components: Build Issues / Porting
Affects Versions: 3.0.0, 4.0 Initial
 Environment: Linux
Reporter: Paul Reeves
Priority: Minor



The first build problem arrives with DELAYED_EXTENT_COUNT being used in
anonymous namespace, before it has been defined globally. That was easy enough
to work around. But then this error is thrown:

  alloc.cpp:1866:51: error: 'class Firebird::MemBlock' has no member
  named 'length' VALGRIND_MAKE_WRITABLE(object, block->length));


Looking at MemBlock there is certainly no length member, but
MemBaseHunk does have one.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] building FB3 for valgrind

2016-06-17 Thread Alex Peshkoff
On 06/17/2016 10:25 AM, Paul Reeves wrote:
> I tried to build FB3 for valgrind yesterday, without any success.
>
> AFAICT, all that is needed is to declare DEV_FLAGS with -DUSE_VALGRIND
> and then run make Debug.
>
> The first build problem arrives with DELAYED_EXTENT_COUNT being used in
> anonymous namespace, before it has been defined. That was easy enough
> to work around. But then this error is thrown:
>
>alloc.cpp:1866:51: error: ‘class Firebird::MemBlock’ has no member
>named ‘length’ VALGRIND_MAKE_WRITABLE(object, block->length));
>
>
> Looking at MemBlock there is certainly no length member, but
> MemBaseHunk does have one. A refactoring error perhaps?
>
>
> Should I file a bug report?

yes, please.
Have to mention that I've forgotten about valgrind when did last 
refactoring of MemPool.



--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] gsec not working in master and 3.0 branch

2016-06-17 Thread Adriano dos Santos Fernandes
On 17/06/2016 05:00, Dimitry Sibiryakov wrote:
> 17.06.2016 3:08, Adriano dos Santos Fernandes wrote:
>> Same way I used to run it in just built sources, not it raises error:
>>
>> asfernandes@cheetah:/media/home/asfernandes-ubuntu/fb/dev/firebird-master.git$
>> gsec
>> use gsec -? to get help
>> Your user name and password are not defined. Ask your database
>> administrator to set up a Firebird login.
>> unable to open database
>It works for me. You must stop running Firebird server beforehand.
>
>
I probably had something hidden running. It's working now, thanks.


Adriano


--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] GPRE, new API and static pointers

2016-06-17 Thread Dimitry Sibiryakov
17.06.2016 11:05, Dimitry Sibiryakov wrote:
>What I've missed this time?

   Unfortunately, nothing: master branch crashes as well. Pull request with fix 
created.

-- 
   WBR, SD.

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] GPRE, new API and static pointers

2016-06-17 Thread Dimitry Sibiryakov
16.06.2016 18:50, Alex Peshkoff wrote:
> This is reference counted object, and it will not be actually deleted as
> long as

   I've found that YRequest doesn't increment reference counter of YAttachment 
it is 
linked to. As the result, after disconnect, the pointer become invalid and next 
call of 
Start crash on "YEntry entry(status, this);" when YEntry is trying to 
call 
object->attachment->addRef().
   What I've missed this time?


-- 
   WBR, SD.

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Wire compression

2016-06-17 Thread Jiří Činčura
Hi,

> Yes. May be the only detail is that zlib may compress data in slightly 
> different ways. In our case data compressed not as a set of packets - 
> the stream is compressed as a whole with flashes in the end of each
> packet.

Can i turn on some flag on Firebird to see whether it's happy with the
data coming? I hardcoded the pflag_compress and I'm wrapping both input
and output streams in compression. But looks like there's some
incompatibility.

I do the op_connect without compression, obviously. Then for following
op_attach I wrap the streams in compression. When I manually flush the
output data to the server, the server closes the connection with me. So
I think the data might not be in format that server expects.

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

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] gsec not working in master and 3.0 branch

2016-06-17 Thread Dimitry Sibiryakov
17.06.2016 3:08, Adriano dos Santos Fernandes wrote:
> Same way I used to run it in just built sources, not it raises error:
>
> asfernandes@cheetah:/media/home/asfernandes-ubuntu/fb/dev/firebird-master.git$
> gsec
> use gsec -? to get help
> Your user name and password are not defined. Ask your database
> administrator to set up a Firebird login.
> unable to open database

   It works for me. You must stop running Firebird server beforehand.


-- 
   WBR, SD.

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] building FB3 for valgrind

2016-06-17 Thread Paul Reeves

I tried to build FB3 for valgrind yesterday, without any success.

AFAICT, all that is needed is to declare DEV_FLAGS with -DUSE_VALGRIND
and then run make Debug.

The first build problem arrives with DELAYED_EXTENT_COUNT being used in
anonymous namespace, before it has been defined. That was easy enough
to work around. But then this error is thrown:

  alloc.cpp:1866:51: error: ‘class Firebird::MemBlock’ has no member
  named ‘length’ VALGRIND_MAKE_WRITABLE(object, block->length));


Looking at MemBlock there is certainly no length member, but
MemBaseHunk does have one. A refactoring error perhaps?


Should I file a bug report?



Paul
--
Paul Reeves
http://www.ibphoenix.com
Supporting users of Firebird
 

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel