On Sun Oct 25 22:45:24 2015, d.j.kasak.dk@gmail.com wrote:
Show quoted text> I have a tricky issue. When some SQL returns an error, I get a
> segfault in
> my application. I don't have a definitive list of error types that can
> trigger it, but invalid 'create table' SQL *with* new-lines in the SQL
> is
> an easy way to replicate the error. For example, the SQL *without*
> new-lines:
The odbc trace line
[ODBC][5562][1445826945.819834][/var/tmp/portage/dev-db/unixODBC-2.3.2-r2/work/unixODBC-2.3.2/DriverManager/SQLExecDirect.c][503]
Exit:[SQL_ERROR]
suggests SQLExecDirect has completed suggesting it is segfaulting in DBD::ODBC or Perl.
You didn't mention what version of Perl, and DBI and DBD::ODBC you are using. If you are using old versions it might be worth you upgrading. However, before you do that you should try this:
If you've got recentish versions of DBI and DBD::ODBC:
export DBI_TRACE=DBD=x.log
now run your perl which seg faults.
what is in x.log. If nothing much in the log your DBI/DBD::ODBC are probably too old so do this:
export DBI_TRACE=15=x.log
now run your perl which seg faults
what is in x.log.
Do:
which perl (it will output something like /usr/bin/perl)
whatever this outputs now do
gdb where_your_perl_is
when you get a prompt from gdb type
run myperlscript.pl
when it segfaults type
bt
and show me the output
Martin
--
Martin J. Evans
Wetherby, UK