Subject Firebird Debug Output
Author Si Carter
Hi,

I have developed a little utility which intercepts every sql statement sent
from a client app, along with callstack and timings. I have done some
testing but would like to widen this and to ascertain usefulness. Currently
two output files are created, a simple call stack with timings, which looks
like:

24/11/2005 11:41:28 - Function isc_attach_database($0012EC90, 20,
'127.0.0.1/3050:dnfdb', $00BC7098, 31, 'sysdba
masterkey0ISO8859_1º««««««««');
24/11/2005 11:41:28 - isc_attach_database Complete; TimeTaken: 187ms
24/11/2005 11:41:28 - Function isc_database_info($0012EC90, $00BC7098, 3, '
>|˜p¼', 100,
'ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ««««««««îþîþîþîþîþîþ');
24/11/2005 11:41:28 - isc_database_info Complete; TimeTaken: 0ms
24/11/2005 11:41:28 - Function isc_vax_integer('', 2);
24/11/2005 11:41:28 - isc_vax_integer Complete; TimeTaken: 0ms


And a SQL output file:

select rdb$character_set_name from rdb$database

---------------------------------------------------------------

select rr.rdb$relation_name from rdb$relations rr where (rr.RDB$SYSTEM_FLAG
= 0 or rr.RDB$SYSTEM_FLAG is null) and rr.RDB$VIEW_SOURCE is null order by
1

---------------------------------------------------------------

select rr.rdb$relation_name from rdb$relations rr where (rr.RDB$SYSTEM_FLAG
= 0 or rr.RDB$SYSTEM_FLAG is null) and rr.RDB$VIEW_SOURCE is not null order
by 1

---------------------------------------------------------------

It’s a windows only solution, sorry, and has only been tested using FB
1.5.2. If you can help testing in anyway let me know by emailing me
(simon.carter@...). This solution require's absolutely no
recompilation of existing code and can be added/removed to any FB client in
< 1 minute.

Rgds

Si Carter
http://www.fbtalk.net/ - Web Based Firebird Forum
http://www.tectsoft.net/ - Homepage