Re: [Firebird-devel] Something of interest to some perhaps....

2017-08-03 Thread Alex via Firebird-devel



On 02.08.2017 18:13, Paul Beach wrote:

pwd = /Users/pbeach/30ios/gen/Release/firebird/lib
MacPro:lib pbeach$ file libfb*
libfbclient.dylib.3.0.3: Mach-O dynamically linked shared library arm_v7


I.e. we already have native client for iphone. Nice :)


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Detecting connection is using wire encryption

2017-08-16 Thread Alex via Firebird-devel



On 15.08.2017 18:33, Mark Rotteveel wrote:

On 15-8-2017 15:59, Alex via Firebird-devel wrote:



On 16.07.2017 16:08, Dmitry Yemanov wrote:

16.07.2017 13:31, Mark Rotteveel wrote:


That said, I would still like to know if there is a specific info 
item I can use as well.


There's no such an item, AFAIK.



Mark, now there is such item - fb_info_conn_flags. It returns 
bitmask, bit values are described by 
isc_dpb_addr_flag_conn_compressed and 
isc_dpb_addr_flag_conn_encrypted items.


Thanks. I assume that is Firebird 4 and higher?



Since 3.0.3


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Detecting connection is using wire encryption

2017-08-15 Thread Alex via Firebird-devel



On 16.07.2017 16:08, Dmitry Yemanov wrote:

16.07.2017 13:31, Mark Rotteveel wrote:


That said, I would still like to know if there is a specific info 
item I can use as well.


There's no such an item, AFAIK.



Mark, now there is such item - fb_info_conn_flags. It returns bitmask, 
bit values are described by isc_dpb_addr_flag_conn_compressed and 
isc_dpb_addr_flag_conn_encrypted items.



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Using non-default BLOBs in Batch interface

2017-08-11 Thread Alex via Firebird-devel
Currently implemented in batches 
(https://github.com/FirebirdSQL/firebird/tree/batch) BLOBs have 
hard-coded BPB which makes all BLOBs have stream type. Certainly this is 
not what we want in release version. I suggest the following:


- current hard-coded BPB remains as default for all BLOBs created by 
Batch when other BPB is not set - i.e. with Batch default type of blob 
becomes stream one, not segmented;


- function is added to the Batch interface making it possible to preset 
any other user-defined BPB for blobs that will not have it set explicitly;


- 2 parameters are added to addBlob() function containg (as always) 
length of BPB and it's data, '0, NULL' means use of default BPB;


- BLOB header in addBlobStream() is extended with additional parameter, 
BPB length, with BPB data stored right after the header and followed by 
BLOB data.



Next we need a way to pass data of segmented BLOB to the Batch. When 
using blob stream mode it's quite clear - each segment in the stream is 
prefixed by 16-bit length of segment aligned on 2-byte boundary. Length 
is provided in host (not network) order, i.e. remote layer should 
provide xdr-level conversion. When using addBlob() and appendBlobData() 
looks like the only clear for users way to go is to make addBlob() store 
first segment with next segments stored by appendBlobData(). That's not 
top efficient in case of small segments but luckily BLOBs have buffering 
in both engine and network providers. i.e. performance should not fall 
seriously.



Comments?




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Using non-default BLOBs in Batch interface

2017-08-11 Thread Alex via Firebird-devel



On 11.08.2017 12:29, Dimitry Sibiryakov wrote:

11.08.2017 11:21, Alex via Firebird-devel wrote:

BLOBs have hard-coded BPB which makes all BLOBs have stream type.


  What is advantage of stream BLOBs?



No disadvantages :-)

Comments? 


  BPB is not only about BLOB type, but also for using blob filters. 
Can your suggestion handle cases when a table has two BLOB fields of 
different subtypes and different filters should be applied to each of 
them during batch operation?





Yes, it can - but requires passing same BPB for one of BLOBs for each 
BLOB copy. Not good. I will adjust suggestion, thank you.




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Useful SQL Stored Procedures as part of standard firebird installation

2017-08-14 Thread Alex via Firebird-devel

On 14.08.2017 15:21, Slavomir Skopalik wrote:

Hi Adriano, we have serious problems with FB3 with stability.


What problems? They are to be discussed here if one wants them to be solved.



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Useful SQL Stored Procedures as part of standard firebird installation

2017-08-14 Thread Alex via Firebird-devel



On 14.08.2017 18:08, Slavomir Skopalik wrote:

May be we can start new topic about bug fixing and release strategy.
Two examples:

1. Database corruption 
(http://tracker.firebirdsql.org/browse/CORE-5392) that I was reported 
06/Nov/16, release contain this fix was available 22-Mar-2017
2. Server crash (http://tracker.firebirdsql.org/browse/CORE-5562) that 
was reported 07/Jun/17 will be released Q3-Q4 2017


Because of 1 we have to downgrade to 2.5 and till now, no stable 
release available.




BTW - why not use snapshots? Currently they pass same tests control as 
releases. Review tests result and if nothing critical present - fill 
free to work with snapshot. For stable releases snapshots are pretty stable.


Now we using FB2.5 for production and development. For testing we are 
using FB3.


Back to original topic, I don't believe that is right time to drop 
support for FB2.5.


Nobody suggest that. But please distinguish between support and new 
features. Developing new features limited with old version is not good idea.


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdotFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Useful SQL Stored Procedures as part of standard firebird installation

2017-08-14 Thread Alex via Firebird-devel



Discussion was about naming convention.



Not only. We have reasonable suggestion from Adriano to create package 
instead artificial prefixes.



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] sse3 host x64 linux

2017-07-07 Thread Alex via Firebird-devel



On 07.07.2017 17:06, marius adrian popa wrote:

It doesn't work , the same



Marius did you try fresh B3_0_Release? Checked out after 23 of May?
I've made a change fixing non-SSE operation, and emulated use of non-SSE 
machine, and it worked for me.

But I need your confirmation that issue is fixed.


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdotFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Detecting connection is using wire encryption

2017-07-16 Thread Alex via Firebird-devel



On 16.07.2017 13:23, Vlad Khorsun via Firebird-devel wrote:

16.07.2017 12:59, Mark Rotteveel wrote:
Is there a way to programmatically detect a connection is using wire 
encryption (eg in a monitoring table or the service API)?


I'm writing a test to check if Jaybird is correctly (not) using 
encryption depending on its connection properties, and I'd prefer 
'outside' confirmation (that is: Firebird telling me it is indeed 
(not) encrypted) instead of relying on the specifics of the 
implementation itself.




  Looks for Alex answers in thread "Wire compression" from 21.06.2016.

  Response on op_info_database contains (among other data) protocol 
version
with optional flags about compression (Z) and\or encryption (C), for 
example:


P15 - no encryption, no compression
P15:CZ - encrypted, compressed



I understand that parsing text string  is not best way to go. There are 
plans to add appropriate boolean fields to mon$ tables.




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] PHP bug 72175 - was Re: ADO.NET provider 5.9.0.0

2017-07-07 Thread Alex via Firebird-devel



On 07.07.2017 21:24, NetVicious via Firebird-devel wrote:

HI!

I don't know if this it's thegood place to send this message.

We have a bug on PHP from version 7.0 to today related to multiple 
connections to a firebird database.


I don't know if here it's any developer who can help all the PHP 
developers to fix this bug.


Check the bug on bugs.php.net

https://bugs.php.net/bug.php?id=72175



As far as I can see from this bug description this is pure PHP issue - 
with all other clients firebird has no problems supporting multiple 
connections to same database.


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdotFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] sse3 host x64 linux

2017-07-10 Thread Alex via Firebird-devel



On 10.07.2017 19:08, marius adrian popa wrote:

It's weird that package from ppa (3.0.2) works

LI-V3.0.2.32703 Firebird 3.0

https://launchpad.net/~mapopa/+archive/ubuntu/firebird3.0/+build/12568442 





What version of gcc is used to build it?



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] sse3 host x64 linux

2017-07-10 Thread Alex via Firebird-devel



gcc version 6.3.0 20170406 (Ubuntu 6.3.0-12ubuntu2)




That looks first of all as a known but still not fixed issue with gcc6.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdotFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] HASH function (CORE-4436)

2017-07-21 Thread Alex via Firebird-devel



On 21.07.2017 13:38, Adriano dos Santos Fernandes wrote:

On 19/07/2017 15:51, Mark Rotteveel wrote:

In most cases original string (password) is not even stored and hashes
are used to check if a password matches a previously one.

The proposed hashes are **not** suitable for passwords; you shouldn't
use a pure cryptographic hash for passwords as they are optimized for
speed. For passwords you need to use an algorithm with a work
factor/iteration count (eg pbkdf2, bcrypt) that slows it down.


Mark, this is interesting. I know bcrypt is very used by nodejs/expess
people and I even used it myself.

But what is more interesting, isn't Firebird still using these "not
suitable for passwords" hashes in recent versions?

AFAIK it uses SHA1 with per user SALT.



Yes, but SHA1 weakness becomes important only when password becomes as 
long as hash, i.e. 20 bytes for sha1. Without enforcing users to have 
long passwords replacing hash makes no sense.




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] HASH function (CORE-4436)

2017-07-21 Thread Alex via Firebird-devel



On 21.07.2017 14:43, Adriano dos Santos Fernandes wrote:

On 21/07/2017 08:00, Alex via Firebird-devel wrote:

Mark, this is interesting. I know bcrypt is very used by nodejs/expess
people and I even used it myself.

But what is more interesting, isn't Firebird still using these "not
suitable for passwords" hashes in recent versions?

AFAIK it uses SHA1 with per user SALT.


Yes, but SHA1 weakness becomes important only when password becomes as
long as hash, i.e. 20 bytes for sha1. Without enforcing users to have
long passwords replacing hash makes no sense.

I think the point is, if a cracker has a security database, it can run
billions of SHA1 hashes per second using the same salt in a brute force
attack, because SHA1 is a fast (suitable to hash large files) algorithm.

With bcrypt, with is purposely slow, the cracker can't do a brute force
attack so easily.


That's another issue, different from the one actively discussed last 
time when 2 different documents have same SHA1 hash, which is often 
correctly mentioned as "SHA1 weakness".


If we talk about stolen security database and passwords brute forcing - 
SRP + SHA1 hashes are weak if passwords are short. If password is random 
20 bytes sequence brute force attack requires unreal computational 
resources. (This was discussed with Jim here or may be in architect a 
few years ago). Use of computational-heavy hash can make SRP better but 
it's not as efficient as use of long password (linear vs exponential 
dependency). As an additional problem with this approach let's not 
forget DoS attacks - it's much simpler to DoS a system that needs a lot 
of resources for initial login validation, just run a lot of fake logins 
to it.


The only 'small' problem with long passwords is that people do not want 
to remember & type random 20 bytes sequence as password. This can be 
solved as follows. Minimum length of user password should be limited, 
but something typical for today (like 10 bytes containing letters & 
digits & punctuation) should be enough. Real password for SRP is a 
random bytes' sequence, short password from the client is used as an 
encryption key for any computational-heavy crypt (not hash!) algorithm, 
used to encrypt that random sequence. When setting password for a user 
this random bytes' sequence is used as a password for SRP and also 
stored in an encrypted form in that same security database. When user 
logins with short password encrypted random sequence appropriate for 
passed login is retuned to the client which must decrypt it himself. 
This helps to solve DoS attack problem - heavy computational algorithm 
is run by client, not server. Client decrypts initial random sequence 
and uses it for normal SRP authentication.


This authentication can be added as plugin to any FB versions starting 
with 3, no changes in basic soft is needed.




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] HASH function (CORE-4436)

2017-07-19 Thread Alex via Firebird-devel



On 19.07.2017 14:07, Adriano dos Santos Fernandes wrote:

On 19/07/2017 02:29, Dmitry Yemanov wrote:

19.07.2017 01:32, Adriano dos Santos Fernandes wrote:

Algorithm name could define result length.

Yes, for constants.

We need to decide whether the algorithm name can be passed dynamically
(and thus be presented as "value" in the grammar) or must be
predefined (via a string literal or maybe token). The latter gives us
more flexibility regarding the result type.

This is an interesting idea.

We can use special syntax (like some others system functions):

HASH(  [WITH ] )

 will be an identifier (not keyword) interpreted at compile time.


If we are not going to use hash plugins I'd vote for this syntax.


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] HASH function (CORE-4436)

2017-07-24 Thread Alex via Firebird-devel



On 22.07.2017 11:54, Mark Rotteveel wrote:

On 21-7-2017 13:00, Alex via Firebird-devel wrote:
Yes, but SHA1 weakness becomes important only when password becomes 
as long as hash, i.e. 20 bytes for sha1. Without enforcing users to 
have long passwords replacing hash makes no sense.


That is unfortunately not true. The weakness that allows one to 
produce a collision is not relevant here. The problem is purely one of 
speed. Plain SHA1 used for passwords are now 'trivially' bruteforced 
using GPUs (trivial compared to other algorithms, and especially for 
shorter passwords).


Eg see https://www.troyhunt.com/our-password-hashing-has-no-clothes/ 
(from 2012), a single GPU could try 2.2 billion hashes per second. And 
he demonstrates that from a sample of 4 passwords hashed using 
SHA-1 + salt he can easily crack 63% of them within 44 minutes, and 
that was 5 years ago.


The consensus in the security industry is that plain SHA1 (or any 
plain cryptographic hashing algorithm) even with salt is not suitable 
for passwords, and that an algorithm like PBKDF2, bcrypt, scrypt, etc 
should be used. See also 
https://patrickmn.com/security/storing-passwords-securely/


However if I recall the discussion about SRP, SRP doesn't actually 
store the hash of the password itself, but calculates a sort of public 
/ private key that can be used in an authentication challenge to see 
if the user used the original password for authentication. I'm not 
sure about the strengths or weaknesses of that.




SRP does store the value derived from the following hash: SHA1(salt, 
SHA1(login || ':' || password)). Word 'derived' is probably important 
from bruteforcing POV - in contains operations with BigIntegers 
increasing volume of computations. Must say never compared how much but 
it includes 1024-bit prime value.


From SRP authors POV SHA1's weakness to collisions does not compromise SRP:
https://tools.ietf.org/html/rfc5054#page-13

But what about a case with stolen hashes - I do not believe in algorithm 
that remains secure with 1 byte long password :D
And as I've already said choosing an algorithm with high computational 
price is not good choice for a server due to dos attacks. On contrary 
use of long random passwords on server and moving big computations to 
client can provide both bruteforce and dos attacks resistance.




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Getting attachment_id from IAttachment

2017-07-21 Thread Alex via Firebird-devel

On 21.07.2017 11:08, Jiří Činčura wrote:

Hi *,

is there a way to get attachement_id (the same as in mon$attachments)
from IAttachment isntance?



Certainly.
Use isc_info_attachment_id in IAttachment::getInfo().


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] udrcpp_example

2017-07-04 Thread Alex via Firebird-devel



On 04.07.2017 17:33, Paul Reeves wrote:

Building udrcpp_example fails under windows, and has done since at
least the final release of Firebird 3.0. Unfortunately the build
process doesn't detect the error.


That's a pity. Very interesting feature but people fail to use a sample.


I shall commit a fix for that in a
moment.

Here is the error (repeated many times) :

error C2896: 'bool
Firebird::Udr::FactoryRegistration::run(Firebird::CheckStatusWrapper
*,Firebird::IUdrPlugin *,void (__thiscall Firebird::IUdrPlugin::*
)(Firebird::CheckStatusWrapper *,const char *,T
*),Firebird::Udr::RegistrationNode *)' : cannot use function
template 'void Firebird::IUdrPlugin::registerFunction(StatusType
*,const char *,Firebird::IUdrFunctionFactory *)' as a function argument


Shall I log this as a bug?


Yes. Looks like we stepped on a limitation of MS compiler. Let's wait 
for comments from Adriano.


BTW - what version of VS fails? What does newest version say about this 
place?



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] udrcpp_example

2017-07-04 Thread Alex via Firebird-devel

On 04.07.2017 18:43, Dimitry Sibiryakov wrote:

04.07.2017 17:39, Alex via Firebird-devel wrote:

That's a pity. Very interesting feature but people fail to use a sample.


  BTW, this feature also could have wider usage in server as well. For 
example, SEC$USERS can be an UDR, gathering list of users from auth 
plugins on the fly instead of current ordinary table.




SEC$USERS is a table but not ordinary - it gathers lists of users from 
auth plugins on the fly. See jrd/UserManagement. More or less like 
monitoring tables do.




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] hello world example of gpre requested

2017-07-05 Thread Alex via Firebird-devel



On 05.07.2017 02:59, U-BLASTER-6000\mtdew wrote:

Hi-

I looked everywhere for docs on using gpre. I am interested in either a
c, c++, or cobol example for gpre compiled with gcc,g++, or cobc for
gnucobol. Can anyone include a link or file with some pointers?
e.g. c file with embedded sql and then the gcc commands to make it work.
I am using 2.5.x series cobol versions. I think after the gpre line
there is only one or two lines of gcc compiler commands to make it work.
c would probably be the easiest because when you run gpre with cobol it
is a little bit of work to get the output formatted the right way for
instance to feed it to cobc for gnucobol. I tried paul's article on
cobol but got really stuck, so I think C or C++ might be better.

Thanks for any links or a very brief tutorial if you can provide them.


What about C - you can find some samples in examples/stat of firebird 
distro (not absolutely sure for windows binaries, if it's missing there 
- please use src tarbal, linux binaries or github directly).


With Cobol things are worse. I do not know any sample, what is worse - 
noone of FB developers ever used to write a single line using that 
language. And if I'm not mistaken gpre distributed in binaries does not 
support cobol.


Also I have to warn you that gpre is close to getting 'de[recated' 
status soon i.e. it's not recommended to start new projects using it.




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] andorid deployment

2017-06-22 Thread Alex via Firebird-devel



On 22.06.2017 12:18, P-Soft - Fabio Codebue wrote:

Where can I find useful information to deploy and test android version?
Is there any howto?



As far as I know there are no specific docs re subj.
Some years ago I've used to write small doc how to install it (there are 
some specifics in creating security db and firebird.msg) but I'm afraid 
I can't provide it now.


Binaries are here:
https://sourceforge.net/projects/firebird/files/firebird-android-arm/


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdotFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] andorid deployment

2017-06-22 Thread Alex via Firebird-devel



On 22.06.2017 13:23, P-Soft - Fabio Codebue wrote:

Yes  I already downloaded it time ago.. .but how to install it?
I have to copy all the files into smartphone?


Yes.
After copying (to have full functionality) you should create security 
database from backup using gbak, create firebird.msg in 2 steps (restore 
msg.fdb from backup & use included build_file utility, -? switch will 
show you how to do it).



and how can I run it?


The only known way for me to run utilities is to use any text terminal 
for android. Certainly, fbclient.so may be used by any application that 
can load it. (Remember, it's FB3 i.e. embedded access is done also using 
fbclient.)



and how I can run "as a service"?



I believe that's what should be solved with good installer which we are 
missing. I've started

./firebird &
on tty and it worked for me (in simple tests) in all 3 modes - classic, 
super and SC.
But certainly it's not a way to go for enduser i.e. currently we are 
ready to provide only client and embedded access.



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdotFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Intel Skylake/Kaby Lake processors: broken hyper-threading

2017-06-26 Thread Alex via Firebird-devel



On 26.06.2017 18:48, marius adrian popa wrote:

https://lists.debian.org/debian-devel/2017/06/msg00308.html


Great - installed upgrade on my notebook. But must say I've never used 
to meet this bug though HT is always on.




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Effect of DST on current_timestamp values

2017-06-13 Thread Alex via Firebird-devel



On 13.06.2017 11:12, Leyne, Sean wrote:
A post to the Firebird support list pointed out that current_timestamp 
values do not correctly reflect the effect of DST time changes while 
the server is running.
In order for current_timestamp to reflect the correct local time 
values, the server needs to be restarted.
Though it never occurred to me to check time condition, I would have 
to say that the current logic seems wrong.  Since current_timestamp is 
supposed to return the local time, all values should be valid in that 
context, and it should not require a server restart in order for the 
values to be correct.
I was going to log a case about this, but thought that I should post 
here first.




IMHO this should go to the tracker

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdotFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Internet connection problems

2017-06-13 Thread Alex via Firebird-devel

Hi all,

I have network problem (connection is dropped periodically) therefore 
can't use icq/slack currently. If problem does not go away I will have 
to change provider, meantime please use email to contact me when needed 
(it badly but works).


Alex.



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] DECFLOAT documentation unclear

2017-06-17 Thread Alex via Firebird-devel



On 17.06.2017 13:45, Mark Rotteveel wrote:

You mailed this to me directly instead of the list, was that intentional?



Use laptop to answer, pressed something wrong I think.


On 17-6-2017 11:20, Alex wrote:

On 17.06.2017 11:21, Mark Rotteveel wrote:
/doc/sql.extensions/README.data_types contains the following about 
DECFLOAT


"Although length of DECFLOAT(34) literal can exceed 6000 bytes 
(0.000<6000 zeros>00123) implementation limit exists - length of 
such literal should not exceed 1024 bytes."


I believe that should read "length of DECFLOAT(34) **value** ..."

Because it makes no sense that a literal can exceed 6000 bytes and a 
literal should not exceed 1024 bytes. And otherwise, this really 
needs more copy-editing to clarify what is really meant.




Mark, I've meant that literal as long as 6000 bytes (0.000..<5800 
zeroes>..0324663567201) can be converted into correct decfloat value 
not loosing precision. But the typical representation of such 
literals is 0.324663567201E-5803, therefore limiting length of 
literal that can be used in firebird to 1Kb is not big problem. If 
someone can explain it better feel free to fix docs or send correct 
form to me. Please keep in mind that I'm not native English speaker...


Literals are what are used to represent the value in a query string. 
So is the limit 1024 or 6000+ for literals? It can't be both. Would 
using 0.000..5800*0..0324663567201 (with the zeros expanded) in a 
query string work or not?


I assume the limit is 1024 characters (or bytes?), in that case I'd 
suggest to start with stating that limit first, and then explain that 
longer values can usually be transformed to a correct value using the 
scientific notation.


To be honest, I think the limit can even be for shorter than 1024, no 
one in their right mind would use literals like that.


Yes, but it's much simpler to make temp buffer large enough than have 
additional discussion about it here :)




Something like:

"""
The length of DECFLOAT literals are limited to 1024 characters. For 
longer values, you will need to use the scientific notation. For 
example, the 0.0..1020 zeroes..11 cannot be used as a literal, instead 
you can use the equivalent in scientific notation: 1.1E-1022. 
Similarly 1..1023 zeroes..0 can be presented as 1.0E1024

"""



Done, thank you.



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] gpre cobol can't access memory segfault with trace

2017-06-19 Thread Alex via Firebird-devel



On 18.06.2017 04:41, U-BLASTER-6000\mtdew wrote:

#3  0x764fb754 in isc_attach_database (
 user_status=, file_length=60,
 file_name=, public_handle=0x602190 ,
 dpb_length=,
 dpb=0xf7ff24a0 )
 at ../src/jrd/why.cpp:1422
#4  0x00400f77 in Moon_ (entry=0) at simple15.c:135


The problem seems to be near frames 3&4:

Somewhy parameter passed from simple.c points to illegal memory address.

dpb=0xf7ff24a0 )

Fix it in simple.c.



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Firebird.pas is missing

2017-08-30 Thread Alex via Firebird-devel

Paul - FYI, part of fb4 posix build log:

cat /buildroot/src/misc/pascal/fb_get_master_interface.pas 
>/buildroot/temp/Debug/func.pas


awk -f /buildroot/src/misc/pascal/Pascal.Constants.awk 
>/buildroot/temp/Debug/func.pas


grep '[[:space:]]isc_' /buildroot/lang_helpers/gds_codes.pas 
>>/buildroot/temp/Debug/func.pas


/buildroot/gen/Debug/cloop/release/bin/cloop 
/buildroot/src/include/firebird/FirebirdInterface.idl pascal 
/buildroot/src/include/gen/Firebird.pas Firebird --uses SysUtils \

--interfaceFile /buildroot/src/misc/pascal/Pascal.interface.pas \
--implementationFile 
/buildroot/src/misc/pascal/Pascal.implementation.pas \

--exceptionClass FbException \
--functionsFile /buildroot/temp/Debug/func.pas \
--prefix I



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] fbclient - Event call back is called after isc_cancel_events

2017-08-28 Thread Alex via Firebird-devel



On 28.08.2017 04:15, Slavomir Skopalik wrote:

Should I create ticket for this?



No. Removing that call will break old code.

From programing theory, no call back after successful cancel event is 
allowed.


To be precise - it happens during event cancellation.


Slavek


Hi all,

I'm testing Firebird-3.0.3.32798-0_Win32 client and I found strange 
behavior when I canceling event


by isc_cancel_events.

I supposed that after that call, no call back happen, but in reality 
it is happen.


Is it correct?



One callback always happens after canceling events - it was API 
behavior since IB times. It's supposed you are closing your events' 
listener on that callback.




-- 


Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel






-- 


Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel





--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Crypt key callback on Embedded

2017-08-28 Thread Alex via Firebird-devel



On 28.08.2017 17:18, Jiří Činčura wrote:

Jiri, please take a look at the sample provided with FB3 - it works with
both embedded & remote.

I'm looking at that. But I don't know why the loading is failing (while
the same setup work in server mode). It would be nice to have bit more
verbosity, maybe in log (but there's nothing).


Ahh - agreed, the reason why lib failed to load is missing in diags.


BTW is the callback registration expected to work with "old" (non-OO)
API?



May be you need fb_database_crypt_callback() call?
Second parameter (void*) is actually a pointer to callback interface.



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Crypt key callback on Embedded

2017-08-28 Thread Alex via Firebird-devel



On 28.08.2017 17:47, Jiří Činčura wrote:

Ahh - agreed, the reason why lib failed to load is missing in diags.

Bad luck for me.

The Callback.dll is actually loaded fine (at least from OS perspective):
16:41:38,1377272ConsoleApp1.exe 7240Load Image
C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\ConsoleApp1\bin\Debug\fb\plugins\Callback.dll
SUCCESS Image Base: 0x6d08, Image Size: 0x2c000

Not sure what happened then in Firebird. Maybe the Callback.dll isn't
happy because I haven't provided any callback?


Try this with example - you should get meaningful diags about missing 
key. But pay attention - that's diags from crypt plugin, i.e. it depends 
upon plugin how to react to missing callback (which means missing key 
provided by current client). BTW, in some usage schemas callback is not 
needed at all - if crypt plugin gets key in some other way.



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] fbclient - Event call back is called after isc_cancel_events

2017-08-25 Thread Alex via Firebird-devel



On 25.08.2017 13:36, Slavomir Skopalik wrote:

Hi all,

I'm testing Firebird-3.0.3.32798-0_Win32 client and I found strange 
behavior when I canceling event


by isc_cancel_events.

I supposed that after that call, no call back happen, but in reality 
it is happen.


Is it correct?



One callback always happens after canceling events - it was API behavior 
since IB times. It's supposed you are closing your events' listener on 
that callback.




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Firebird.pas is missing

2017-08-30 Thread Alex via Firebird-devel

On 30.08.2017 14:07, Paul Reeves wrote:

It looks as if a physical copy of Firebird.pas never got added to HEAD.


Adding it to FB3 was temporal solution - did not want to add more 
problems to windows build right before FB3 release (.pas file was added 
not long before final release).



So it is not included in the Alpha 1 windows kits. Unfortunately a few
parts of the windows packaging code from B3_0_Release are also missing
(my fault) so this didn't get picked up earlier.

What is actually needed to generate firebird.pas?


1. cloop. I'm not sure is it built or not currently in windows but it's 
definitely buildable w/o any problems.

2. gnu awk.
3. grep.


I looked at the code
in Makefile.in


Rules to build firebird.pas are at lines 107-119 in it. cloop needs very 
many switches to build for pascal - that's due to very strict 
requirements to the syntax from the language. Pay attention that all 
required constants (like dpb items, error codes, etc.) are also included 
here (using TMP_FUNCS file).



and makeInstallImage.sh.in


I believe it does nothing except including ready file into the package.


for the linux kits and
it is not at all obvious what is needed to add this to the windows
build process.


On my mind this place is far from being the most complex in posix build :-)
Though compared with c++ include file rule which is just 2 lines long - 
yes, not obvious.




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel