Patch for p5-DBD-SQLite

Jonathan C. Patschke jp at centtech.com
Mon Jul 30 20:14:16 UTC 2007


Below is an additional patch file for the databases/p5-DBD-SQLite port
that should live in files/patch-dbdimp.c.  It corrects the problem that
positional parameters do not always work.

Specifically, the problem is that, under certain conditions, when you
prepare a statement with placeholders and specify a column order in the
statement other than the one with which the table was created, the execute
will die with 'Unknown named parameter'.

I can't seem to find the smallest test case that makes the bug happen, but
it did affect some of the queries I had in a largish program.  I also
found out that the Debian folks had also run into this problem, and their
patch corrects the defect on FreeBSD.

The patch begins here:

--- dbdimp.c.orig	Sun Jul 29 14:00:46 2007
+++ dbdimp.c	Sun Jul 29 13:59:56 2007
@@ -440,7 +440,7 @@
                                  int is_inout, IV maxlen)
  {
      int pos;
-    if (!SvIOK(param)) {
+    if (!SvIOKp(param)) {
          int len;
          char *paramstring;
          paramstring = SvPV(param, len);

-- 
Jonathan C. Patschke
Manufacturing Software Support
Centaur Technology


More information about the freebsd-perl mailing list