I have a big $application that uses Oracle on Windows 2000, and I speak to the database with ActiveState Perl 5.6, since 5.6 is the last version for which Oracle allows AS to package DBD::Oracle. This reason, as much as anything else, precludes me from upgrading to 5.8. I had to upgrade DBI a while ago, because I was running into problems with DBD::Proxy that have been resolved in more recent versions. Everything is now working correctly, except that I am getting the following non-error warnings:

DBD::Oracle::db selectall_arrayref warning: (err=0, errstr=undef, state=undef) at foo.pl line 666.

It's a non-error: it's basically saying "hey! everything's ok! hope you're happy about that!" and it's making my life a misery because my log files are filling up with ten of thousands of these statements. I have tried setting all sorts of incantations in the creation of database handles, such as setting RaiseError and PrintError to zero. I had high hope for the HandleError and HandleSetErr attributes. Poking about in the DBI.dll, it looks like the above err=... errstr=... state... string is belongs to the default HandleSetErr handler. I created a connection thusly:

$db = DBI->connect( $base, $user, $pw, { AutoCommit => 0, PrintError => 0, HandleError => sub { print "error handler <@_>\n"; return 0 } +, HandleSetErr => sub { print "seterr handler <@_>\n"; return 0 +}, }) or croak "Could not connect to database $base: ${\DBI->errstr}\ +n";

... but it appears that my handlers here are not called by anything, and I still get the errstr=undef spew. Is there something wrong with my handlers, or do I need to do something differently, or do something else? Thanks for any clues I can use.

• another intruder with the mooring in the heart of the Perl


In reply to Silencing DBI "(err=0, errstr=undef, state=undef)" errors by grinder

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.