Front page | perl.dbi.users |
Postings from February 2001
bug in DBD::ODBC
From:
Mark D. Anderson
Date:
February 2, 2001 10:35
Subject:
bug in DBD::ODBC
Message ID:
05a801c08d46$a6487f10$2c00a8c0@mdaxke
dbdimp.c has this line:
if (rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO)
fprintf(DBILOGFP, "SQLDriverConnect failed: %s %s\n", sqlstate, ErrorMsgLen);
this crashes immediately when exercised, because it is printing an int as a string
(isn't there a gcc warning level that checks for such things?)
i found this by doing:
DBI->trace(4);
my $dbh = DBI->connect('dbi:ODBC:ib6',undef,undef,{RaiseError=>1});
DBI->trace(0);
and the reason i was doing *that* is because with debug on, dbdimp.c appears
to be properly calling SQLError, which it otherwise doesn't do, leaving the
first connect's error uncleared. I don't understand it all, but nick gorham does;
see the thread "Re: wrong error code for missing table condition" on news://news.easysoft.com/easysoft.public.ib6-odbc
-mda