From: Fabiano B. <fa...@pe...> - 2006-04-06 20:09:45
|
Usually, i get a server crash when i run the SP below. It counts the records of all non-systems tables. Sometimes it works, but it crashes very often. Tested with FB 1.5.3 and FB 2.0 RC 1. select * from sp_record_count(null); Here is its code: set term !! ; create or alter procedure sp_record_count ( p_table_name varchar(31) ) returns ( table_name varchar(31), record_count integer ) as begin for select a.rdb$relation_name from rdb$relations a where ( :p_table_name is null or upper(a.rdb$relation_name) = upper(:p_table_name) ) and ( a.rdb$relation_name not like 'RDB$%' ) and ( a.rdb$view_blr is null ) into :table_name do begin execute statement 'select count(*) from "' || :table_name || '"' into :record_count; suspend; end end !! set term ; !! |
From: Fabiano B. <fa...@pe...> - 2006-04-06 20:16:21
|
Ops, maybe it's a IBExpert issue. It seems it runs OK in isql. Maybe someone want to give it a try. Fabiano Bonin escreveu: > Usually, i get a server crash when i run the SP below. > It counts the records of all non-systems tables. > Sometimes it works, but it crashes very often. > Tested with FB 1.5.3 and FB 2.0 RC 1. > > select * from sp_record_count(null); > > > Here is its code: > > set term !! ; > > create or alter procedure sp_record_count ( > p_table_name varchar(31) ) > returns ( > table_name varchar(31), > record_count integer ) > as > begin > for select > a.rdb$relation_name > from > rdb$relations a > where > ( :p_table_name is null or upper(a.rdb$relation_name) = > upper(:p_table_name) ) and > ( a.rdb$relation_name not like 'RDB$%' ) and > ( a.rdb$view_blr is null ) > into > :table_name > do > begin > execute statement 'select count(*) from "' || :table_name || '"' > into :record_count; > suspend; > end > end !! > > set term ; !! > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > Firebird-Devel mailing list, web interface at > https://lists.sourceforge.net/lists/listinfo/firebird-devel > |
From: Alexandre B. S. <ib...@th...> - 2006-04-06 20:33:35
|
Fabiano Bonin wrote: > Ops, maybe it's a IBExpert issue. It seems it runs OK in isql. > Maybe someone want to give it a try. > I have a SP like this and it execute without a problem. -- Alexandre Benson Smith Development THOR Software e Comercial Ltda Santo Andre - Sao Paulo - Brazil www.thorsoftware.com.br |
From: Milan B. <mi...@pa...> - 2006-04-06 20:38:46
|
Fabiano Bonin wrote: > Ops, maybe it's a IBExpert issue. It seems it runs OK in isql. > Maybe someone want to give it a try. Are you using the same connection string in both tools? I just tried with FlameRobin (against Classic Server). Firebird didn't crash, but I got this: Message: isc_dsql_fetch failed. SQL Message : -501 The cursor identified in a FETCH or CLOSE statement is not open. Engine Code : 335544327 Engine Message : invalid request handle -- Milan Babuskov http://swoes.blogspot.com/ http://www.flamerobin.org |
From: Fabiano B. <fa...@pe...> - 2006-04-07 11:53:29
|
Milan Babuskov escreveu: > Fabiano Bonin wrote: >> Ops, maybe it's a IBExpert issue. It seems it runs OK in isql. >> Maybe someone want to give it a try. > > Are you using the same connection string in both tools? > > > I just tried with FlameRobin (against Classic Server). Firebird didn't > crash, but I got this: > > Message: isc_dsql_fetch failed. > > SQL Message : -501 > The cursor identified in a FETCH or CLOSE statement is not open. > > Engine Code : 335544327 > Engine Message : > invalid request handle > > You got a point here! If i connect with isql using the same string, the error appears: [root@servidor clientes]# isql 127.0.0.1:/share/clientes/trevilub.fdb -user sysdba -pass ???????? Database: 127.0.0.1:/share/clientes/trevilub.fdb, User: sysdba SQL> select * from sp_record_count(null); TABLE_NAME RECORD_COUNT =============================== ============ Statement failed, SQLCODE = -902 Error reading data from the connection. |
From: Alex P. <pe...@in...> - 2006-04-07 12:09:00
|
Fabiano Bonin wrote: > Milan Babuskov escreveu: > >> Fabiano Bonin wrote: >> >>> Ops, maybe it's a IBExpert issue. It seems it runs OK in isql. >>> Maybe someone want to give it a try. >> >> >> Are you using the same connection string in both tools? >> >> >> I just tried with FlameRobin (against Classic Server). Firebird didn't >> crash, but I got this: >> >> Message: isc_dsql_fetch failed. >> >> SQL Message : -501 >> The cursor identified in a FETCH or CLOSE statement is not open. >> >> Engine Code : 335544327 >> Engine Message : >> invalid request handle >> >> > > You got a point here! > > If i connect with isql using the same string, the error appears: > > [root@servidor clientes]# isql 127.0.0.1:/share/clientes/trevilub.fdb > -user sysdba -pass ???????? > Database: 127.0.0.1:/share/clientes/trevilub.fdb, User: sysdba > SQL> select * from sp_record_count(null); > > TABLE_NAME RECORD_COUNT > =============================== ============ > Statement failed, SQLCODE = -902 > > Error reading data from the connection. > I've repeated this 1000 times on linux with yesterday's HEAD : echo 'select * from sp_record_count(null);' | ./isql -user sysdba -pas masterke 127.0.0.1:/data/test.fdb No problems were found. Alex. |
From: Fabiano B. <fa...@pe...> - 2006-04-07 12:21:31
|
Alex Peshkov escreveu: > Fabiano Bonin wrote: >> Milan Babuskov escreveu: >> >>> Fabiano Bonin wrote: >>> >>>> Ops, maybe it's a IBExpert issue. It seems it runs OK in isql. >>>> Maybe someone want to give it a try. >>> >>> >>> Are you using the same connection string in both tools? >>> >>> >>> I just tried with FlameRobin (against Classic Server). Firebird >>> didn't crash, but I got this: >>> >>> Message: isc_dsql_fetch failed. >>> >>> SQL Message : -501 >>> The cursor identified in a FETCH or CLOSE statement is not open. >>> >>> Engine Code : 335544327 >>> Engine Message : >>> invalid request handle >>> >>> >> >> You got a point here! >> >> If i connect with isql using the same string, the error appears: >> >> [root@servidor clientes]# isql 127.0.0.1:/share/clientes/trevilub.fdb >> -user sysdba -pass ???????? >> Database: 127.0.0.1:/share/clientes/trevilub.fdb, User: sysdba >> SQL> select * from sp_record_count(null); >> >> TABLE_NAME RECORD_COUNT >> =============================== ============ >> Statement failed, SQLCODE = -902 >> >> Error reading data from the connection. >> > > I've repeated this 1000 times on linux with yesterday's HEAD : > > echo 'select * from sp_record_count(null);' | ./isql -user sysdba -pas > masterke 127.0.0.1:/data/test.fdb > > No problems were found. > > Alex. Is your database big enough? Maybe it's something related with my metadata, but i can reproduce this behaviour with all my customers databases. I have a 10MB database (zipped) where this error can be reproduced, if you need. |
From: Alex P. <pe...@in...> - 2006-04-07 12:26:06
|
Fabiano Bonin wrote: > > Is your database big enough? > No, it was just 2 tables. And, damned, I've tried with SS. > Maybe it's something related with my metadata, but i can reproduce this > behaviour with all my customers databases. > > I have a 10MB database (zipped) where this error can be reproduced, if > you need. > Now I'm trying with real database with more than 1000 tables - CS 1.5.3. |
From: Alex P. <pe...@in...> - 2006-04-07 19:01:16
|
Alex Peshkov wrote: > Fabiano Bonin wrote: > >> >> Is your database big enough? >> > > No, it was just 2 tables. And, damned, I've tried with SS. > >> Maybe it's something related with my metadata, but i can reproduce >> this behaviour with all my customers databases. >> >> I have a 10MB database (zipped) where this error can be reproduced, if >> you need. >> > > Now I'm trying with real database with more than 1000 tables - CS 1.5.3. > Confirmed for 1.5.3 CS. Will check 2.0 this weekend. |
From: russell <ru...@be...> - 2006-04-06 20:48:07
|
select * from sp_record_count(null); ran without error using FB 2.0.0.11675 and IB/FB Development Studio (www.sqlly.com) Russell Belding -----Original Message----- From: fir...@li... [mailto:fir...@li...] On Behalf Of Fabiano Bonin Sent: Friday, 7 April 2006 8:16 a.m. To: fir...@li... Subject: Re: [Firebird-devel] SP crashing server Ops, maybe it's a IBExpert issue. It seems it runs OK in isql. Maybe someone want to give it a try. Fabiano Bonin escreveu: > Usually, i get a server crash when i run the SP below. > It counts the records of all non-systems tables. > Sometimes it works, but it crashes very often. > Tested with FB 1.5.3 and FB 2.0 RC 1. > > select * from sp_record_count(null); > > > Here is its code: > > set term !! ; > > create or alter procedure sp_record_count ( > p_table_name varchar(31) ) > returns ( > table_name varchar(31), > record_count integer ) > as > begin > for select > a.rdb$relation_name > from > rdb$relations a > where > ( :p_table_name is null or upper(a.rdb$relation_name) = > upper(:p_table_name) ) and > ( a.rdb$relation_name not like 'RDB$%' ) and > ( a.rdb$view_blr is null ) > into > :table_name > do > begin > execute statement 'select count(*) from "' || :table_name || '"' > into :record_count; > suspend; > end > end !! > > set term ; !! > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > Firebird-Devel mailing list, web interface at > https://lists.sourceforge.net/lists/listinfo/firebird-devel > ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.1.384 / Virus Database: 268.3.5/302 - Release Date: 5/04/2006 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.1.384 / Virus Database: 268.3.5/302 - Release Date: 5/04/2006 |
From: Alex P. <pe...@in...> - 2006-04-07 09:06:51
|
Fabiano Bonin wrote: > Ops, maybe it's a IBExpert issue. It seems it runs OK in isql. > Maybe someone want to give it a try. > Even if it craches server only when ran from IbExpert, it's worth fixing - server should not die in any case. Can you adjust OS, you've used ? Alex. |
From: Holger K. <hk...@ya...> - 2006-04-07 07:15:40
|
Fabiano Bonin schrieb: > Ops, maybe it's a IBExpert issue. It seems it runs OK in isql. > Maybe someone want to give it a try. creted the procedure several times with ibexpert, executed it several times with ibexpert, and i had no problem, so i don´t think that this is an ibexpert issue. -- Best Regards Holger Klemt Firebird Database Workshop for Professionals 22nd-26th May 2006, Palma de Mallorca, Spain Registration and Details www.h-k.de/dbws/dbws.pdf The most Expert for InterBase and Firebird - www.ibexpert.com HK Software - 26135 Oldenburg - Germany - in...@h-... - www.h-k.de |
From: Alex P. <pe...@in...> - 2006-04-13 08:40:52
|
Holger Klemt wrote: > Fabiano Bonin schrieb: >=20 >> Ops, maybe it's a IBExpert issue. It seems it runs OK in isql. >> Maybe someone want to give it a try. >=20 >=20 > creted the procedure several times with ibexpert, executed it several=20 > times with ibexpert, and i had no problem, so i don=B4t think that this= is=20 > an ibexpert issue. >=20 Holger, it was internal firebird engine issue and nothing wrong with=20 IbExpert. I've fixed it a few days ago. |
From: Fabiano B. <fa...@pe...> - 2006-04-07 12:16:01
|
Fabiano Bonin escreveu: > Usually, i get a server crash when i run the SP below. > It counts the records of all non-systems tables. > Sometimes it works, but it crashes very often. > Tested with FB 1.5.3 and FB 2.0 RC 1. > > select * from sp_record_count(null); > > > Here is its code: > > set term !! ; > > create or alter procedure sp_record_count ( > p_table_name varchar(31) ) > returns ( > table_name varchar(31), > record_count integer ) > as > begin > for select > a.rdb$relation_name > from > rdb$relations a > where > ( :p_table_name is null or upper(a.rdb$relation_name) = > upper(:p_table_name) ) and > ( a.rdb$relation_name not like 'RDB$%' ) and > ( a.rdb$view_blr is null ) > into > :table_name > do > begin > execute statement 'select count(*) from "' || :table_name || '"' > into :record_count; > suspend; > end > end !! > > set term ; !! > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > Firebird-Devel mailing list, web interface at > https://lists.sourceforge.net/lists/listinfo/firebird-devel > I have two computers: One is using Fedora Core 3 and Firebird 1.5.3 Classic. Another is using Fedora Core 4 and Firebird 2.0 RC1 Classic. If i connect with isql using the ip address (isql <ip>:<database>), the error happens in FB 1.5.3 but doesn't happens in FB 2.0. If i connect with isql direct to the database (isql <database>), the error doesn't happens on both. If i connect using IBExpert, the error happens on both. PS: I noted a difference in the behaviour of this procedure in FB 2.0 when i connect using the IP address and when i connect directly. When i use the IP, after i type 'select * from sp_record_count(null)', i have to wait the server to process all records, and after some time, it returns all records in one time. If i connect directly, just after i execute the query, it starts to show the records, one at a time, while it's is counting the records. |
From: Milan B. <mi...@pa...> - 2006-04-07 18:50:03
|
Fabiano Bonin wrote: > I have two computers: > > One is using Fedora Core 3 and Firebird 1.5.3 Classic. > Another is using Fedora Core 4 and Firebird 2.0 RC1 Classic. > > If i connect with isql using the ip address (isql <ip>:<database>), the > error happens in FB 1.5.3 but doesn't happens in FB 2.0. > > If i connect with isql direct to the database (isql <database>), the > error doesn't happens on both. > > If i connect using IBExpert, the error happens on both. Since you're using IBExpert, I assume you have a third (Windows) box. Which client library is installed on it? Same question for isql. Do you use isql on the box where server is running? -- Milan Babuskov http://swoes.blogspot.com/ http://www.flamerobin.org |
From: Fabiano B. <fa...@pe...> - 2006-04-07 19:53:30
|
Milan Babuskov escreveu: > Fabiano Bonin wrote: >> I have two computers: >> >> One is using Fedora Core 3 and Firebird 1.5.3 Classic. >> Another is using Fedora Core 4 and Firebird 2.0 RC1 Classic. >> >> If i connect with isql using the ip address (isql <ip>:<database>), >> the error happens in FB 1.5.3 but doesn't happens in FB 2.0. >> >> If i connect with isql direct to the database (isql <database>), the >> error doesn't happens on both. >> >> If i connect using IBExpert, the error happens on both. > > Since you're using IBExpert, I assume you have a third (Windows) box. > Which client library is installed on it? Yes. My windows box have FB 1.5.3 CS installed. > > Same question for isql. Do you use isql on the box where server is running? > Yes. I just tested isql on the same box the server was running. |
From: Alex P. <pe...@in...> - 2006-04-09 12:52:32
|
Fabiano Bonin wrote: > > I have two computers: > > One is using Fedora Core 3 and Firebird 1.5.3 Classic. > Another is using Fedora Core 4 and Firebird 2.0 RC1 Classic. > > If i connect with isql using the ip address (isql <ip>:<database>), the > error happens in FB 1.5.3 but doesn't happens in FB 2.0. > > If i connect with isql direct to the database (isql <database>), the > error doesn't happens on both. > > If i connect using IBExpert, the error happens on both. > > > PS: I noted a difference in the behaviour of this procedure in FB 2.0 > when i connect using the IP address and when i connect directly. When i > use the IP, after i type 'select * from sp_record_count(null)', i have > to wait the server to process all records, and after some time, it > returns all records in one time. If i connect directly, just after i > execute the query, it starts to show the records, one at a time, while > it's is counting the records. > I've fixed this bug in CVS. In fact it was just random process, that different kins of attachments on different versions of FB behave differently. We had a negative result of hash function, used as an index in an array. What's really strange is that AV happened rarely. Appears in many cases that lead to damaged memory in DSQL without AV. Alex. |