On Thu, 26 Sep 2002 12:32:28 -0400 Pooya Woodcock <[EMAIL PROTECTED]> wrote:
> I'm getting a segfault w/ oracle 9i-64bit, DBD-Oracle-1.12, > DBI-1.30, perl 5.80. compiled with sun forte C 6 update 2, flags: > "-mt -fast -xchip=ultra2 -xarch=v9a -xlic_lib=sunperf". > The segfaults come at the end of any series of queries -- that is, > at the END of the scripts. I'm thinking that this might be a PerlIO > problem- not a dbi problem.. what do you think? > > ---- > #!/usr/local/bin/perl -w > > $|++; > use strict; > use DBI; > DBI->trace(9); > my $dbh = DBI->connect("DBI:Oracle:host=localhost;sid=ORADB;port=1521", > "scott", "tiger"); > > my $sth = $dbh->prepare(qq{select * from emp}); > > $sth->execute(); > > while (my @data = $sth->fetchrow_array()) { > print @data, "\n"; > } # Finish() isn't required if you are fetching all the rows of a query. > $sth->finish; # It's a good idea to disconnect explicitly in any case. $dbh -> disconnect; # Don't leave any handles around for global destruction. $sth = $dbh = undef; Sometimes global destruction has trouble with DBI handles. See if undefining all your handles (like above) helps. -- Mac :}) ** I normally forward private questions to the appropriate mail list. ** Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age.