Skip Menu |
 

This queue is for tickets about the DBD-SQLite CPAN distribution.

Report information
The Basics
Id: 44779
Status: resolved
Worked: 1 min
Priority: 0/
Queue: DBD-SQLite

People
Owner: Nobody in particular
Requestors: aff [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 1.19_01
  • 1.19_02
  • 1.19_03
Fixed in: 1.14



Subject: [t/03insert.t] last_insert_id returns undef where 4 is expected
Download (untitled) / with headers
text/plain 897b
The test on $dbh->last_insert_id in t/03insert.t fails: PERL_DL_NONLAZY=1 /opt/perl/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00basic.t ............. ok t/01logon.t ............. ok t/02cr_table.t .......... ok t/03insert.t ............ 1/11 # 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 ); t/03insert.t ............ Failed 1/11 subtests Broken in DBD-SQLite-1.19_05 DBD-SQLite-1.19_04 DBD-SQLite-1.19_03 DBD-SQLite-1.19_02 DBD-SQLite-1.19_01 Works in DBD-SQLite-1.14 Tested with perl, v5.10.0 built for x86_64-linux Linux 2.6.18-92.1.22.el5 x86_64 GNU/Linux *and* perl, v5.10.0 built for i486-linux-gnu-thread-multi Linux 2.6.27-11-generic i686 GNU/Linux Results are identical in both environments.
Download (untitled) / with headers
text/plain 716b
Broken in svn trunk r5928 as well (both on perl, v5.10.0 built for i486-linux-gnu-thread-multi and perl, v5.10.0 built for x86_64-linux) $ svn update Updated to revision 5928. $ make test PERL_DL_NONLAZY=1 /opt/perl/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00compile.t ............... ok t/01logon.t ................. 1/6 # sqlite_version=3.6.12 t/01logon.t ................. ok t/02create_table.t .......... ok t/03insert.t ................ 1/11 # Failed test at t/03insert.t line 29. # got: undef # expected: '4' # Looks like you failed 1 test of 11. t/03insert.t ................ Dubious, test returned 1 (wstat 256, 0x100) Failed 1/11 subtests
I can't replicate this, we'll need more information. Can you provide full perl -V dumps?
Download (untitled) / with headers
text/plain 3.9k
Reproduced on a third machine of mine, a stock ubuntu 8.10. perl -V output is attached. $ gcc -v Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3) $ svn update At revision 5950. $ uname -a Linux d420 2.6.24-23-generic #1 SMP Mon Jan 26 00:13:11 UTC 2009 i686 GNU/Linux $ make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/01_compile................ok t/02_logon..................ok 1/6# sqlite_version=3.6.12 t/02_logon..................ok t/03_create_table...........ok t/04_insert.................ok 1/11 # Failed test at t/04_insert.t line 29. # got: undef # expected: '4' t/04_insert.................NOK 9/11# Looks like you failed 1 test of 11. t/04_insert.................dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 9 Failed 1/11 tests, 90.91% okay t/05_select.................ok t/06_tran...................ok t/07_error..................ok t/08_busy...................ok t/09_create_function........ok t/10_create_aggregate.......ok t/12_unicode................ok t/13_create_collation.......ok t/14_progress_handler.......ok t/15_ak_dbd.................ok t/16_column_info............ok t/17_createdrop.............ok t/18_insertfetch............ok t/19_bindparam..............ok t/20_blobs..................ok t/21_blobtext...............ok t/22_listfields.............ok t/23_nulls..................ok t/24_numrows................ok t/25_chopblanks.............ok t/26_commit.................ok t/27_metadata...............ok t/28_schemachange...........ok t/29_cppcomments............ok t/rt_15186_prepcached.......ok t/rt_21406_auto_finish......ok t/rt_31324_full_names.......ok t/rt_36836_duplicate_key....ok Failed Test Stat Wstat Total Fail List of Failed ------------------------------------------------------------------------------- t/04_insert.t 1 256 11 1 9 Failed 1/32 test scripts. 1/531 subtests failed. Files=32, Tests=531, 12 wallclock secs ( 2.73 cusr + 0.41 csys = 3.14 CPU) Failed 1/32 test programs. 1/531 subtests failed. make: *** [test_dynamic] Error 255 $
Download perl-V.txt
text/plain 2.7k
Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=linux, osvers=2.6.24-19-server, archname=i486-linux-gnu-thread-multi uname='linux palmer 2.6.24-19-server #1 smp sat jul 12 00:40:01 utc 2008 i686 gnulinux ' config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=i486-linux-gnu -Dprefix=/usr -Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.8.8 -Dsitearch=/usr/local/lib/perl/5.8.8 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio -Uusenm -Duseshrplib -Dlibperl=libperl.so.5.8.8 -Dd_dosuid -des' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='4.2.3 (Ubuntu 4.2.3-2ubuntu7)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt perllibs=-ldl -lm -lpthread -lc -lcrypt libc=/lib/libc-2.7.so, so=so, useshrplib=true, libperl=libperl.so.5.8.8 gnulibc_version='2.7' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP THREADS_HAVE_PIDS USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Built under linux Compiled at Jan 14 2009 22:34:36 @INC: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .
Download (untitled) / with headers
text/plain 474b
Whatever it was it seems to be fixed now: $ svn update At revision 5953. $ make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/01_compile................ok t/02_logon..................ok 1/6# sqlite_version=3.6.12 t/02_logon..................ok t/03_create_table...........ok t/04_insert.................ok t/05_select.................ok t/06_tran...................ok t/07_error..................ok
Subject: [rt.cpan.org #44779]
Date: Sat, 4 Apr 2009 14:50:09 +0200
To: bug-DBD-SQLite [...] rt.cpan.org
From: gregor herrmann <gregoa [...] debian.org>
Download (untitled) / with headers
text/plain 596b
The failure is also reported in the Debian bug tracker: http://bugs.debian.org/522505 Build logs that show how the test fails on all architectures can be found at: https://buildd.debian.org/~luk/status/package.php?p=libdbd-sqlite3-perl (This was with DBD::SQLite 1.19_02.) Cheers, gregor (Debian Perl Group) -- .''`. Home: http://info.comodo.priv.at/{,blog/} / GPG Key ID: 0x00F3CFE4 : :' : Debian GNU/Linux user, admin, & developer - http://www.debian.org/ `. `' Member of VIBE!AT, SPI Inc., fellow of FSFE | http://got.to/quote/ `- NP: Various Artists: Green Fields of France
Download signature.asc
application/pgp-signature 197b

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 499b
There's a dozens of changes between _02 and _08, can you please retest with the current dev release? Adam K On Sat Apr 04 08:50:29 2009, gregoa@debian.org wrote: Show quoted text
> The failure is also reported in the Debian bug tracker: > http://bugs.debian.org/522505 > > Build logs that show how the test fails on all architectures can be > found at: > https://buildd.debian.org/~luk/status/package.php?p=libdbd-sqlite3-perl > > (This was with DBD::SQLite 1.19_02.) > > Cheers, > gregor (Debian Perl Group)
Download (untitled) / with headers
text/plain 575b
I also get this problem on all of my Mac OS X installs, and it still happens in _08. I have also solved the problem. The problem was with these lines in the Makefile.PL: 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 now go and try to commit the fix next.
Download (untitled) / with headers
text/plain 173b
The Makefile.PL was fixed for 1.19_09, which resolved the problem for me, that I could also reproduce. But strange that the bug wasn't affecting everyone given its nature.
Subject: [rt.cpan.org #44779] 1.19_10 works for me
Date: Mon, 6 Apr 2009 17:30:18 +0200
To: bug-DBD-SQLite [...] rt.cpan.org
From: gregor herrmann <gregoa [...] debian.org>
Download (untitled) / with headers
text/plain 395b
I just tried with 1.19_10 and the test passes fine for me. Thanks for your work, I'll upload to Debian ASAP. Cheers, gregor -- .''`. Home: http://info.comodo.priv.at/{,blog/} / GPG Key ID: 0x00F3CFE4 : :' : Debian GNU/Linux user, admin, & developer - http://www.debian.org/ `. `' Member of VIBE!AT, SPI Inc., fellow of FSFE | http://got.to/quote/ `- NP: Elliott Sharp: Bad Taste
Download signature.asc
application/pgp-signature 197b

Message body not shown because it is not plain text.

Original requestor reports this as resolved. Closing it.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.