On Mon Mar 20 08:56:22 2006, guest wrote:
Show quoted text> Could not execute any statement, error raising:
> DBD::SQLite::db selectall_arrayref failed: not an error(21) at dbdimp.c
> line 398.
>
> Using v5.8.8 built for i486-linux-gnu-thread-multi,
> DBI DBI-1.50,
> DBD-SQLite-1.11.
> Operating systems tested:
> Debian linux unstable,
> RedHat 9.0.
>
> --code--
> my $dbh = DBI->connect("dbi:SQLite:dbname=".$db,'','');
> my $query = "select * from book";
> my $books = $dbh->selectall_arrayref($query);
> --code--
--- dbdimp.c.orig 2006-03-20 18:23:53.000000000 +0200
+++ dbdimp.c 2006-03-20 18:24:28.000000000 +0200
@@ -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) {