Re: Unusual behavior with $sth->{NAME} and friends

Tim Bunce <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
On Mon, Aug 18, 2008 at 09:40:52PM -0000, Greg Sabino Mullane wrote:
> 
> > The finish() docs say:
> >
> >  Calling C<finish> resets the L</Active> attribute for the statement.  It
> >  may also make some statement handle attributes (such as C<NAME> and C<TYPE>)
> >  unavailable if they have not already been accessed (and thus cached).
> 
> Sure, but why is NAME_lc cached and NAME not?

I'd guess that's a 'bug' in DBD::mysql. It implements the NAME
attribute. The NAME_* attributes are implemented by the DBI.

> And why the differing behavior depending on the DBD?

I think DBD::mysql is the only driver to exhibit this behaviour.
I'd be happy to see it 'fixed' but I don't know how difficult it would be.

> I admit this is fairly corner case but it smells like there is some
> subtle bug here.

I'm confident a patch to cache NAME (and other sth metadata attribs)
would be welcome - and probably quite simple.

Tim.
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.