Skip Menu |

This queue is for tickets about the DBD-SQLite CPAN distribution.

Report information
The Basics
Id: 7972
Status: resolved
Priority: 0/
Queue: DBD-SQLite

People
Owner: Nobody in particular
Requestors: gbarr [...] pobox.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.06
Fixed in: (no value)



Subject: $sth->execute(undef) gives warning
I notice someone has reported this before in #7387 but here is a patch --- dbdimp.c.orig 2004-10-12 10:58:39.570009280 -0500 +++ dbdimp.c 2004-10-12 11:02:04.349878008 -0500 @@ -8,6 +8,8 @@ #define SvPV_nolen(x) SvPV(x,PL_na) #endif +#define SvPV_nolen_undef_ok(x) (SvOK(x) ? SvPV_nolen(x) : "undef") + #ifndef call_method #define call_method(x,y) perl_call_method(x,y) #endif @@ -328,7 +330,7 @@ int sql_type = SvIV(sql_type_sv); sqlite_trace(4, "params left in 0x%p: %d", imp_sth->params, 1+av_len(imp_sth->params)); - sqlite_trace(4, "bind %d type %d as %s", i, sql_type, SvPV_nolen(value)); + sqlite_trace(4, "bind %d type %d as %s", i, sql_type, SvPV_nolen_undef_ok(value)); if (!SvOK(value)) { sqlite_trace(5, "binding null"); @@ -430,7 +432,7 @@ } pos = 2 * (SvIV(param) - 1); sqlite_trace(3, "bind into 0x%p: %d => %s (%d) pos %d\n", - imp_sth->params, SvIV(param), SvPV_nolen(value), sql_type, pos); + imp_sth->params, SvIV(param), SvPV_nolen_undef_ok(value), sql_type, pos); av_store(imp_sth->params, pos, SvREFCNT_inc(value)); av_store(imp_sth->params, pos+1, newSViv(sql_type));
From: Matt Sergeant <matt [...] sergeant.org>
Subject: Re: [cpan #7972] $sth->execute(undef) gives warning
Date: Tue, 12 Oct 2004 21:32:21 +0100
To: bug-DBD-SQLite [...] rt.cpan.org
RT-Send-Cc:
Super. Applied.