Subject | Re: [firebird-support] broken - pipe |
---|---|
Author | Milan Babuskov |
Post date | 2012-01-26T14:25:52Z |
pluto.pippo66 wrote:
used 2.5 much, but I know of some in 2.1 that did this.
You should log your SQL statmenets to capture the one that causes this.
If you use IBPP it's easy to add application-level logging to IBPP's
IStatement class because all SQL is routed through it. For example,
adding this to start of StatementImpl::Prepare() function in
statement.cpp does the job for me most of the time:
--------------------------- statement.cpp ----------
void StatementImpl::Prepare(const std::string& sql)
{
printf("%s\n", sql.c_str());
....
----------------------------------------------------
Since it uses standard C++ you can use simple C++ streams to capture
stuff like parameters as well (take a look at row.cpp file).
HTH
--
Milan Babuskov
==================================
The easiest way to import XML, CSV
and textual files into Firebird:
http://www.guacosoft.com/xmlwizard
==================================
> I wrote an application in C + + slackware distro of Linux system,Which C++ library, IBPP?
> valid if the select is about 170,000, shame about half goes to
> error.
> Unable to complete network request to host "localhost".Most probably a bug in Firebird that made the engine crash. I haven't
> -Error writing data to the connection.
> -Broken pipe
used 2.5 much, but I know of some in 2.1 that did this.
You should log your SQL statmenets to capture the one that causes this.
If you use IBPP it's easy to add application-level logging to IBPP's
IStatement class because all SQL is routed through it. For example,
adding this to start of StatementImpl::Prepare() function in
statement.cpp does the job for me most of the time:
--------------------------- statement.cpp ----------
void StatementImpl::Prepare(const std::string& sql)
{
printf("%s\n", sql.c_str());
....
----------------------------------------------------
Since it uses standard C++ you can use simple C++ streams to capture
stuff like parameters as well (take a look at row.cpp file).
HTH
--
Milan Babuskov
==================================
The easiest way to import XML, CSV
and textual files into Firebird:
http://www.guacosoft.com/xmlwizard
==================================