Re: [Sqlrelay-discussion] Can't bind undef to variable with Perl DBI
Brought to you by:
mused
|
From: David M. <dav...@fi...> - 2007-02-02 16:03:05
|
Thanks Tim, I'll apply this patch and get it into the next release. Dave dav...@fi... On Fri, 2007-02-02 at 15:57 +0000, Tim Bunce wrote: > On Fri, Feb 02, 2007 at 10:32:21AM +0000, Tim Bunce wrote: > > On Fri, Feb 02, 2007 at 01:36:30PM +1100, ja...@th... wrote: > > > Hi all, > > > > > > I've recently started using sqlrelay's DBI driver to connect Perl to > > > Oracle (sqlrelay 0.38). I find that I can't bind NULL values (undef, > > > in Perl) to a prepared statement. > > > > > Looking at the source code, I see that src/api/perl/Cursor/Cursor.xs > > > tries to detect NULLness of bind values by comparing the SV's address > > > to &sv_undef. I don't think that this is right - on my machine (Perl > > > 5.8.4 on Linux) the comparison fails even thought the bind value is > > > null. > > > > > > I think the right way to check whether the SV structure contains undef > > > is to use the SvOK macro. > > > > > Does anyone have any further thoughts on this? > > > > Looks good to me. > > > > Tim. > > > > p.s. I've have some fixes to DBD::SQLRelay I need to dig out and post here. > > I've attached it to this email. > > These changes came from some work I did for Shopzilla to evaluate > sqlrelay for use with Sybase. I did that by setting the DBI_AUTOPROXY > environment variable to refer to DBD::SQLRelay and then running > DBD::Sybase's own test suite. > > I'd recommend that approach to anyone looking to use DBD::SQLRelay. > > DBD::SQLRelay still needs more love, but it won't be getting any more > from me in the near future. Shopzilla decided not to use sqlrelay for > their sybase application and are instead going to use the new DBD::Gofer > driver that's part of DBI 1.54. > > Tim. > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ Sqlrelay-discussion mailing list Sql...@li... https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion |