Package: libdbd-sqlite3-perl Version: 1.11-1 Severity: grave Tags: patch
This package is unuseable due to incorrect use of function sqlite3_prepare(). Any programs that uses methods like do() or prepare() fail with error messages like this: DBD::SQLite::db do failed: not an error(21) at dbdimp.c line 398 Also this backage cannot be build from source anymore due to failed tests. Attached patch fixes described problems. -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.17-rc1-me Locale: LANG=uk_UA.UTF-8, LC_CTYPE=uk_UA.UTF-8 (charmap=UTF-8) Versions of packages libdbd-sqlite3-perl depends on: ii libc6 2.3.6-5 GNU C Library: Shared libraries an ii libdbi-perl 1.50-2 Perl5 database interface by Tim Bu ii libsqlite3-0 3.3.5-0.1 SQLite 3 shared library ii perl 5.8.8-4 Larry Wall's Practical Extraction ii perl-base [perlapi-5.8.8] 5.8.8-4 The Pathologically Eclectic Rubbis libdbd-sqlite3-perl recommends no packages. -- no debconf information
diff -urpN libdbd-sqlite3-perl-1.11/dbdimp.c libdbd-sqlite3-perl-1.11.mod/dbdimp.c --- libdbd-sqlite3-perl-1.11/dbdimp.c 2005-12-02 19:28:53.000000000 +0200 +++ libdbd-sqlite3-perl-1.11.mod/dbdimp.c 2006-04-08 19:16:09.000000000 +0300 @@ -260,7 +260,7 @@ sqlite_st_prepare (SV *sth, imp_sth_t *i imp_sth->retval = SQLITE_OK; imp_sth->params = newAV(); - if ((retval = sqlite3_prepare(imp_dbh->db, statement, 0, &(imp_sth->stmt), &extra)) + if ((retval = sqlite3_prepare(imp_dbh->db, statement, -1, &(imp_sth->stmt), &extra)) != SQLITE_OK) { if (imp_sth->stmt) { @@ -320,7 +320,7 @@ sqlite_st_execute (SV *sth, imp_sth_t *i psv = hv_fetch((HV*)SvRV(sth), "Statement", 9, 0); statement = (psv && SvOK(*psv)) ? SvPV_nolen(*psv) : ""; sqlite_trace(3, "re-prepare statement %s", statement); - if ((retval = sqlite3_prepare(imp_dbh->db, statement, 0, &(imp_sth->stmt), &extra)) + if ((retval = sqlite3_prepare(imp_dbh->db, statement, -1, &(imp_sth->stmt), &extra)) != SQLITE_OK) { if (imp_sth->stmt) {