Re: [firebird-support] Statement freezes firebird

2020-01-24 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2020. 01. 24. 14:29 keltezéssel, Matthias Winkler spmm...@gmail.com 
[firebird-support] írta:
> @Mark: I see the very same issue with firebird 3.0.4. Any ideas?


I suggest try with 3.0.5 also.

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Off-Topic: Firebird future

2019-10-21 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2019. 10. 21. 18:17 keltezéssel, Stefan Heymann li...@stefanheymann.de 
[firebird-support] írta:
> If you want to have it for free, like in
> free beer, you can sit down, write it and publish it


This is the plan. ;-)

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Off-Topic: Firebird future

2019-10-19 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2019. 10. 09. 5:57 keltezéssel, Alex Castillo acr_k...@yahoo.com 
[firebird-support] írta:
> I'm asking myself how much time I'll still be using Firebird if the 
> project evolves slow, there is no t GUI officially maintened and the 
> cool features are for the commercial companies.


Yes, slooow nowadays and no frequent point releases. 3.0.4 released one 
year ago. Official or not, we need a simple, up to date, Firebird only, 
native GUI.

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] How to trigger automatic sweep?

2019-08-13 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2019. 05. 01. 11:47 keltezéssel, Dimitry Sibiryakov s...@ibphoenix.com 
[firebird-support] írta:
> 01.05.2019 11:44, Gabor Boros mlngl...@bgss.hu [firebird-support] wrote:
>>I need a detailed recipe to increase
>> the gap.
> 
> In isql: "Set transaction no auto undo" + any DML + rollback.


Removed no_auto_undo from the real life application but the gap between 
OIT and OST still increasing.

Any other tips?

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



[firebird-support] How to query all variable names from a database?

2019-06-06 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
Hi All,

I need to know all stored procedure variable names from a (2.5) 
database. I not see these in system tables like parameters or fields. 
But I see these with a text editor. For example...

Create a new database and a procedure in it:

CREATE PROCEDURE MY_PROC AS DECLARE VARIABLE MY_VAR INTEGER; BEGIN END

Set RDB$PROCEDURES.RDB$PROCEDURE_SOURCE to NULL.

Backup the database with gbak. I see MY_VAR text in the resulting backup 
file (and in the restored database) with a text editor.

So, where is the variable names stored and how to query these?

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] How to trigger automatic sweep?

2019-05-01 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2019. 05. 01. 16:24 keltezéssel, hv...@users.sourceforge.net 
[firebird-support] írta:
>  > After this step firebird.log contains:
>  >
>  > SRV Wed May 01 14:54:40 2019
>  > Sweep is started by SWEEPER
>  > Database "EMPLOYEE"
>  > OIT 156, OAT 20157, OST 20157, Next 20157
>  >
>  > SRV Wed May 01 14:54:41 2019
>  > Shutting down the server with 1 active connection(s) to 1 database(s),
>  > 0 active service(s)
> 
> Why it was shut down ?


Don't know. I not shutdown anything.


>  > and result of "gfix -validate -full -no_update EMPLOYEE":
>  >
>  > Summary of validation errors
>  > Number of index page errors : 1
> 
> What is in firebird.log ? Are you sure there was no errors before the 
> sweep ?


The above things and like the next:

SRV Wed May 01 19:51:35 2019
Database: EMPLOYEE
Index 1 is corrupt (record 29189 have missing entries) in table 
SALARY_HISTORY (136)

I updating the SALARY table.

The firebird.log not exists before the above messages.


> 
>  > So, I wanted to see this! Automatic sweep destroy the database. And easy
>  > to reproduce. Too easy! :-(
> 
> Why do you think database is "destroyed" ? Too strong statement without 
> answes on my questions above.


Sorry Vlad I don't know the good term. The "something went wrong in the 
database" is better?

Can I create a backtrace or whatever?

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] How to trigger automatic sweep?

2019-05-01 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2019. 05. 01. 11:47 keltezéssel, Dimitry Sibiryakov s...@ibphoenix.com 
[firebird-support] írta:
> In isql: "Set transaction no auto undo" + any DML + rollback.

Thank you very much! Now I can manage the gap! :-)

So I made a gap-setter application then try...

Windows 10 64bit, 2.5.8 Classic 32bit, and the EMPLOYEE database.

Numbers of EMPLOYEE at factory state:

Oldest transaction  154
Oldest active   155
Oldest snapshot 155
Next transaction155

If I execute 2 from a "Start snapshot no auto undo transaction, 
UPDATE, rollback" cycle on the factory state of EMPLOYEE the numbers are:

Oldest transaction  156
Oldest active   20156
Oldest snapshot 20156
Next transaction20156

No problem, no firebird.log created.

If I execute 20001 from a "Start snapshot no auto undo transaction, 
UPDATE, rollback" cycle on the factory state of EMPLOYEE the numbers are:

Oldest transaction  156
Oldest active   20158
Oldest snapshot 20158
Next transaction20158

After this step firebird.log contains:

SRV Wed May 01 14:54:40 2019
Sweep is started by SWEEPER
Database "EMPLOYEE"
OIT 156, OAT 20157, OST 20157, Next 20157

SRV Wed May 01 14:54:41 2019
Shutting down the server with 1 active connection(s) to 1 database(s), 
0 active service(s)

SRV Wed May 01 14:54:41 2019
Error during sweep:
connection shutdown

and result of "gfix -validate -full -no_update EMPLOYEE":

Summary of validation errors
 Number of index page errors : 1

So, I wanted to see this! Automatic sweep destroy the database. And easy 
to reproduce. Too easy! :-(

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



[firebird-support] How to trigger automatic sweep?

2019-05-01 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
Hi All,

I try to reproduce a real life database corruption problem with 2.5.8 
Classic (Linux 64bit). Which depend on the automatic sweep feature 
maybe. The formula is: Oldest snapshot (OST) - Oldest transaction (OIT) 
 > Sweep interval. Right? I tried many ways but cannon increase the gap 
between OST and OIT bigger than 1. I need a detailed recipe to increase 
the gap. Can anybody help me out?

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Installing Firebird 2.5 on Debian 9 Stretch

2019-01-21 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2019. 01. 21. 9:37 keltezéssel, Ertan Küçükoğlu 
ertan.kucuko...@1nar.com.tr [firebird-support] írta:
> 1- Is there easier way to install firebird 2.5 on this Debian 9 Stretch
> server?

Yes. I always use the official binary tar.gz and works like a charm 
(with Debian 9 and 10, CentOS 7, etc.).

Classic/SuperClassic:

https://github.com/FirebirdSQL/firebird/releases/download/R2_5_8/FirebirdCS-2.5.8.27089-0.amd64.tar.gz

SuperServer:

https://github.com/FirebirdSQL/firebird/releases/download/R2_5_8/FirebirdSS-2.5.8.27089-0.amd64.tar.gz

Gabor


Re: [firebird-support] Re: Server crash when no more space for the database

2018-11-10 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2018. 11. 07. 8:51 keltezéssel, hv...@users.sourceforge.net 
[firebird-support] írta:
>    There should be no crash. Errors - yes, crash - no.
> Attached log is truncated and i see no message about crash there.

https://pastebin.com/0iv3FQcy

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Re: Server crash when no more space for the database

2018-11-09 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2018. 11. 08. 12:40 keltezéssel, hv...@users.sourceforge.net 
[firebird-support] írta:
>    And I use web-interface for this group, surprise ?


Vlad,

I can send the attachment privately. Which address?

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Re: Server crash when no more space for the database

2018-11-07 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2018. 11. 07. 8:51 keltezéssel, hv...@users.sourceforge.net 
[firebird-support] írta:
>    There should be no crash. Errors - yes, crash - no.
> Attached log is truncated and i see no message about crash there.

The firebird.log not exists when started the OLTP. My second message 
contains the whole firebird.log which available after fbserver.exe 
terminated.

Gabor










++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



[firebird-support] Server crash when no more space for the database

2018-11-06 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
Hi All,

While I executed some OLTP with 2.5(.9.27119 SS Win64) and no more space 
for the database the server crashed. See the attachment. Is it a known 
limitation (not fixed in 2.5 because it's too old) or a bug?

Gabor


[Non-text portions of this message have been removed]



Re: [firebird-support] Sequential auto incremental numbering

2018-09-05 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2018. 09. 02. 17:03 keltezéssel, 'Christian Giesen' ch...@xt.co.za 
[firebird-support] írta:
> Good day,
> 
> Using Firebird 3.0.3.
> 
> RAD Studio 10.2.2 (Tokyo)
> 
> I have a need to generate unique sequential invoice/credit note numbers. 
> I fully understand the usage of generators to produce unique identifiers 
> in tables. However, according to Firebird documentation the use of 
> generators does NOT guarantee sequential numbering.

I use and suggest a table instead of generator. More flexible and 
transaction controlled solution. If you need more than one (and 
independent) sequential number just use same table with more records.

A simple example for it:

https://groups.yahoo.com/neo/groups/firebird-support/conversations/messages/128920

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] WITH RECURSIVE or not WITH RECURSIVE

2018-06-20 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2018. 06. 04. 16:17 keltezéssel, liviuslivius 
liviusliv...@poczta.onet.pl [firebird-support] írta:
> I understand that data from real database are restricted.
> But what is the query plan for my CTE?


A VIEW based on a VIEW then JOIN-ed with a VIEW which contains the CTE. 
So the plan is complex.

> Do you have an index on column id_parent?


This field come from a COALESCE(FIELD1,FIELD2) and both fields have a FK.

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] How to detect the source of a "firebird terminated abnormally (-1)" error?

2018-06-14 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2018. 06. 01. 14:33 keltezéssel, Gabor Boros mlngl...@bgss.hu 
[firebird-support] írta:
> Switched on BugcheckAbort and later found a core file in /tmp. See the
> gdb output below. Any idea?


An other bt below. Is it say something to anybody?

Reading symbols from /opt/firebird/bin/.debug/firebird.debug...done.

warning: core file may not match specified executable file. 
 
 

[New LWP 3640] 
 
 

[New LWP 3642] 
 
 

[New LWP 3528] 
 
 

[New LWP 3529] 
 
 

[New LWP 3643] 
 
 

[New LWP 3530] 
 
 

[Thread debugging using libthread_db enabled] 
 
 

Using host libthread_db library 
"/lib/x86_64-linux-gnu/libthread_db.so.1". 
 
 

Core was generated by `/opt/firebird/bin/firebird'. 
 
 

Program terminated with signal SIGSEGV, Segmentation fault. 
 
 

#0  0x7f0b295a8880 in ?? () 
 
 

(gdb) thread apply all bt 
 
 

 
 
 

Thread 6 (Thread 0x7f0b31456700 (LWP 3530)): 
 
 

#0  0x7f0b3246f761 in sem_timedwait () from 
/lib/x86_64-linux-gnu/libpthread.so.0 
 
 

#1  0x7f0b33a331b1 in Firebird::SignalSafeSemaphore::tryEnter 
(this=0x7f0b33ed91f0, seconds=, milliseconds=) at 
/home/fbadmin/builds/64/fb3.0/firebird/src/common/classes/semaphore.cpp:202 

#2  0x7f0b3396661b in Why::(anonymous 
namespace)::TimerEntry::timeThread () at 
/home/fbadmin/builds/64/fb3.0/firebird/src/yvalve/MasterImplementation.cpp:299
#3  0x7f0b33a207f1 in run (this=) at 
/home/fbadmin/builds/64/fb3.0/firebird/src/common/ThreadStart.cpp:78
#4  (anonymous namespace)::threadStart (arg=0x7f0b33ede210) at 
/home/fbadmin/builds/64/fb3.0/firebird/src/common/ThreadStart.cpp:93
#5  0x7f0b32469184 in start_thread () from 
/lib/x86_64-linux-gnu/libpthread.so.0
#6  0x7f0b3219603d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 5 (Thread 0x7f0b2a004700 (LWP 3643)):
#0  0x7f0b3246f761 in sem_timedwait () from 
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x7f0b307ffc31 in Firebird::SignalSafeSemaphore::tryEnter 
(this=this@entry=0x7f0b33e7af38, seconds=seconds@entry=10, 
milliseconds=1, milliseconds@entry=0) at 
/home/fbadmin/builds/64/fb3.0/firebird/src/common/classes/semaphore.cpp:202
#2  0x7f0b305a5cc9 in Jrd::Database::garbage_collector 
(dbb=0x7f0b33e7a7c0) at 
/home/fbadmin/builds/64/fb3.0/firebird/src/jrd/vio.cpp:4992
#3  0x7f0b305b06d3 in internalRun (this=) at 
/home/fbadmin/builds/64/fb3.0/firebird/src/include/../common/ThreadStart.h:158
#4  ThreadFinishSync::internalRun 
(arg=arg@entry=0x7f0b33e7af78) at 
/home/fbadmin/builds/64/fb3.0/firebird/src/include/../common/ThreadStart.h:150
#5  0x7f0b307e5e71 in run (this=) at 
/home/fbadmin/builds/64/fb3.0/firebird/src/common/ThreadStart.cpp:78
#6  (anonymous namespace)::threadStart (arg=0x7f0b33e40ce0) at 
/home/fbadmin/builds/64/fb3.0/firebird/src/common/ThreadStart.cpp:93
#7  0x7f0b32469184 in start_thread () from 
/lib/x86_64-linux-gnu/libpthread.so.0
#8  0x7f0b3219603d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 4 (Thread 0x7f0b31c57700 (LWP 3529)):
#0  0x7f0b3246f670 in sem_wait () from 
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x7f0b33a33098 in Firebird::SignalSafeSemaphore::enter 
(this=0x7f0b33edb860) at 
/home/fbadmin/builds/64/fb3.0/firebird/src/common/classes/semaphore.cpp:163
#2  0x7f0b339a1925 in (anonymous namespace)::shutdownThread () at 
/home/fbadmin/builds/64/fb3.0/firebird/src/yvalve/why.cpp:754
#3  0x7f0b33a207f1 in run (this=) at 
/home/fbadmin/builds/64/fb3.0/firebird/src/common/ThreadStart.cpp:78
#4  (anonymous namespace)::threadStart (arg=0x7f0b33edb898) at 
/home/fbadmin/builds/64/fb3.0/firebird/src/common/ThreadStart.cpp:93
#5  0x7f0b32469184 in start_thread () from 
/lib/x86_64-linux-gnu/libpthread.so.0
#6  0x7f0b3219603d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 3 (Thread 0x7f0b33ecf7c0 (LWP 3528)):
#0  0x7f0b32188c9d in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x004096d2 in select (timeout=, 
this=0x7f0b33eae110) at 
/home/fbadmin/builds/64/fb3.0/firebird/src/remote/inet.cpp:377
#2  select_wait (selct=0x7f0b33eae110, main_port=0x7f0b33ea26c0) at 
/home/fbadmin/builds/64/fb3.0/firebird/src/remote/inet.cpp:2243
#3  select_multi (main_port=0x7f0b33ea26c0, buffer=0x7f0b33ea6d40 "", 
bufsize=8192, length=0x7fffc5856ea0, port=...) at 
/home/fbadmin/builds/64/fb3.0/firebird/src/remote/inet.cpp:2021
#4  0x0042bfc1 in SRVR_multi_thread 
(main_port=main_port@entry=0x7f0b33ea26c0, flags=flags@entry=2) at 
/home/fbadmin/builds/64/fb3.0/firebird/src/remote/server/server.cpp:1543
#5  0x00405a19 in main (argc=, argv=) at 
/home/fbadmin/builds/64/fb3.0/firebird/src/remote/server/os/posix/inet_server.cpp:423

Thread 2 (Thread 0x7f0b2a936700 (LWP 3642)):
#0  0x7f0b3246f761 in sem_timedwait () from 
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x7f0b307ffc31 in Firebird::SignalSafeSemaphore::tryEnter 
(this=this@entry=0x7f0b33d540f8, seconds=seconds@entry=10, 
milliseconds=1, milliseconds@

Re: [firebird-support] WITH RECURSIVE or not WITH RECURSIVE

2018-06-04 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2018. 06. 01. 17:33 keltezéssel, liviuslivius 
liviusliv...@poczta.onet.pl [firebird-support] írta:
> Hi,
> 
> can you show some sample?
> And what indexes have  you created?
> Can you show plan for both queries and real queries itself?
> What filter "where" are you using?
> 
> I am really interested because i have compared both queries with much 
> more populated tables and i have got better results time, fetches and 
> much bigger difference was memory usage.


I cannot provide any information from the real database. Your solution 
is slow in standalone mode for me. The earlier solution slow after 
included/adapted into the real database. Then wrote a recursive function 
(see below) which is fast for me. I jumped into this recursive CTE 
subject because the language reference say "A great benefit of recursive 
CTE s is that they use far less memory and CPU cycles than an equivalent 
recursive stored procedure.".

CREATE FUNCTION GET_TOP_PARENT (IN_ID BIGINT) RETURNS BIGINT AS
DECLARE VARIABLE TMP_PARENT_ID BIGINT DEFAULT NULL;
BEGIN
   IF (IN_ID IS NOT NULL) THEN SELECT PARENT_ID FROM TABLE1 WHERE 
(ID=:IN_ID) INTO TMP_PARENT_ID;
   IF (TMP_PARENT_ID IS NOT NULL) THEN GET_TOP_PARENT(TMP_PARENT_ID); 
ELSE TMP_PARENT_ID=IN_ID;
   RETURN TMP_PARENT_ID;
END

SELECT TABLE1.*, GET_TOP_PARENT(TABLE1.PARENT_ID) AS TOP_PARENT_ID FROM 
TABLE1

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] How to detect the source of a "firebird terminated abnormally (-1)" error?

2018-06-01 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2018. 05. 31. 21:02 keltezéssel, Gabor Boros mlngl...@bgss.hu 
[firebird-support] írta:
> Hi All,
> 
> I found some "firebird terminated abnormally (-1)" errors in
> firebird.log on my development machine.  How can I detect it's source?
> My tip is a self made UDF (no input parameter, one TIMESTAMP output and
> written with Free Pascal). Can I stress test the UDF/problem somehow? (I
> know the problem only from the log and use 3.0.3 SuperServer and Linux
> 64bit.)


Switched on BugcheckAbort and later found a core file in /tmp. See the 
gdb output below. Any idea?


Reading symbols from /opt/firebird/bin/.debug/firebird.debug...done.

warning: core file may not match specified executable file.
[New LWP ]
[New LWP 2092]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/opt/firebird/bin/firebird'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x7fc5f2eef880 in ?? ()


(gdb) thread apply all bt

Thread 2 (Thread 0x7fc5fbcba7c0 (LWP 2092)):
#0  0x7fc5fa46db9d in nanosleep () from 
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00453a01 in Thread::sleep 
(milliseconds=milliseconds@entry=100) at 
/usr/home/firebird/3.0.3/src/common/ThreadStart.cpp:218
#2  0x0042fabb in Worker::shutdown () at 
/usr/home/firebird/3.0.3/src/remote/server/server.cpp:6428
#3  0x004365ed in SRVR_multi_thread (main_port=0x7fc5fbc8d6c0, 
flags=flags@entry=2) at 
/usr/home/firebird/3.0.3/src/remote/server/server.cpp:1631
#4  0x00445fba in main (argc=, argv=) at 
/usr/home/firebird/3.0.3/src/remote/server/os/posix/inet_server.cpp:423

Thread 1 (Thread 0x7fc5f3a2c700 (LWP )):
#0  0x7fc5f2eef880 in ?? ()
#1  0x7fc5fa465f82 in __nptl_deallocate_tsd () from 
/lib/x86_64-linux-gnu/libpthread.so.0
#2  0x7fc5fa466197 in start_thread () from 
/lib/x86_64-linux-gnu/libpthread.so.0
#3  0x7fc5fa19303d in clone () from /lib/x86_64-linux-gnu/libc.so.6


Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



[firebird-support] How to detect the source of a "firebird terminated abnormally (-1)" error?

2018-05-31 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
Hi All,

I found some "firebird terminated abnormally (-1)" errors in 
firebird.log on my development machine.  How can I detect it's source? 
My tip is a self made UDF (no input parameter, one TIMESTAMP output and 
written with Free Pascal). Can I stress test the UDF/problem somehow? (I 
know the problem only from the log and use 3.0.3 SuperServer and Linux 
64bit.)

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] WITH RECURSIVE or not WITH RECURSIVE

2018-05-30 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2018. 05. 30. 16:51 keltezéssel, Mark Rotteveel m...@lawinegevaar.nl 
[firebird-support] írta:
> Recursive CTEs always make my head hurt, but if I understand the intent
> correctly, you should replace it with:
> 
> select ti.id, t.parent_id
> from table1 t
> inner join table1 root on t.parent_id = root.id and root.parent_id is null

I selected this solution and works as expected. (I will investigate why 
and how works this recursive CTE.) Thank you very much Mark!

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] WITH RECURSIVE or not WITH RECURSIVE

2018-05-30 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2018. 05. 30. 16:04 keltezéssel, Omacht András aoma...@mve.hu 
[firebird-support] írta:
> Hi Gábor!
> 
> Now I can only test on 2.5.8, and it works:


András,

I tried now with 2.5.8 and got same error as with 3.0.3. Your TABLE1 
contains all 12 rows?

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] WITH RECURSIVE or not WITH RECURSIVE

2018-05-30 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2018. 05. 29. 19:08 keltezéssel, Omacht András aoma...@mve.hu 
[firebird-support] írta:
> Hi Gabor!
> 
> You can do it with recursive cte:


First of all, thank you very much! But...

I got "multiple rows in singleton select multiple rows in singleton 
select" (yes, double) error message with my real data. It's easy to 
reproduce just execute the next script for additional test data.

INSERT INTO TABLE1 (ID, PARENT_ID) VALUES (7, NULL);
INSERT INTO TABLE1 (ID, PARENT_ID) VALUES (8, 7);
INSERT INTO TABLE1 (ID, PARENT_ID) VALUES (9, 8);
INSERT INTO TABLE1 (ID, PARENT_ID) VALUES (10, 7);
INSERT INTO TABLE1 (ID, PARENT_ID) VALUES (11, 10);
INSERT INTO TABLE1 (ID, PARENT_ID) VALUES (12, 7);

Gabor







++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Strange SIMILAR TO result

2018-05-07 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2018. 05. 07. 14:46 keltezéssel, Dimitry Sibiryakov s...@ibphoenix.com 
[firebird-support] írta:
> 07.05.2018 13:57, Gabor Boros mlngl...@bgss.hu [firebird-support] wrote:
>> So I see what you say. But result of
>>
>> SELECT CAST(''='' AS CHAR(5)) SIMILAR TO  '[A-Z]{2}[0-9A-Z]{2,13}' FROM
>> RDB$DATABASE;
>>
>> is
>>
>> ===
>> 
> 
> Perhaps, it must be CHAR(4) or VARCHAR. I'm not sure in type of implicit 
> cast result.


Ok. Thank you very much for your help!

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Strange SIMILAR TO result

2018-05-07 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2018. 05. 07. 14:31 keltezéssel, liviuslivius 
liviusliv...@poczta.onet.pl [firebird-support] írta:
> Hi,
> 
> It is false for me
> But i put '=' in single quote with double it does not work. I use 
> FB3.0.4.32954 dialect 3


Nothing double quote. ''='' is a boolean expression, empty string equal 
empty string.

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Strange SIMILAR TO result

2018-05-07 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2018. 05. 07. 12:26 keltezéssel, Dimitry Sibiryakov s...@ibphoenix.com 
[firebird-support] írta:
> 07.05.2018 12:19, Gabor Boros mlngl...@bgss.hu [firebird-support] wrote:
>> A simple example: SELECT ''='' SIMILAR TO '[A-Z]{2}[0-9A-Z]{2,13}' FROM
>> RDB$DATABASE
>>
>> Why is the result true?
> 
> Your expression is actually calculated as "CAST(''='' as CHAR(5)) SIMILAR 
> TO
> '[A-Z]{2}[0-9A-Z]{2,13}'".
> (''='') is true and string representation of true is 'TRUE ' that matches 
> your patters.


Result of

SELECT  '*' || CAST(''='' AS CHAR(5)) || '*', 
CHARACTER_LENGTH(CAST(''='' AS CHAR(5))) FROM RDB$DATABASE

is

CONCATENATION  CHAR_LENGTH
= 
*TRUE *  5

So I see what you say. But result of

SELECT CAST(''='' AS CHAR(5)) SIMILAR TO  '[A-Z]{2}[0-9A-Z]{2,13}' FROM 
RDB$DATABASE;

is

===


So put the two case into one query

SELECT ''='' SIMILAR TO  '[A-Z]{2}[0-9A-Z]{2,13}', CAST(''='' AS 
CHAR(5)) SIMILAR TO  '[A-Z]{2}[0-9A-Z]{2,13}' FROM RDB$DATABASE;

and the result is

=== ===
  

And result of

SELECT 'TRUE ' SIMILAR TO  '[A-Z]{2}[0-9A-Z]{2,13}' FROM RDB$DATABASE

is

===


Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



[firebird-support] Strange SIMILAR TO result

2018-05-07 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
Hi All,

I accidentally (copy/paste :-) ) make a wrong SELECT which give back 
strange (true) result for me.

A simple example: SELECT ''='' SIMILAR TO '[A-Z]{2}[0-9A-Z]{2,13}' FROM 
RDB$DATABASE

Why is the result true? I use 3.0.3.

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Write UDF for 3.0 - Linux 64bit vs Windows 32bit

2018-04-23 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2018. 04. 19. 16:15 keltezéssel, Dimitry Sibiryakov s...@ibphoenix.com 
[firebird-support] írta:
> 19.04.2018 15:34, Gabor Boros mlngl...@bgss.hu [firebird-support] wrote:
>> I found it! :-) Works on Linux too if "... MODULE_NAME
>> '/opt/firebird/UDF/MY_UDF';"
> 
> It means that in your firebird.conf you have "UDFAccess = Full" which is 
> not default
> and a very bad idea from security POV.

Thank you for the warning! I set to "Full" for testing purposes only. ;-)

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Write UDF for 3.0 - Linux 64bit vs Windows 32bit

2018-04-19 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2018. 04. 19. 13:23 keltezéssel, Dimitry Sibiryakov s...@ibphoenix.com 
[firebird-support] írta:
> 19.04.2018 13:16, Gabor Boros mlngl...@bgss.hu [firebird-support] wrote:
>> What I am doing wrong?
> 
> Your function does not match its definition: "RETURNS PARAMETER 1" is not 
> what you think.


Is

DECLARE EXTERNAL FUNCTION TEST_UDF RETURNS BIGINT BY VALUE ENTRY_POINT 
'TEST_UDF' MODULE_NAME 'MY_UDF';

the correct syntax?


> Use nm to check that TEST_UDF is really exported (remember about case 
> sensitivity) and
> library is really libMY_UDF.so (case sensitivity again).


I use the file without the lib prefix and result of "nm MY_UDF.so":

  w __cxa_finalize@@GLIBC_2.2.5
  U dladdr@@GLIBC_2.2.5
  U dlclose@@GLIBC_2.2.5
  U dlopen@@GLIBC_2.2.5
  U dlsym@@GLIBC_2.2.5
  U __errno_location@@GLIBC_2.2.5
  w __gmon_start__
  w _ITM_deregisterTMCloneTable
  w _ITM_registerTMCloneTable
  w _Jv_RegisterClasses
  U sched_yield@@GLIBC_2.2.5
9930 T TEST_UDF


Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



[firebird-support] Write UDF for 3.0 - Linux 64bit vs Windows 32bit

2018-04-19 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
Hi All,

I use 3.0.3 SS on Linux 64bit and need to know the server's UTC 
timestamp. First started with a simple example UDF which written with 
FreePascal 3.0.4. See below. After many trying without success I 
realized my example works like a charm with Win32. (Just compiled with 
"fpc MY_UDF.pas" command.) But I use Linux 64bit. What I am doing wrong?


library MY_UDF;

{$MODE DELPHI}

{$IFDEF UNIX}uses cthreads;{$ENDIF}

function TEST_UDF:Int64;
begin
   Result:=123
end;

exports
   TEST_UDF;

begin
   IsMultiThread:=True;
end.

DECLARE EXTERNAL FUNCTION TEST_UDF BIGINT RETURNS PARAMETER 1 
ENTRY_POINT 'TEST_UDF' MODULE_NAME 'MY_UDF';

SELECT TEST_UDF() FROM RDB$DATABASE


With Win32 I see the correct 123 result but with Linux 64bit the next 
error appears:

Invalid token.
invalid request BLR at offset 36.
function TEST_UDF is not defined.
module name or entrypoint could not be found.

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Problem with CONTAINING and COLLATE - UTF8

2017-12-20 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2017. 12. 19. 21:13 keltezéssel, setysvar setys...@gmail.com 
[firebird-support] írta:
> Why would you want collate AFTER containing? I must admit I haven't
> tried your queries in Fb 3.0 (I'm still on 2.5), but I'd say the
> sensible way to specify what you want, would be
> 
> SELECT * FROM TABLE1 WHERE NAME COLLATE UNICODE_CI_AI CONTAINING 'o';

Thank you very much Set! With the correct syntax works as expected.

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



[firebird-support] Problem with CONTAINING and COLLATE - UTF8

2017-12-19 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
Hi All,

After the original "Problem with CONTAINING and COLLATE" thread I 
switched to UTF8 but not happy with it. The optional COLLATE after 
CONTAINING have no effect, the database default COLLATION used. See the 
below examples. Tried with 3.0.3.32854 snapshot and Linux 64bit (Ubuntu 
14.04.1).


1.Database defaults: UTF8+UNICODE_CI
CREATE DATABASE 'CHARSET_TEST' PAGE_SIZE 4096 DEFAULT CHARACTER SET UTF8 
COLLATION UNICODE_CI;

isql CHARSET_TEST -ch UTF8 -u SYSDBA

CREATE TABLE TABLE1 (NAME VARCHAR(60));

INSERT INTO TABLE1 (NAME) VALUES ('od');
INSERT INTO TABLE1 (NAME) VALUES ('őb');
INSERT INTO TABLE1 (NAME) VALUES ('Őc');
INSERT INTO TABLE1 (NAME) VALUES ('Oa');

SQL> SELECT * FROM TABLE1 WHERE NAME CONTAINING 'o';

NAME

od
Oa


SQL> SELECT * FROM TABLE1 WHERE NAME CONTAINING 'ő';

NAME

őb
Őc


SQL> SELECT * FROM TABLE1 WHERE NAME CONTAINING 'o' COLLATE UNICODE_CI_AI;

NAME 
 
 

 
 
 

od 
 
 

Oa


SQL> SELECT * FROM TABLE1 WHERE NAME CONTAINING 'ő' COLLATE 
UNICODE_CI_AI; 
 

 
 
 

NAME 
 
 

 
 
 

őb 
 
 

Őc





2.Database defaults: UTF8+UNICODE_CI_AI
CREATE DATABASE 'CHARSET_TEST' PAGE_SIZE 4096 DEFAULT CHARACTER SET UTF8 
COLLATION UNICODE_CI_AI;

isql CHARSET_TEST -ch UTF8 -u SYSDBA

CREATE TABLE TABLE1 (NAME VARCHAR(60));

INSERT INTO TABLE1 (NAME) VALUES ('od');
INSERT INTO TABLE1 (NAME) VALUES ('őb');
INSERT INTO TABLE1 (NAME) VALUES ('Őc');
INSERT INTO TABLE1 (NAME) VALUES ('Oa');


SQL> SELECT * FROM TABLE1 WHERE NAME CONTAINING 'o';

NAME

od
őb
Őc
Oa

SQL> SELECT * FROM TABLE1 WHERE NAME CONTAINING 'ő';

NAME

od
őb
Őc
Oa

SQL> SELECT * FROM TABLE1 WHERE NAME CONTAINING 'o' COLLATE UNICODE_CI;

NAME

od
őb
Őc
Oa

SQL> SELECT * FROM TABLE1 WHERE NAME CONTAINING 'ő' COLLATE UNICODE_CI;

NAME

od
őb
Őc
Oa


Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



[firebird-support] How to create properly a custom accent sensitive collation order?

2017-12-08 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
Hi All,

I have a database with default UTF8 character set and UNICODE_CI collation:

CREATE DATABASE 'MYDB' PAGE_SIZE 4096 DEFAULT CHARACTER SET UTF8 
COLLATION UNICODE_CI;

Execute the next script:

CREATE COLLATION UNICODE_CI_AS_HU FOR UTF8 FROM UNICODE_CI ACCENT 
SENSITIVE 'LOCALE=hu_HU';

ALTER CHARACTER SET UTF8 SET DEFAULT COLLATION UNICODE_CI_AS_HU;

CREATE TABLE TABLE_1 (NAME VARCHAR(60));

INSERT INTO TABLE_1 VALUES ('Vál');
INSERT INTO TABLE_1 VALUES ('Val');
INSERT INTO TABLE_1 VALUES ('Vak');
INSERT INTO TABLE_1 VALUES ('Vac');
INSERT INTO TABLE_1 VALUES ('Vab');
INSERT INTO TABLE_1 VALUES ('Váb');

After that I want to get the ordered result:

SELECT NAME FROM TABLE_1 ORDER BY NAME

or

SELECT NAME FROM TABLE_1 ORDER BY NAME COLLATE UNICODE_CI_AS_HU

give the next result:

Vab
Váb
Vac
Vak
Val
Vál

but the expected is:

Vab
Vac
Vak
Val
Váb
Vál

What I am doing wrong?

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



[firebird-support] Problem with CONTAINING and COLLATE

2017-12-07 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
Hi All,

I have a database with DEFAULT CHARACTER SET WIN1250 COLLATION PXW_HUN 
and a table in it:

CREATE TABLE TABLE_1 (NEV VARCHAR(60) CHARACTER SET WIN1250 COLLATE 
PXW_HUN);

Connect with ISQL:
isql 1.2.3.4:MYDB -charset UTF8 -user myadmin -password mypasswd

Execute this:
SELECT * FROM TABLE_1 WHERE NAME CONTAINING 'x' COLLATE PXW_HUNDC;

Got this error:
Statement failed, SQLSTATE = 22021
Dynamic SQL Error
-SQL error code = -204
-COLLATION PXW_HUNDC for CHARACTER SET UTF8 is not defined

If connect with
isql 1.2.3.4:MYDB -user myadmin -password mypasswd

got this:
Statement failed, SQLSTATE = 22021
Dynamic SQL Error
-SQL error code = -204
-COLLATION PXW_HUNDC for CHARACTER SET NONE is not defined

Why does the connection charset count?

I tried with 3.0(.3.32850 snapshot).

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



[firebird-support] Triggers - One big or more smaller?

2017-06-28 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
Hi All,

The table have a BEFORE UPDATE trigger. Now I need a check before the 
existing trigger code and raise an exception if needed. I can write the 
check into the existing trigger before the existing code. But can create 
a new trigger with a lower position than the existing one. Is there any 
practical benefit to breaking up triggers?

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] FB3 - Limbo and consistency check

2017-04-28 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
Hi All,

> record from transaction x is stuck in limbo

Source of this is an IBX transaction handling problem which already 
fixed in SVN:

https://svn.mwasoftware.co.uk/viewvc/public?view=revision=63

https://svn.mwasoftware.co.uk/viewvc/public/ibx/trunk/fbintf/client/3.0/FB30Transaction.pas?r1=63=62=63

> internal Firebird consistency check (limbo impossible (184), file:
> vio.cpp line: 2379)

This problem reported to tracker and already marked as fixed:

http://tracker.firebirdsql.org/browse/CORE-5528

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Re: FB3 - Limbo and consistency check

2017-04-27 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2017. 04. 26. 16:44 keltezéssel, hv...@users.sourceforge.net 
[firebird-support] írta:
>Hi Gabor
> 
>Do you have reproducible example ? Could you send it to me (or 
> regiser at tracker), please ?

I send a test case to your address in this minutes. Hope that helps.

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Re: FB3 - Limbo and consistency check

2017-04-26 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
2017. 04. 26. 16:44 keltezéssel, hv...@users.sourceforge.net 
[firebird-support] írta:
>Hi Gabor
> 
>Do you have reproducible example ? Could you send it to me (or 
> regiser at tracker), please ?

I have a test data generator GUI(one form one button) application and a 
database. I can send it privately.

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



[firebird-support] FB3 - Limbo and consistency check

2017-04-26 Thread Gabor Boros mlngl...@bgss.hu [firebird-support]
Hi All,

I created a test data generator for my application.
Start transaction, execute SP1, execute SP2 in random 1-10 times, 
commit. Start transaction, execute SP3, commit. SP1 and SP2 just insert 
data to the database but SP3 is more complex thing. The application 
works (do the above things in a loop) as expected. But if close it 
improperly, at the next start sometimes work as expected, sometimes got 
one from the next two error messages:

record from transaction x is stuck in limbo

internal Firebird consistency check (limbo impossible (184), file: 
vio.cpp line: 2379)

I don't understand why. Use Firebird from 0.94 and never meet whit this 
limbo things before. My application started in one instance only, use 
one database and only one transaction running at same time.

I use the latest 3.x snapshot(3.0.3.32716), SuperServer and Linux 64bit.

Any idea?

Gabor






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/