Dear Monks, I connect to the database with the line:

$dbh = DBI->connect("dbi:Cassandra:host=localhost;keyspace=somekeyspace", undef, undef, { RaiseError => 1 });

When the database is down, it gets an error. However, just after the database got bounced, and this program restarted, it got past this line but printed an error message for this line:

my $last_connect_sth = $dbh->prepare("select somefield from sometable where someotherfield=?");

DBI db handle 0x1c506e0 cleared whilst still active at someprogram line 59.
    dbih_clearcom (dbh 0x1c506e0, com 0x1cbd8f0, imp DBD::Cassandra::db):
       FLAGS 0x180195: COMSET Active Warn RaiseError PrintError PrintWarn
       PARENT DBI::dr=HASH(0x1c4ff18)
       KIDS 0 (0 Active)

I'd expect prepare to die(), but the program kept running.

Are there DBI methods that still need error-checking after connecting with RaiseError set?

Thanks,

bigdaddy


In reply to DBI RaiseError not working by bigdaddy

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.