On Tue, Jun 10, 2003 at 04:27:17PM +1000, Stas Bekman wrote: > Perrin Harkins wrote: > >On Tue, 2003-06-10 at 01:45, Stas Bekman wrote: > > > >>mp2+winFU => winnt MPM => no forking, only threads => Apache::DBI is > >>useless there. not only useless, but also wasteful, since it's going to > >>do work that has no added value. > > > > > >But how is this any different from separate processes really? Each > >thread is a separate interpreter with separate globals and this separate > >Apache::DBI persistent handles. If things are not threadsafe it > >crashes, but if they are it should work just like it does for > >multi-process apache, shouldn't it? > > I think you are right. I was thinking about pooling across threads. If > somebody can give it a try and report back (use debug mode to see what > happens) that would be the simplest check. > > connect_on_init() should probably be not used.
connect_on_init() pushs to a list of connection strings to start on child creation. &childinit should be called as a PerlChildInitHandler (not sure when MP2 handles these) but is this called per thread? Note to me: Fix issue of cleanup not correctly rolling back when an AutoCommit in on but begin_work has been called. Could be causing side effects in following reuse of handle. Similar issues may exist with overriding other default parameters from within a handle. my $needCleanup = ($Idx =~ /AutoCommit[^\d]+0/) ? 1 : 0; looks like being the offending line. I will extend my handle limiting patch to cover this and resubmit to here. Hope it helps Paddy
pgp00000.pgp
Description: PGP signature