Re: [Sqlrelay-discussion] Can't bind undef to variable with Perl DBI
Brought to you by:
mused
|
From: Tim B. <Tim...@po...> - 2007-02-02 10:32:35
|
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. |