Re: [svn:dbi] r13920 - dbi/trunk/lib/DBD

"H.Merijn Brand" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
On Wed, 28 Apr 2010 12:46:41 +0000, Jens Rehsack
<[email protected]> wrote:

> On 04/27/10 21:13, Tim Bunce wrote:
> > On Fri, Apr 23, 2010 at 05:57:29AM -0700, [email protected] wrote:
> >> +use Config;
> >> +
> >> +our $threadid = 0;       # holds private thread id of driver
> >>
> >> +    $this->STORE (p_threadid =>  $threadid);
> >>
> >> +sub CLONE
> >> +{
> >> +    $Config{usethreads}&&  $INC{"threads.pm"} and
> >> +	$threadid = threads->tid ();
> >> +    } # CLONE
> >> +
> >>
> >> +    my $ownerid = $dbh->FETCH ("p_threadid");
> >> +    $ownerid == $DBD::File::dr::threadid or
> >> +	croak "database handle is owned by thread $ownerid and this is $DBD::File::dr::threadid"
> >
> > The DBI method dispatch code already checks thread ownership of handles
> > (see DBIc_THR_USER in DBI.xs) so is this really needed?
> 
> You're right. I didn't check this before and I didn't check whether this 
> feature is in DBI::PurePerl (grepping for 'thread' in lib/DBI/PurePerl.pm 
> didn't find anything, but I didn't review the code). I also miss a test 
> which proves that it works.
> 
> For this release, the patch which takes the p_thread stuff out of DBD::File 
> is attached. After it, some action seems required ...

Thanks, applied and pushed upstream.

What kind of action?

-- 
H.Merijn Brand  http://tux.nl      Perl Monger  http://amsterdam.pm.org/
using 5.00307 through 5.12 and porting perl5.13.x on HP-UX 10.20, 11.00,
11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3.
http://mirrors.develooper.com/hpux/           http://www.test-smoke.org/
http://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.