[CDBI] Problem with _auto_increment_value()

Eric W. Bates ericx at vineyard.net
Mon Nov 27 22:00:56 GMT 2006

Hash: SHA1

Perrin Harkins wrote:
> Eric W. Bates wrote:
>> This is from code that is several years old which runs fine on other
>> servers with older versions of Class::DBI.
> Have you tried installing the same version on this server?

Problematic because there are so many pieces involved with getting
everything at an equivalent version.

>> I'm getting an inexplicable error:
>> Can't locate object method "last_insert_id" via package
>> "DBIx::ContextualFetch::db" at
>> /usr/local/lib/perl5/site_perl/5.8.8/Class/DBI.pm line 612
> I used to see that when the database connection was not getting reused
> properly.  In other words, it does the insert and then tries to read
> mysql_insertid but the connections are not the same so it's empty.  Are
> you doing anything funny in your db_Main code?

You may be right.  db_Main is getting set in a closure by calling
DBI->connect_cached() (code we stole from Ima::DBI).  I will do some
more digging.

> - Perrin

- --
Eric W. Bates
ericx at vineyard.net
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the ClassDBI mailing list