On Mon, 2003-03-03 at 02:20, Tim Bunce wrote: > On Mon, Mar 03, 2003 at 10:16:07AM +1100, Stas Bekman wrote: > > Tim Bunce wrote: > > >On Sun, Mar 02, 2003 at 02:21:41PM +1100, Stas Bekman wrote: > > >>> > > >>>Seems like the $dbh->take_imp_data method will need driver involvement > > >>>to 'cleanse' the imp data by freeing everything not essential to > > >>>the connection - and hopefully that'll include all the SVs. > > >>> > > >>>If SVs are required, for some reason, can they be made shared, or > > >>>replaced with a shared copy? (My perl threads api knowledge is a > > >>>bit rusty.) > > >> > > >>There should be no perl datastructures involved at all in the pool > > >>storage. > > > > > >Maybe not 'involved' but there's a strong chance the imp_dbh contains > > >SV*'s. > > > > I thought that drivers are pure C. > > DBD::Foo's are a hybrid interfacing a pure C database API to a perl application. > > But I've checked just checked a whole bunch of DBD's now... > Most do contain SV*'s in the imp_sth struct, but the imp_dbh doesn't > have any, so it almost seems like this isn't going to be a big issue > in practice. > > There are some exceptions though... DBD::ODBC does have > SV *odbc_err_handler; /* contains the error handler coderef */ > but I think that could be moved into the $dbh attribute hash > in a new release. ["Paging Mr Urlwin"] > http://search.cpan.org/src/JURL/DBD-ODBC-1.04/dbdimp.h > > And DBD::Sybase has the same, plus a row callback hook SV: > http://search.cpan.org/src/MEWP/DBD-Sybase-0.95/dbdimp.h > ["Paging Mr. Peppler"]
The row callback isn't used - I'll remove it. As for the error handler SV - it is set and cleared as a database handle attribute, but it is used from the Sybase callbacks, in which I only have the imp_dbh_t data. It's been a while since I visited that code, so I'm not sure of the exact dependencies... Michael -- Michael Peppler Data Migrations, Inc. [EMAIL PROTECTED] http://www.mbay.net/~mpeppler Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or long term contract positions - http://www.mbay.net/~mpeppler/resume.html