Re: [fpc-devel] please make TField.SetDataset virtual

2008-05-29 Thread Paul Ishenin
Paul Ishenin wrote: I help to convert Fib+ library to FPC/Lazarus and this was one of the problems we found. Found one more incompatibility - TField.SetAsVariant declaration is differ: delphi: procedure SetAsVariant(const AValue: variant); virtual; fpc: procedure SetAsVariant(AValue:

Re: [fpc-devel] please make TField.SetDataset virtual

2008-05-29 Thread Paul Ishenin
Paul Ishenin wrote: Paul Ishenin wrote: I help to convert Fib+ library to FPC/Lazarus and this was one of the problems we found. Found one more incompatibility - TField.SetAsVariant declaration is differ: Sorry, I was impatient with sending first problems. I found more and this is the

[fpc-devel] Re: I get duplicate GUIDs under Linux

2008-05-29 Thread Graeme Geldenhuys
Hi, I just tested that same code under Windows 2000 and I don't have any errors or duplicates. As I would have expected. So there seems to be a bug in the CreateGUID implementation of Linux. BTW: I'm using Ubuntu 7.10. My 'uname -a' output: Linux graemeg 2.6.22-14-generic #1 SMP Tue Feb 12

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Mattias Gärtner
Zitat von Graeme Geldenhuys [EMAIL PROTECTED]: Hi, I'm trying to do performance testing in Firebird RDBMS using GUID's and primary keys. I constantly got PK violations. I then wrote the code show below to create 50,000 GUID's and add them to a StringList (no duplicates allowed). Every time

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Michael Van Canneyt
On Thu, 29 May 2008, Graeme Geldenhuys wrote: Hi, I'm trying to do performance testing in Firebird RDBMS using GUID's and primary keys. I constantly got PK violations. I then wrote the code show below to create 50,000 GUID's and add them to a StringList (no duplicates allowed). Every

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Marco van de Voort
On Thu, 29 May 2008, Graeme Geldenhuys wrote: I'm trying to do performance testing in Firebird RDBMS using GUID's and primary keys. I constantly got PK violations. I then wrote the code show below to create 50,000 GUID's and add them to a StringList (no duplicates allowed). Every time I

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Jonas Maebe
On 29 May 2008, at 13:26, Michael Van Canneyt wrote: The default implementation on Linux uses a random() call to generate a guid, combined with a timestamp, if I recall correctly. Note that random() will always return the same sequence if you don't call randomize() once in the program.

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Graeme Geldenhuys
2008/5/29 Mattias Gärtner [EMAIL PROTECTED]: Sounds like the Debian openssl key fiasko. I saw Ubuntu had some updates to resolve this issue on my system. Got the updates, rebooted, recompiled my application and still 1021 is my limit before I get duplicates. What is really weird is that once I

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Graeme Geldenhuys
2008/5/29 Michael Van Canneyt [EMAIL PROTECTED]: The default implementation on Linux uses a random() call to generate a guid, combined with a timestamp, if I recall correctly. You can use the kernel mechanism by inluding libuuid in your uses clause. That should ensure uniqueness. Yup, that

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Mattias Gärtner
Zitat von Graeme Geldenhuys [EMAIL PROTECTED]: 2008/5/29 Mattias Gärtner [EMAIL PROTECTED]: Sounds like the Debian openssl key fiasko. I saw Ubuntu had some updates to resolve this issue on my system. Got the updates, rebooted, recompiled my application and still 1021 is my limit before

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Graeme Geldenhuys
2008/5/29 Marco van de Voort [EMAIL PROTECTED]: rtl/linux/suuid.inc reads from '/proc/sys/kernel/random/uuid' Maybe it is not used though. How do I know if it's using Random or '/proc/sys/kernel/random/uuid'? Browsing the RTL source code with Lazarus, I believe I am using the latter, but not

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Florian Klaempfl
Graeme Geldenhuys schrieb: 2008/5/29 Marco van de Voort [EMAIL PROTECTED]: rtl/linux/suuid.inc reads from '/proc/sys/kernel/random/uuid' Maybe it is not used though. How do I know if it's using Random or '/proc/sys/kernel/random/uuid'? Browsing the RTL source code with Lazarus, I believe I am

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Graeme Geldenhuys
2008/5/29 Mattias Gärtner [EMAIL PROTECTED]: Sorry. Openssl has *nothing* to do with the CreateGUID function. I thought that much, but then thought it wouldn't hurt installing the patch anyway. What is really weird is that once I hit the 1021 limit, I can't run that method again. I get a

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Graeme Geldenhuys
2008/5/29 Florian Klaempfl [EMAIL PROTECTED]: How do I know if it's using Random or '/proc/sys/kernel/random/uuid'? Browsing the RTL source code with Lazarus, I believe I am using the latter, but not 100% sure. If it uses /proc/sys/kernel/random/uuid, strace shows it. Thanks Florian. I am

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Vincent Snijders
Graeme Geldenhuys schreef: 2008/5/29 Florian Klaempfl [EMAIL PROTECTED]: How do I know if it's using Random or '/proc/sys/kernel/random/uuid'? Browsing the RTL source code with Lazarus, I believe I am using the latter, but not 100% sure. If it uses /proc/sys/kernel/random/uuid, strace shows

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Mattias Gärtner
Zitat von Graeme Geldenhuys [EMAIL PROTECTED]: 2008/5/29 Mattias Gärtner [EMAIL PROTECTED]: Sorry. Openssl has *nothing* to do with the CreateGUID function. I thought that much, but then thought it wouldn't hurt installing the patch anyway. It would hurt a lot *not* installing the patch.

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Marco van de Voort
GUID's are supposed to be very unique! Wikipedia says something like: Create a billion every second for 10 years or something before you deplete the range. So what is wrong with my code or maybe the Free Pascal implementation? I quicktested the FreeBSD implementation, verified it used the

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Michael Van Canneyt
On Thu, 29 May 2008, Mattias Gärtner wrote: Zitat von Graeme Geldenhuys [EMAIL PROTECTED]: 2008/5/29 Mattias Gärtner [EMAIL PROTECTED]: Sorry. Openssl has *nothing* to do with the CreateGUID function. I thought that much, but then thought it wouldn't hurt installing the patch

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Graeme Geldenhuys
2008/5/29 Mattias Gärtner [EMAIL PROTECTED]: It would hurt a lot *not* installing the patch. The bigger problem is that the other distributions including windows, Mac OS X, BSD, ... server must now install the blacklist too. I guess non debian systems now have bigger problems than debian.

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Michael Van Canneyt
On Thu, 29 May 2008, Graeme Geldenhuys wrote: 2008/5/29 Mattias Gärtner [EMAIL PROTECTED]: Sorry. Openssl has *nothing* to do with the CreateGUID function. I thought that much, but then thought it wouldn't hurt installing the patch anyway. What is really weird is that once I hit

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Graeme Geldenhuys
2008/5/29 Michael Van Canneyt [EMAIL PROTECTED]: can you send me your test program, so I can test my fixes ? Here you go. It is pretty much what I sent before, except now I made it a console application instead of a fpGUI one. Below it tries to create 50,000 GUID's. My SQL version tries 5mil.

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Michael Van Canneyt
On Thu, 29 May 2008, Graeme Geldenhuys wrote: 2008/5/29 Michael Van Canneyt [EMAIL PROTECTED]: can you send me your test program, so I can test my fixes ? Here you go. It is pretty much what I sent before, except now I made it a console application instead of a fpGUI one. Below it

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Vincent Snijders
Michael Van Canneyt schreef: On Thu, 29 May 2008, Graeme Geldenhuys wrote: 2008/5/29 Michael Van Canneyt [EMAIL PROTECTED]: can you send me your test program, so I can test my fixes ? Here you go. It is pretty much what I sent before, except now I made it a console application instead of a

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Michael Van Canneyt
On Thu, 29 May 2008, Vincent Snijders wrote: Michael Van Canneyt schreef: On Thu, 29 May 2008, Graeme Geldenhuys wrote: 2008/5/29 Michael Van Canneyt [EMAIL PROTECTED]: can you send me your test program, so I can test my fixes ? Here you go. It is pretty much what I sent

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Mattias Gärtner
Zitat von Graeme Geldenhuys [EMAIL PROTECTED]: 2008/5/29 Mattias Gärtner [EMAIL PROTECTED]: It would hurt a lot *not* installing the patch. The bigger problem is that the other distributions including windows, Mac OS X, BSD, ... server must now install the blacklist too. I guess non

[fpc-devel] StrToDateTime issue

2008-05-29 Thread Joao Morais
Hello, Performing some tests with date and time routines I discovered that StrToDateTime doesn't work if I only use time. This was designed that way or a patch is welcome? Joao Morais ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] I get duplicate GUIDs under Linux

2008-05-29 Thread Florian Klaempfl
Vincent Snijders schrieb: Michael Van Canneyt schreef: I patched it so Randomize is called only once. Merged to fixes. Thanks. BTW, the log message made me think you introduced a new bug :-) GetRandomBytes calls random only once instead of GetRandomBytes calls randomize only once ... and

Re: [fpc-devel] StrToDateTime issue

2008-05-29 Thread Michael Van Canneyt
On Thu, 29 May 2008, Joao Morais wrote: Hello, Performing some tests with date and time routines I discovered that StrToDateTime doesn't work if I only use time. This was designed that way or a patch is welcome? A patch is welcome. Michael.

[fpc-devel] Re: I get duplicate GUIDs under Linux

2008-05-29 Thread Graeme Geldenhuys
Thanks to Michael and everybody else that helped out with this issue. I'll get a FPC (svn update) and try out the fixes tomorrow. Regards, - Graeme - On 29/05/2008, Graeme Geldenhuys [EMAIL PROTECTED] wrote: Hi, I'm trying to do performance testing in Firebird RDBMS using GUID's and

Re: [fpc-devel] StrToDateTime issue

2008-05-29 Thread Joao Morais
Michael Van Canneyt wrote: On Thu, 29 May 2008, Joao Morais wrote: Hello, Performing some tests with date and time routines I discovered that StrToDateTime doesn't work if I only use time. This was designed that way or a patch is welcome? A patch is welcome. Here it is. This patch fixes