That doesn't look right: some statement handle is being destroyed after prepare returns and before execute is called. Could you show us the actual code you ran to get that trace?

For comparison, when I do this:

my $dbh = ...; $req = "INSERT INTO log (`timestamp`,`alert`,`id_daemon`,`id_event_type`) VALUES (NOW(),'y','31','3')"; DBI->trace(4); $query = $dbh->prepare($req); $query->execute(); DBI->trace(0);
I get this trace:
DBI 1.53-ithread default trace level set to 0x0/4 (pid 716) -> prepare for DBD::mysql::db (DBI::db=HASH(0x7804d0)~0x8fc970 'IN +SERT INTO log (`timestamp`,`alert`,`id_daemon`,`id_event_type`) VALUES (NOW(),'y','31','3')') thr#603010 New DBI::st (for DBD::mysql::st, parent=DBI::db=HASH(0x8fc970), id +=) dbih_setup_handle(DBI::st=HASH(0x8fcbf0)=>DBI::st=HASH(0x60a480), +DBD::mysql::st, 8fcc00, Null!) dbih_make_com(DBI::db=HASH(0x8fc970), 8fd720, DBD::mysql::st, 440, + 0) thr#603010 dbd_st_prepare calling count_params (counting params emulation) <- prepare= DBI::st=HASH(0x8fcbf0) at - line 7 -> execute for DBD::mysql::st (DBI::st=HASH(0x8fcbf0)~0x60a480) th +r#603010 -> dbd_st_execute for 008fcd00 ---> parse_params with statement INSERT INTO log (`timestamp`,`alert`,`id_daemon`,`id_event_type`) VALUES (NOW(),'y','31','3') num params 0 mysql_st_internal_execute <- dbd_st_execute returning imp_sth->row_num 1 <- execute= 1 at - line 8

In reply to Re^2: DBI with MySQL InnoDB tables troubles by ysth
in thread DBI with MySQL InnoDB tables troubles by Ouato

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.