On Wed, Mar 28, 2007 at 01:54:51PM -0500, Scott T. Hildreth wrote:
> I should also mention that this is a $dbh->do( "an insert statement").
> A quick look at DBI::ProxyServer, shows that the NUMFIELDS indicates
> a select, therefore in this case 'undef' would be returned for an
> insert.  Should it be initialized to '0', to quite warnings on
> non-selects?

That would work. As would:

    $sth->SUPER::STORE('NUM_OF_FIELDS' => $numFields) if $numFields;

Doing both would make life easier for people who can't upgrade client
and server at the same time.

But I wonder if this is really the issue. Why hasn't anyone reported
undef warnings on insert statement before? Would be good to add a test
case to t/80proxy.t that reproduces the problem before you fix it.

Tim.

p.s. Any volunteers to work on a daemon wrapper for DBI::Gofer::Execute
so it can be used as a replacement for the current DBI proxy server.
(DBD::Gofer is potentially significantly faster than DBD::Proxy.)
If so please start a new thread and I'll give a brain dump...


> On Wed, 2007-03-28 at 13:35 -0500, Scott T. Hildreth wrote:
> > So I tracked this down further, DBD::Proxy gets an array returned from the 
> > client calling
> > the server.  Which is ultimately put into @outData, and 
> > $outData[0]($numFields) is 'undef'
> > and produces this warning,
> > 
> >   Use of uninitialized value in subroutine entry at 
> >    /usr/local/perl-5.8.8/lib/site_perl/5.8.8/i686-linux/DBD/Proxy.pm line 
> > 566.
> > 
> >  
> > Here is where @outData is spliced,
> >   
> > DBD::Proxy::st::execute(/usr/local/perl-5.8.8/lib/site_perl/5.8.8/i686-linux/DBD/Proxy.pm:559):
> >   559:            my ($numFields, $numParams, $names, $types) = 
> > splice(@outData, 0, 4);
> > 
> > I guess my next step is to run the Proxy server in debug mode and figure 
> > out why numFields
> > is not filled in.  I was hoping someone might know what is going on before 
> > I do that.
> > 
> > 
> > Thanks
> > 
> > 
> > On Thu, 2007-01-18 at 15:37 -0600, Scott T. Hildreth wrote:
> > > ###########################################################
> > > 
> > >   Perl            : 5.008008    (i386-freebsd)
> > >   OS              : freebsd     (6.1-stable)
> > >   DBI             : 1.53
> > >   DBD::mysql      : 3.0004
> > >   DBD::Sponge     : 11.10
> > >   DBD::SQLite     : 1.12
> > >   DBD::Proxy      : 0.2004
> > >   DBD::Multiplex  : 2.00
> > >   DBD::File       : 0.35
> > >   DBD::ExampleP   : 11.12
> > >   DBD::DBM        : 0.03
> > >   DBD::CSV        : 0.22
> > >   DBD::AnyData    : 0.08
> > > 
> > > ##########################################################
> > > 
> > > For every database call, do, execute, ...etc I get the warning,
> > > 
> > > Use of uninitialized value in subroutine entry
> > > at /usr/local/perl-5.8.8/lib/site_perl/5.8.8/i386-freebsd/DBD/Proxy.pm
> > > line 567.
> > > 
> > > Which is " 'NUM_OF_FIELDS' => $numFields, ".
> > > 
> > > I don't think this matters but, the proxy is connecting to DBD::Oracle,
> > > the connect is in another module that is inherited by the module I am 
> > > testing.  
> > > 
> > > I am also getting disconnect errors on the DESTROY,
> > > 
> > >         (in cleanup) DBD::Proxy::db disconnect failed: Can't call method
> > > "disconnect" on an undefined value
> > > at /usr/local/perl-5.8.8/lib/site_perl/5.8.8/i386-freebsd/DBD/Proxy.pm
> > > line 311 during global destruction.
> > > 
> > >         (in cleanup) DBD::Proxy::db DESTROY failed: Can't call method
> > > "disconnect" on an undefined value
> > > at /usr/local/perl-5.8.8/lib/site_perl/5.8.8/i386-freebsd/DBD/Proxy.pm
> > > line 311 during global destruction.
> > > 
> > > 
> > > My eyes are glazing over, so any help would be appreciated.  I'm sure it
> > > is something simple I am missing here...
> > > 
> > > 
> > > Thanks.
> > > 
> > > 
> -- 
> Scott T. Hildreth <[EMAIL PROTECTED]>

Reply via email to