Class::DBI & DBD-SQLite 1.08 broken!

[prev] [thread] [next] [Date index for 2005/03/01]

From: Dan Sully
Subject: Class::DBI & DBD-SQLite 1.08 broken!
Date: 07:16 on 01 Mar 2005
Expecting a drop-in replacement for 1.07 for my rather large Class::DBI
application, all hell breaks loose, and nothing seems to work. I've tracked
it down to numbers being incorrectly identified as strings.

Matt - this patch reverses a change you made for 1.08, I'm assuming for the 64-bit support.


--- dbdimp.c.orig	Mon Feb 28 23:09:41 2005
+++ dbdimp.c	Mon Feb 28 23:10:16 2005
@@ -357,7 +357,7 @@ sqlite_st_execute (SV *sth, imp_sth_t *i
             char * data = SvPV(value, len);
             retval = sqlite3_bind_blob(imp_sth->stmt, i+1, data, len, SQLITE_TRANSIENT);
         }
-        else if (looks_like_number(value)) {
+        else if (SvNIOK(value)) {
             /* bind ordinary numbers as numbers - otherwise we might sort wrong */
             retval = sqlite3_bind_double(imp_sth->stmt, i+1, SvNV(value));
         }

-D
        -- 
        <Nigel> Please refrain from fearing the reaper.

Class::DBI & DBD-SQLite 1.08 broken!
Dan Sully 07:16 on 01 Mar 2005

Generated at 20:12 on 07 Mar 2005 by mariachi v0.52