http://qs1969.pair.com?node_id=639938

jerrygarciuh has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

I have a CGI::Application / Class::DBI app that is about 4 years old. It just moved hosts and after a few tweaks to the Template-Toolkit filters it came back up and seemed fine. However when user actions should cause a new record to be written by CDBI->create() I am seeing the following error in the logs:

DBD driver has not implemented the AutoCommit attribute at /usr/lib/perl5/site_perl/5.8.8/i686-linux/DBI.pm line 690.

Version info, all Perl modules confirmed to be latest CPAN versions from command line:

mysql Ver 14.12 Distrib 5.0.45, for pc-linux-gnu (i686) using readline 5.0

DBI v. 1.59
Class::DBI v. 3.0.16
DBD::mysql v. 4.005
CGI::Application v. 4.06


Anyone have any thoughts? Seen this before? Halp?

TIA
jg
_____________________________________________________
"Transport of the mails, transport of the human voice, transport of flickering pictures - in this century, as in others, our highest accomplishments still have the single aim of bringing people together."   Wind, Sand, and Stars
  Antoine-Marie-Roger de Saint-Exupery

Replies are listed 'Best First'.
Re: DBD driver has not implemented the AutoCommit attribute
by perrin (Chancellor) on Sep 19, 2007 at 17:51 UTC
    That means you dropped your database connection at some point. Something is set up differently from your old host. I can't tell you what from the information you've provided.

      Actually, I'm facing the same problem here. It looks like a problem in DBD::mysql.

      Are you using local $dbh->{AutoCommit} = 0 anywhere?

      Update:
      I've tracked this down to a problem with DBD::mysql (most recent versions) and DBI > 1.53. DBI 1.54 had some pretty big changes in it's internals and it looks like in some cases this causes problems when the AutoCommit flag is changed in DBD::mysql. I'm still not sure why, but it sporadically causes the above error you're seeing.


      -- More people are killed every year by pigs than by sharks, which shows you how good we are at evaluating risk. -- Bruce Schneier
        I just saw this for the first time after many thousands of connects. DBI version 1.616 ($Revision: 14568 $), DBD::mysql version 4.019. Rerunning the the same script with the same options did not reproduce the message.
      Hi perrin,

      Thanks for taking a look. Could you tell me what information would be diagnostically helpful?


      TIA
      jg
      _____________________________________________________
      "Transport of the mails, transport of the human voice, transport of flickering pictures - in this century, as in others, our highest accomplishments still have the single aim of bringing people together."   Wind, Sand, and Stars
        Antoine-Marie-Roger de Saint-Exupery
        Well, if it works on the other system but not this one, I'd suggest you try to figure out what's different. One thing to check is the version of Ima::DBI you're using.