SOLVED - Re: [DBD-SQLite] test file 3 failure around todo

Darren Duncan darren at
Sat Apr 4 21:12:06 GMT 2009

Darren Duncan wrote:
> On another matter, I am getting a test failure on my machines with the 
> CPAN release.  Mac OS X 10.5.6 on 2 different arch, both Perl 5.8.9 and 
> 5.10.0 (self installed, not system), all with the latest DBI version.
> File 03insert.t returns not ok 9 with comments:
> # Test 9 got: <UNDEF> (t/03insert.t at line 18)
> #   Expected: "4"
> #  t/03insert.t line 18 is: skip($unless_min_dbi, 
> $dbh->last_insert_id(undef, undef, undef, undef), 4 );

This problem still exists in the latest CPAN build, _08.  And lots of other 
people have reported the same problem though it doesn't occur for everyone; see .

I have also solved the problem.  The problem was with these lines in the 

   if ( $DBI::VERSION <= 1.42 ) {
     push @CC_DEFINE, '-Dno_last_insert_id';

That's lines 170..172 in _08.  Removing those fixed the problem.

I think the issue here is that DBI was not being loaded prior to that line and 
so $DBI::VERSION was always undefined meaning SQLite always built with 
-Dno_last_insert_id even when newer DBI were installed.

I will update the RT ticket with this new information and also try to apply the 
patch in version control unless someone beats me to it (but if you do, please 
credit me in the changelog).

Thank you. -- Darren Duncan

More information about the DBD-SQLite mailing list