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 |