Skip Menu |

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

Report information
The Basics
Id: 29519
Status: resolved
Priority: 0/
Queue: DBD-SQLite

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

Bug Information
Severity: Important
Broken in: 1.14
Fixed in: (no value)



Subject: t/70schemachange.t failure
Table is not deleted by child process Show quoted text
> perl -Mblib t/70schemachange.t
1..9 ok 1 ok 2 Creating table: CREATE TABLE testaa (id INTEGER NOT NULL, name CHAR (64) NOT NULL) ok 3 ok 4 Creating table: CREATE TABLE testab (id INTEGER NOT NULL, name CHAR (64) NOT NULL) ok 5 DBD::SQLite::db do failed: database is locked(5) at dbdimp.c line 403 at t/70schemachange.t line 68. Test 5: DBI error 5, database is locked(5) at dbdimp.c line 403 ok 6 ok 7 DBD::SQLite::db do failed: table testab already exists(1) at dbdimp.c line 271 at t/70schemachange.t line 84. not ok 8 at line 84 - FAILED Test 8 - Test 8: DBI error 1, table testab already exists(1) at dbdimp.c line 271 ok 9 Show quoted text
> perl -V
Summary of my perl5 (revision 5 version 10 subversion 0 patch 31932) configuration: Platform: osname=cygwin, osvers=1.5.24(0.15642), archname=cygwin-thread-multi-64int uname='cygwin_nt-5.1 pn100-02-2-054p 1.5.24(0.15642) 2007-01-31 10:57 i686 cygwin ' config_args='-de -Dusedevel -Dversiononly=no -Dinstallusrbinperl -DPERL_OLD_COPY_ON_WRITE -Duse64bitint -Dusethreads -Uusemymalloc -Dnoextensions=attrs IPC/SysV Sys/Syslog DB_File NDBM_File ODBM_File SDBM_File Devel/DProf Devel/Peek re Text/Soundex Math/BigInt/FastCalc Time/Piece -A append:ccflags= -DPL_OP_SLAB_ALLOC -DNO_MATHOMS -A define:optimize=-O3 -pipe -funit-at-a-time -mtune=pentium4m -march=pentium4 -mfpmath=sse -mieee-fp -mmmx -msse -msse2' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -DPL_OP_SLAB_ALLOC -DNO_MATHOMS -fno-strict-aliasing -pipe', optimize='-O3 -pipe -funit-at-a-time -mtune=pentium4m -march=pentium4 -mfpmath=sse -mieee-fp -mmmx -msse -msse2', cppflags='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -DPL_OP_SLAB_ALLOC -DNO_MATHOMS -fno-strict-aliasing -pipe' ccversion='', gccversion='3.4.4 (cygming special, gdc 0.12, using dmd 0.125)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='g++', ldflags =' -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -Wl,--enable-auto-import -s -L/usr/local/lib' libpth=/usr/local/lib /usr/lib /lib libs=-lgdbm -ldl -lcrypt -lgdbm_compat perllibs=-ldl -lcrypt -lgdbm_compat libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' -s' cccdlflags=' ', lddlflags=' --shared -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -Wl,--enable-auto-import -s -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY NO_MATHOMS PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_USE_SAFE_PUTENV PL_OP_SLAB_ALLOC USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Locally applied patches: DEVEL Built under cygwin Compiled at Sep 20 2007 14:17:14 %ENV: PERLIO="perlio" CYGWIN="ntsec" @INC: /usr/lib/perl5/5.10.0/cygwin /usr/lib/perl5/5.10.0 .
On Thu Sep 20 15:55:58 2007, JDHEDDEN wrote: Show quoted text
> Table is not deleted by child process >
> > perl -Mblib t/70schemachange.t
[... snip ...] Show quoted text
> ok 5 > DBD::SQLite::db do failed: database is locked(5) at dbdimp.c line 403 at > t/70schemachange.t line 68. > Test 5: DBI error 5, database is locked(5) at dbdimp.c line 403
The attached patch allows the test to pass. However, if there is a locking bug involved, then some other fix is needed.
--- DBD-SQLite-1.14/t/70schemachange.t 2007-08-22 20:11:41.000000000 -0400 +++ DBD-SQLite-patched/t/70schemachange.t 2007-09-20 16:09:10.124038200 -0400 @@ -59,12 +59,17 @@ Test($state or $dbh->do($create2)) or DbiError($dbh->err, $dbh->errstr); + Test($state or $dbh->disconnect()) + or DbiError($dbh->err, $dbh->errstr); + my $pid; if (!defined($pid = fork())) { die("fork: $!"); } elsif ($pid == 0) { # Child: drop the second table if (!$state) { + $dbh = DBI->connect($test_dsn, $test_user, $test_password) + or ServerError(); $dbh->do("DROP TABLE $table2") or DbiError($dbh->err, $dbh->errstr); $dbh->disconnect() @@ -76,6 +81,9 @@ # Parent: wait for the child to finish, then attempt to use the database Test(waitpid($pid, 0) >= 0) or print("waitpid: $!\n"); + Test($state or $dbh = DBI->connect($test_dsn, $test_user, $test_password)) + or ServerError(); + Test($state or $dbh->do("DROP TABLE $table1")) or DbiError($dbh->err, $dbh->errstr);
This appears to be resolved
On Fri Apr 03 17:25:15 2009, ADAMK wrote: Show quoted text
> This appears to be resolved
Uh, no. It's not resolved. The problem still occurs exactly as I reported. The patch I submitted has not been applied, and a new distribution has not been published.
On Sat Apr 04 09:15:15 2009, JDHEDDEN wrote: Show quoted text
> On Fri Apr 03 17:25:15 2009, ADAMK wrote:
> > This appears to be resolved
> > Uh, no. It's not resolved. The problem still occurs exactly as I > reported. The patch I submitted has not been applied, and a new > distribution has not been published.
It is now resolved in the new version. Thanks.