develooper Front page | perl.perl5.porters | Postings from February 2000

Re: Wierd DESTROY bug

From:
Matt Sergeant
Date:
February 23, 2000 02:29
Subject:
Re: Wierd DESTROY bug
Message ID:
00022310300100.14050@dougal.sergeant.org
Looks like a perl bug :-(

Here's some test code:

use strict;

{
	package MyOutside;
	sub new { bless {}, shift }
	sub DESTROY { warn "MyOutside DESTROY\n"; }
}

{
	package MyInside;
	sub new { bless {}, shift }
	sub DESTROY { warn "MyInside DESTROY\n"; }
}

sub Out {
	warn "Out\n";
	my $out = MyOutside->new;
	return 1;
}

sub In {
	warn "In\n";
	my $in = MyInside->new;
	return 1;
}

if (Out()) {
	In();
}

use Config;
print Config->config;
__END__

Results:

Out
In
MyInside DESTROY
MyOutside DESTROY
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
    osname=linux, osvers=2.2.5-4, archname=i386-linux
    uname='linux vador 2.2.5-4 #1 tue apr 6 19:46:00 edt 1999 i686 unknown '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='cc', optimize='-O2', gccversion=pgcc-2.91.60 19981201 (egcs-1.1.1 release)
    cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include'
    ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include'
    stdchar='char', d_stdstdio=undef, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
    libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


On Tue, 22 Feb 2000, Tim Bunce wrote:
> I'm not going to have time to investigate for several days, at least.
> 
> Let me know if anything changes when you...
> Try wrapping the whole program in a { ... } block.
> Try changing to fetchrow_array().
> Then play with Devel::Peek.
> 
> Tim.
> 
> On Tue, Feb 22, 2000 at 02:03:50PM -0800, Michael Peppler wrote:
> > Geoffrey Young writes:
> >  > it does get destroyed, but it looks as though it is destroyed when
> >  > ExecuteOtherSQL exits - that is, at the very end of my trace log (not that I
> >  > am the best at reading these...)
> >  > 
> >  > here's the code and relevant trace (sorry it's so long)...
> >  > 
> >  > I'm going home now, but if I can help tomorrow, please let me know...
> > 
> > What??? Going home already?!? ;-)
> > 
> > Actually it looks like this is a (potential) DBI problem. The $sth is
> > definitely destroyed at the end of the script, not when
> > ExecuteSomeSQL() exits...
> > 
> > Michael
> > 
> >  > --Geoff
> >  > 
> >  > 
> >  > #!/usr/bin/perl
> >  > use DBI;
> >  > 
> >  > BEGIN {
> >  >    $ENV{'ORACLE_HOME'}="/u01/app/oracle/product/8.0.5.1";
> >  >    $ENV{'ORACLE_SID'}="HELM";
> >  > }
> >  > 
> >  > $user="xxx";
> >  > $pass="xxx";
> >  > $dbase="xxxx";
> >  > 
> >  > DBI->trace(6,"/home/geoff/trace.log");
> >  > 
> >  > $dbh = DBI->connect("dbi:Oracle:$dbase", $user, $pass,
> >  >    {RaiseError => 1, AutoCommit => 0, PrintError => 1}) || die $DBI::errstr;
> >  > 
> >  > if (ExecuteSomeSQL()) {
> >  >         ExecuteOtherSQL();
> >  > }
> >  > 
> >  > sub ExecuteSomeSQL {
> >  >         my $sth = $dbh->prepare("select hit from www.sitelog where hit >
> >  > 3133");
> >  >         $sth->execute;
> >  >         while(my $rec = $sth->fetchrow_arrayref) {
> >  >                 return $rec->[0];
> >  >         }
> >  > }
> >  > 
> >  > sub ExecuteOtherSQL {
> >  >         # dies here...
> >  >         my $sth = $dbh->prepare("select hit from www.sitelog where hit >
> >  > 3130");
> >  >         $sth->execute;
> >  >         while(my $rec = $sth->fetchrow_arrayref) {
> >  >                 return $rec->[0];
> >  >         }
> >  > }
> >  > 
> >  > $dbh->disconnect;
> >  > 
> >  > trace:
> >  > 
> >  >     DBI 1.13-nothread dispatch trace level set to 6
> >  >     Note: perl is running without the recommended perl -w option
> >  >     -> DBI->connect(dbi:Oracle:HELM, www, www, HASH(0x80c6fdc))
> >  >     -> DBI->install_driver(Oracle) for perl=5.00503 pid=17504 ruid=500
> >  > euid=500
> >  >        install_driver: DBD::Oracle loaded (version 1.03)
> >  >     New DBI::dr (for DBD::Oracle::dr, parent=, id=)
> >  >     dbih_setup_handle(DBI::dr=HASH(0x813b2d4)=>DBI::dr=HASH(0x8184fc8),
> >  > DBD::Oracle::dr, 0, Null!)
> >  >     dbih_make_com(Null!, DBD::Oracle::dr, 88)
> >  >     dbih_setup_attrib(DBI::dr=HASH(0x8184fc8), Err, Null!) SCALAR(0x8118aac)
> >  > (already defined)
> >  >     dbih_setup_attrib(DBI::dr=HASH(0x8184fc8), State, Null!)
> >  > SCALAR(0x813b4cc) (already defined)
> >  >     dbih_setup_attrib(DBI::dr=HASH(0x8184fc8), Errstr, Null!)
> >  > SCALAR(0x8118a7c) (already defined)
> >  >     dbih_setup_attrib(DBI::dr=HASH(0x8184fc8), Handlers, Null!)
> >  > ARRAY(0x8184f14) (already defined)
> >  >     dbih_setup_attrib(DBI::dr=HASH(0x8184fc8), Debug, Null!) 0 (already
> >  > defined)
> >  >     <- install_driver= DBI::dr=HASH(0x813b2d4)
> >  >     >> connect     DISPATCH (DBI::dr=HASH(0x813b2d4) rc1/3 @5 g0 a816c198)
> >  > at /usr/lib/perl5/site_perl/5.005/i386-linux/DBI.pm line 382.
> >  >     -> connect for DBD::Oracle::dr (DBI::dr=HASH(0x813b2d4)~0x8184fc8 'HELM'
> >  > 'www' 'www' HASH(0x811b170))
> >  >     New DBI::db (for DBD::Oracle::db, parent=DBI::dr=HASH(0x8184fc8), id=)
> >  >     dbih_setup_handle(DBI::db=HASH(0x8184f38)=>DBI::db=HASH(0x8185058),
> >  > DBD::Oracle::db, 81387fc, Null!)
> >  >     dbih_make_com(DBI::dr=HASH(0x8184fc8), DBD::Oracle::db, 108)
> >  >     dbih_setup_attrib(DBI::db=HASH(0x8185058), Err, DBI::dr=HASH(0x8184fc8))
> >  > SCALAR(0x8118aac) (already defined)
> >  >     dbih_setup_attrib(DBI::db=HASH(0x8185058), State,
> >  > DBI::dr=HASH(0x8184fc8)) SCALAR(0x813b4cc) (already defined)
> >  >     dbih_setup_attrib(DBI::db=HASH(0x8185058), Errstr,
> >  > DBI::dr=HASH(0x8184fc8)) SCALAR(0x8118a7c) (already defined)
> >  >     dbih_setup_attrib(DBI::db=HASH(0x8185058), Handlers,
> >  > DBI::dr=HASH(0x8184fc8)) ARRAY(0x8184f14) (already defined)
> >  >     dbih_setup_attrib(DBI::db=HASH(0x8185058), Debug,
> >  > DBI::dr=HASH(0x8184fc8)) 0 (already defined)
> >  > Environment variables:
> >  >         _=./bug.pl
> >  >         HISTFILE=/home/geoff/.history
> >  >         PS1=$PWD> 
> >  >  
> >  > PATH=/usr/local/bin:/u01/app/oracle/product/8.0.5.1/bin:/u01/app/oracle/back
> >  > up:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
> >  >         CVSROOT=/home/cvsroot
> >  >         EDITOR=vi
> >  >         SHELL=/bin/ksh
> >  >         HISTFILESIZE=1000
> >  >         HOSTNAME=mainsheet.laserlink.net
> >  >         USER=geoff
> >  >         MAIL=/var/spool/mail/geoff
> >  >         LD_LIBRARY_PATH=/u01/app/oracle/product/8.0.5.1/lib
> >  >         HOME=/home/geoff
> >  >         HISTSIZE=1000
> >  >         ORACLE_BASE=/u01/app/oracle
> >  >         CVSREAD=yes
> >  >         FCEDIT=vi
> >  >         ORACLE_BACKUP=/u01/app/oracle/backup
> >  >         ORACLE_HOME=/u01/app/oracle/product/8.0.5.1
> >  >         TERM=vt100
> >  >         ORACLE_SID=HELM
> >  >         ORACLE_TERM=386
> >  >         ENV=/home/geoff/.kshrc
> >  >         LOGNAME=geoff
> >  > OCIInitialize(2,(nil),(nil),(nil),(nil))=SUCCESS
> >  > OCIEnvInit(0x8165a6c,0,0,(nil))=SUCCESS
> >  > OCIHandleAlloc(0x818a490,0x811e2c8,2,0,(nil))=SUCCESS
> >  > OCIHandleAlloc(0x818a490,0x811e2cc,8,0,(nil))=SUCCESS
> >  > OCIHandleAlloc(0x818a490,0x811e2d0,3,0,(nil))=SUCCESS
> >  > OCIServerAttach(0x8195c98, 0x8195e18, "HELM", 4, 0)=SUCCESS
> >  > OCIAttrSet(0x8195c38,3,0x8195c98,0,6,0x8195e18)=SUCCESS
> >  > OCIHandleAlloc(0x818a490,0x811e2d4,9,0,(nil))=SUCCESS
> >  > OCIAttrSet(0x819e63c,9,0x8165ab0,3,22,0x8195e18)=SUCCESS
> >  > OCIAttrSet(0x819e63c,9,0x8165ac0,3,23,0x8195e18)=SUCCESS
> >  > OCISessionBegin(0x8195c38,0x8195e18,0x819e63c,1,0)=SUCCESS
> >  > OCIAttrSet(0x8195c38,3,0x819e63c,0,7,0x8195e18)=SUCCESS
> >  >     <- connect= DBI::db=HASH(0x8184f38) at
> >  > /usr/lib/perl5/site_perl/5.005/i386-linux/DBI.pm line 382.
> >  >     >> STORE       DISPATCH (DBI::db=HASH(0x8185058) rc2/1 @3 g0 a8167810)
> >  > at /usr/lib/perl5/site_perl/5.005/i386-linux/DBI.pm line 407.
> >  >     -> STORE for DBD::Oracle::db (DBI::db=HASH(0x8185058)~INNER 'RaiseError'
> >  > 1)
> >  >     STORE DBI::db=HASH(0x8185058) 'RaiseError' => 1
> >  >     <- STORE= 1 at /usr/lib/perl5/site_perl/5.005/i386-linux/DBI.pm line
> >  > 407.
> >  >     >> STORE       DISPATCH (DBI::db=HASH(0x8185058) rc2/1 @3 g0 a8167810)
> >  > at /usr/lib/perl5/site_perl/5.005/i386-linux/DBI.pm line 407.
> >  >     -> STORE for DBD::Oracle::db (DBI::db=HASH(0x8185058)~INNER 'PrintError'
> >  > 1)
> >  >     STORE DBI::db=HASH(0x8185058) 'PrintError' => 1
> >  >     <- STORE= 1 at /usr/lib/perl5/site_perl/5.005/i386-linux/DBI.pm line
> >  > 407.
> >  >     >> STORE       DISPATCH (DBI::db=HASH(0x8185058) rc2/1 @3 g0 a8167810)
> >  > at /usr/lib/perl5/site_perl/5.005/i386-linux/DBI.pm line 407.
> >  >     -> STORE for DBD::Oracle::db (DBI::db=HASH(0x8185058)~INNER 'AutoCommit'
> >  > 0)
> >  >     <- STORE= 1 at /usr/lib/perl5/site_perl/5.005/i386-linux/DBI.pm line
> >  > 407.
> >  >     <- connect= DBI::db=HASH(0x8184f38)
> >  >     >> prepare     DISPATCH (DBI::db=HASH(0x8184f38) rc1/1 @2 g0 a81683c0)
> >  > at ./bug.pl line 30.
> >  >     -> prepare for DBD::Oracle::db (DBI::db=HASH(0x8184f38)~0x8185058
> >  > 'select hit from www.sitelog where hit > 3133')
> >  >     New DBI::st (for DBD::Oracle::st, parent=DBI::db=HASH(0x8185058), id=)
> >  >     dbih_setup_handle(DBI::st=HASH(0x8184f8c)=>DBI::st=HASH(0x811b140),
> >  > DBD::Oracle::st, 8184f98, Null!)
> >  >     dbih_make_com(DBI::db=HASH(0x8185058), DBD::Oracle::st, 204)
> >  >     dbih_setup_attrib(DBI::st=HASH(0x811b140), Err, DBI::db=HASH(0x8185058))
> >  > SCALAR(0x8118aac) (already defined)
> >  >     dbih_setup_attrib(DBI::st=HASH(0x811b140), State,
> >  > DBI::db=HASH(0x8185058)) SCALAR(0x813b4cc) (already defined)
> >  >     dbih_setup_attrib(DBI::st=HASH(0x811b140), Errstr,
> >  > DBI::db=HASH(0x8185058)) SCALAR(0x8118a7c) (already defined)
> >  >     dbih_setup_attrib(DBI::st=HASH(0x811b140), Handlers,
> >  > DBI::db=HASH(0x8185058)) ARRAY(0x8184f14) (already defined)
> >  >     dbih_setup_attrib(DBI::st=HASH(0x811b140), Debug,
> >  > DBI::db=HASH(0x8185058)) 0 (already defined)
> >  > OCIHandleAlloc(0x818a490,0x81a0854,4,0,(nil))=SUCCESS
> >  > OCIStmtPrepare(0x819dd00,0x8195e18,'select hit from www.sitelog where hit >
> >  > 3133',44,1,0)=SUCCESS
> >  > OCIAttrGet(0x819dd00,4,0x81a0858,(nil),24,0x8195e18)=SUCCESS
> >  >     dbd_st_prepare'd sql SELECT
> >  >     <- prepare= DBI::st=HASH(0x8184f8c) at ./bug.pl line 30.
> >  >     >> execute     DISPATCH (DBI::st=HASH(0x8184f8c) rc1/1 @1 g0 a816d430)
> >  > at ./bug.pl line 31.
> >  >     -> execute for DBD::Oracle::st (DBI::st=HASH(0x8184f8c)~0x811b140)
> >  >     dbd_st_execute SELECT (out0, lob0)...
> >  > OCIStmtExecute(0x8195c38,0x819dd00,0x8195e18,0,0,(nil),(nil),0)=SUCCESS
> >  > OCIAttrGet(0x819dd00,4,0xbffff8ee,(nil),10,0x8195e18)=SUCCESS
> >  >     dbd_st_execute SELECT returned (SUCCESS, rpc0, fn4, out0)
> >  >     dbd_describe SELECT (implicit, lb 80)...
> >  > OCIAttrGet(0x819dd00,4,0xbffff8b0,(nil),18,0x8195e18)=SUCCESS
> >  > OCIParamGet(0x819dd00,4,0x8195e18,0x81abbe8,1)=SUCCESS
> >  > OCIAttrGet(0x819db8c,53,0x81abbfe,(nil),2,0x8195e18)=SUCCESS
> >  > OCIAttrGet(0x819db8c,53,0x81abbfc,(nil),1,0x8195e18)=SUCCESS
> >  > OCIAttrGet(0x819db8c,53,0x81abc00,(nil),5,0x8195e18)=SUCCESS
> >  > OCIAttrGet(0x819db8c,53,0x81abc02,(nil),6,0x8195e18)=SUCCESS
> >  > OCIAttrGet(0x819db8c,53,0x81abc03,(nil),7,0x8195e18)=SUCCESS
> >  > OCIAttrGet(0x819db8c,53,0x81abc0c,0xbffff8ac,4,0x8195e18)=SUCCESS
> >  >     fbh 1: 'HIT'        NO null , otype   2->  5, dbsize 22/134, p20.s0
> >  > OCIAttrSet(0x819dd00,4,0xbffff8a8,4,11,0x8195e18)=SUCCESS
> >  > OCIDefineByPos(0x819dd00,0x81abbec,0x8195e18,1,0x81abe60,134,5,0x81a0a40,0x8
> >  > 1abef0,0x81abf00,0)=SUCCESS
> >  >     dbd_describe'd 1 columns (row bytes: 22 max, 4 est avg, cache: 1123)
> >  >     <- execute= '0E0' at ./bug.pl line 31.
> >  >     >> fetchrow_arrayref DISPATCH (DBI::st=HASH(0x8184f8c) rc1/1 @1 g0 a0)
> >  > at ./bug.pl line 32.
> >  >     -> fetchrow_arrayref for DBD::Oracle::st
> >  > (DBI::st=HASH(0x8184f8c)~0x811b140)
> >  >     dbd_st_fetch 1 fields...
> >  > OCIStmtFetch(0x819dd00,0x8195e18,1,2,0)=SUCCESS
> >  >     dbih_setup_fbav for 1 fields => 0x811b1b8
> >  >     dbd_st_fetch 1 fields SUCCESS
> >  >         0 (rc=0): '3134'
> >  >     <- fetchrow_arrayref= [ '3134' ] at ./bug.pl line 32.
> >  >     >> prepare     DISPATCH (DBI::db=HASH(0x8184f38) rc1/1 @2 g0 a81683c0)
> >  > at ./bug.pl line 39.
> >  >     -> prepare for DBD::Oracle::db (DBI::db=HASH(0x8184f38)~0x8185058
> >  > 'select hit from www.sitelog where hit > 3130')
> >  >     New DBI::st (for DBD::Oracle::st, parent=DBI::db=HASH(0x8185058), id=)
> >  >     dbih_setup_handle(DBI::st=HASH(0x818075c)=>DBI::st=HASH(0x811e560),
> >  > DBD::Oracle::st, 8180744, Null!)
> >  >     dbih_make_com(DBI::db=HASH(0x8185058), DBD::Oracle::st, 204)
> >  >     dbih_setup_attrib(DBI::st=HASH(0x811e560), Err, DBI::db=HASH(0x8185058))
> >  > SCALAR(0x8118aac) (already defined)
> >  >     dbih_setup_attrib(DBI::st=HASH(0x811e560), State,
> >  > DBI::db=HASH(0x8185058)) SCALAR(0x813b4cc) (already defined)
> >  >     dbih_setup_attrib(DBI::st=HASH(0x811e560), Errstr,
> >  > DBI::db=HASH(0x8185058)) SCALAR(0x8118a7c) (already defined)
> >  >     dbih_setup_attrib(DBI::st=HASH(0x811e560), Handlers,
> >  > DBI::db=HASH(0x8185058)) ARRAY(0x8184f14) (already defined)
> >  >     dbih_setup_attrib(DBI::st=HASH(0x811e560), Debug,
> >  > DBI::db=HASH(0x8185058)) 0 (already defined)
> >  > OCIHandleAlloc(0x818a490,0x81aba9c,4,0,(nil))=SUCCESS
> >  > OCIStmtPrepare(0x819c8c8,0x8195e18,'select hit from www.sitelog where hit >
> >  > 3130',44,1,0)=SUCCESS
> >  > OCIAttrGet(0x819c8c8,4,0x81abaa0,(nil),24,0x8195e18)=SUCCESS
> >  >     dbd_st_prepare'd sql SELECT
> >  >     <- prepare= DBI::st=HASH(0x818075c) at ./bug.pl line 39.
> >  >     >> execute     DISPATCH (DBI::st=HASH(0x818075c) rc1/1 @1 g0 a816d430)
> >  > at ./bug.pl line 40.
> >  >     -> execute for DBD::Oracle::st (DBI::st=HASH(0x818075c)~0x811e560)
> >  >     dbd_st_execute SELECT (out0, lob0)...
> >  > OCIStmtExecute(0x8195c38,0x819c8c8,0x8195e18,0,0,(nil),(nil),0)=SUCCESS
> >  > OCIAttrGet(0x819c8c8,4,0xbffff8ee,(nil),10,0x8195e18)=SUCCESS
> >  >     dbd_st_execute SELECT returned (SUCCESS, rpc0, fn4, out0)
> >  >     dbd_describe SELECT (implicit, lb 80)...
> >  > OCIAttrGet(0x819c8c8,4,0xbffff8b0,(nil),18,0x8195e18)=SUCCESS
> >  > OCIParamGet(0x819c8c8,4,0x8195e18,0x81aa328,1)=SUCCESS
> >  > OCIAttrGet(0x819c754,53,0x81aa33e,(nil),2,0x8195e18)=SUCCESS
> >  > OCIAttrGet(0x819c754,53,0x81aa33c,(nil),1,0x8195e18)=SUCCESS
> >  > OCIAttrGet(0x819c754,53,0x81aa340,(nil),5,0x8195e18)=SUCCESS
> >  > OCIAttrGet(0x819c754,53,0x81aa342,(nil),6,0x8195e18)=SUCCESS
> >  > OCIAttrGet(0x819c754,53,0x81aa343,(nil),7,0x8195e18)=SUCCESS
> >  > OCIAttrGet(0x819c754,53,0x81aa34c,0xbffff8ac,4,0x8195e18)=SUCCESS
> >  >     fbh 1: 'HIT'        NO null , otype   2->  5, dbsize 22/134, p20.s0
> >  > OCIAttrSet(0x819c8c8,4,0xbffff8a8,4,11,0x8195e18)=SUCCESS
> >  > OCIDefineByPos(0x819c8c8,0x81aa32c,0x8195e18,1,0x81aa4f8,134,5,0x81aa588,0x8
> >  > 1aa598,0x81aa5a8,0)=SUCCESS
> >  >     dbd_describe'd 1 columns (row bytes: 22 max, 4 est avg, cache: 1123)
> >  >     <- execute= '0E0' at ./bug.pl line 40.
> >  >     >> fetchrow_arrayref DISPATCH (DBI::st=HASH(0x818075c) rc1/1 @1 g0 a0)
> >  > at ./bug.pl line 41.
> >  >     -> fetchrow_arrayref for DBD::Oracle::st
> >  > (DBI::st=HASH(0x818075c)~0x811e560)
> >  >     dbd_st_fetch 1 fields...
> >  > OCIStmtFetch(0x819c8c8,0x8195e18,1,2,0)=SUCCESS
> >  >     dbih_setup_fbav for 1 fields => 0x8184f5c
> >  >     dbd_st_fetch 1 fields SUCCESS
> >  >         0 (rc=0): '3131'
> >  >     <- fetchrow_arrayref= [ '3131' ] at ./bug.pl line 41.
> >  >     >> DESTROY     DISPATCH (DBI::st=HASH(0x818075c) rc1/1 @1 g0 a0) at
> >  > ./bug.pl line 47.
> >  >     <> DESTROY ignored for outer handle DBI::st=HASH(0x818075c) (inner
> >  > DBI::st=HASH(0x811e560))
> >  >     >> DESTROY     DISPATCH (DBI::st=HASH(0x811e560) rc1/1 @1 g0 a0) at
> >  > ./bug.pl line 47.
> >  >     -> DESTROY for DBD::Oracle::st (DBI::st=HASH(0x811e560)~INNER)
> >  > OCIStmtFetch(0x819c8c8,0x8195e18,0,2,0)=SUCCESS
> >  > OCIHandleFree(0x819c8c8,4)=SUCCESS
> >  >     <- DESTROY= undef at ./bug.pl line 47.
> >  >     dbih_clearcom (h 0x818075c, com 0x81aba20):
> >  >        FLAGS 0x191: COMSET Warn RaiseError PrintError 
> >  >        TYPE 3
> >  >        PARENT DBI::db=HASH(0x8185058)
> >  >        KIDS 0 (0 active)
> >  >        IMP_DATA undef in 'DBD::Oracle::st'
> >  >        NUM_OF_FIELDS 1
> >  >        NUM_OF_PARAMS 0
> >  >     dbih_clearcom 0x818075c (com 0x81aba20, type 3) done.
> >  > 
> >  >     >> DESTROY     DISPATCH (DBI::st=HASH(0x8184f8c) rc1/1 @1 g0 a0) at
> >  > ./bug.pl line 47.
> >  >     <> DESTROY ignored for outer handle DBI::st=HASH(0x8184f8c) (inner
> >  > DBI::st=HASH(0x811b140))
> >  >     >> DESTROY     DISPATCH (DBI::st=HASH(0x811b140) rc1/1 @1 g0 a0) at
> >  > ./bug.pl line 47.
> >  >     -> DESTROY for DBD::Oracle::st (DBI::st=HASH(0x811b140)~INNER)
> >  > OCIStmtFetch(0x819dd00,0x8195e18,0,2,0)=SUCCESS
> >  > OCIHandleFree(0x819dd00,4)=SUCCESS
> >  >     <- DESTROY= undef at ./bug.pl line 47.
> >  >     dbih_clearcom (h 0x8184f8c, com 0x81a07d8):
> >  >        FLAGS 0x191: COMSET Warn RaiseError PrintError 
> >  >        TYPE 3
> >  >        PARENT DBI::db=HASH(0x8185058)
> >  >        KIDS 0 (0 active)
> >  >        IMP_DATA undef in 'DBD::Oracle::st'
> >  >        NUM_OF_FIELDS 1
> >  >        NUM_OF_PARAMS 0
> >  >     dbih_clearcom 0x8184f8c (com 0x81a07d8, type 3) done.
> >  > 
> >  >     >> disconnect  DISPATCH (DBI::db=HASH(0x8184f38) rc1/1 @1 g0 a81675c0)
> >  > at ./bug.pl line 47.
> >  >     -> disconnect for DBD::Oracle::db (DBI::db=HASH(0x8184f38)~0x8185058)
> >  > OCISessionEnd(0x8195c38,0x8195e18,0x819e63c,0)=SUCCESS
> >  > OCIServerDetach(0x8195c98,0x8195e18,0)=SUCCESS
> >  >     <- disconnect= 1 at ./bug.pl line 47.
> >  >     -> DBI::END
> >  >     >> disconnect_all DISPATCH (DBI::dr=HASH(0x813b2d4) rc1/4 @1 g0
> >  > a816a978) at /usr/lib/perl5/site_perl/5.005/i386-linux/DBI.pm line 424.
> >  >     -> disconnect_all for DBD::Oracle::dr
> >  > (DBI::dr=HASH(0x813b2d4)~0x8184fc8)
> >  >     <- disconnect_all= '' at
> >  > /usr/lib/perl5/site_perl/5.005/i386-linux/DBI.pm line 424.
> >  >     <- DBI::END complete
> >  >     >> DESTROY     DISPATCH (DBI::db=HASH(0x8185058) rc1/1 @1 g0 a0) during
> >  > global destruction.
> >  >     -> DESTROY for DBD::Oracle::db (DBI::db=HASH(0x8185058)~INNER)
> >  > OCIHandleFree(0x8195c98,8)=SUCCESS
> >  > OCIHandleFree(0x8195c38,3)=SUCCESS
> >  > OCIHandleFree(0x8195e18,2)=SUCCESS
> >  >     <- DESTROY= undef during global destruction.
> >  >     dbih_clearcom (h 0x8184f38, com 0x811e270):
> >  >        FLAGS 0x191: COMSET Warn RaiseError PrintError 
> >  >        TYPE 2
> >  >        PARENT DBI::dr=HASH(0x8184fc8)
> >  >        KIDS 0 (0 active)
> >  >        IMP_DATA undef in 'DBD::Oracle::db'
> >  >     >> DESTROY     DISPATCH (DBI::dr=HASH(0x8184fc8) rc1/1 @1 g0 a0) during
> >  > global destruction.
> >  >     -> DESTROY in DBD::_::common for DBD::Oracle::dr
> >  > (DBI::dr=HASH(0x8184fc8)~INNER)
> >  >     <- DESTROY= undef during global destruction.
> >  >     dbih_clearcom (h 0x813b2d4, com 0x8165a18):
> >  >        FLAGS 0x215: COMSET Active Warn AutoCommit 
> >  >        TYPE 1
> >  >        PARENT undef
> >  >        KIDS 1 (0 active)
> >  >        IMP_DATA undef in 'DBD::Oracle::dr'
> >  >     dbih_clearcom 0x813b2d4 (com 0x8165a18, type 1) done.
> >  > 
> >  >     dbih_clearcom 0x8184f38 (com 0x811e270, type 2) done.
> >  > 
> >  >     >> DESTROY     DISPATCH (DBI::db=HASH(0x8184f38) rc1/1 @1 g0 a0) during
> >  > global destruction.
> >  >     <> DESTROY for DBI::db=HASH(0x8184f38) ignored (inner handle gone)
> >  >     >> DESTROY     DISPATCH (DBI::dr=HASH(0x813b2d4) rc1/1 @1 g0 a0) during
> >  > global destruction.
> >  >     <> DESTROY for DBI::dr=HASH(0x813b2d4) ignored (inner handle gone)
> >  > 
> >  > 
> >  > 
> >  > 
> >  > 
> >  > 
> >  > 
> >  > 
> >  > 
> >  > 
> >  > 
> >  > > -----Original Message-----
> >  > > From: Michael Peppler [mailto:mpeppler@peppler.org]
> >  > > Sent: Tuesday, February 22, 2000 4:39 PM
> >  > > To: Geoffrey Young
> >  > > Cc: 'Michael Peppler'; Matt Sergeant
> >  > > Subject: RE: Wierd DESTROY bug
> >  > > 
> >  > > 
> >  > > Geoffrey Young writes:
> >  > >  > just FYI, since someone wondered if it were a DBI or 
> >  > > DBD::Sybase problem, I
> >  > >  > ran a quick test using DBD::Oracle (1.03) and it seemed to 
> >  > > run ok...
> >  > > 
> >  > > Did you verify that the $sth->DESTROY method was called when
> >  > > ExecuteSomeSQL() exits?
> >  > > 
> >  > > Michael
> >  > > 
> >  > > 
> >  > >  > 
> >  > >  > > -----Original Message-----
> >  > >  > > From: Michael Peppler [mailto:mpeppler@peppler.org]
> >  > >  > > Sent: Tuesday, February 22, 2000 12:53 PM
> >  > >  > > To: Matt Sergeant
> >  > >  > > Cc: Michael Peppler; DBI-users
> >  > >  > > Subject: Re: Wierd DESTROY bug
> >  > >  > > 
> >  > >  > > 
> >  > >  > >    ***  From dbi-users - To unsubscribe, see the end of this 
> >  > >  > > message.  ***
> >  > >  > >    *** DBI Home Page - 
> >  > >  > > http://www.symbolstone.org/technology/perl/DBI/ ***
> >  > >  > > 
> >  > >  > > Matt Sergeant writes:
> >  > >  > >  > On Tue, 22 Feb 2000, Michael Peppler wrote:
> >  > >  > >  > > 
> >  > >  > >  > > Tim - does this behavior make sense or this is a 
> >  > > bug in my code?
> >  > >  > >  > 
> >  > >  > >  > Or is it a perl bug? Seriously - shouldn't the $sth going 
> >  > >  > > out of scope
> >  > >  > >  > automatically call DESTROY?
> >  > >  > > 
> >  > >  > > Depends on the refcount. My guess is that the refcount 
> >  > > is wrong. I
> >  > >  > > should probably dig out Devel::Peek and check it out...
> >  > >  > > 
> >  > >  > > Michael
> >  > >  > > -- 
> >  > >  > > Michael Peppler         -||-  Data Migrations Inc.
> >  > >  > > mpeppler@peppler.org    -||-  http://www.mbay.net/~mpeppler
> >  > >  > > Int. Sybase User Group  -||-  http://www.isug.com
> >  > >  > > Sybase on Linux mailing list: ase-linux-list@isug.com
> >  > >  > > 
> >  > >  > > 
> >  > >  > > --------------------------------------------------------------
> >  > >  > > ----------------
> >  > >  > > To unsubscribe from this list, please visit: 
> >  > >  > > http://www.isc.org/dbi-lists.html
> >  > >  > > If you are without web access, or if you are having trouble 
> >  > >  > > with the web page,
> >  > >  > > please send mail to dbi-users-request@isc.org with the 
> >  > > subject line of
> >  > >  > > 'unsubscribe'.
> >  > >  > > --------------------------------------------------------------
> >  > >  > > ----------------
> >  > >  > > 
> >  > > 
> >  > > -- 
> >  > > Michael Peppler         -||-  Data Migrations Inc.
> >  > > mpeppler@peppler.org    -||-  http://www.mbay.net/~mpeppler
> >  > > Int. Sybase User Group  -||-  http://www.isug.com
> >  > > Sybase on Linux mailing list: ase-linux-list@isug.com
> >  > > 
> > 
> > -- 
> > Michael Peppler         -||-  Data Migrations Inc.
> > mpeppler@peppler.org    -||-  http://www.mbay.net/~mpeppler
> > Int. Sybase User Group  -||-  http://www.isug.com
> > Sybase on Linux mailing list: ase-linux-list@isug.com
-- 
<Matt/>

Details: FastNet Software Ltd - XML, Perl, Databases.
Tagline: High Performance Web Solutions
Web Sites: http://come.to/fastnet http://sergeant.org
Available for Consultancy, Contracts and Training.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About