|
|
@@ -59,3 +59,25 @@ Index: DBD-SQLite-1.12/dbdimp.h
|
|
|
|
|
|
/* 30 second timeout by default */
|
|
|
#define SQL_TIMEOUT 30000
|
|
|
+Index: DBD-SQLite-1.12/dbdimp.c
|
|
|
+--- DBD-SQLite-1.12/dbdimp.c.orig 2006-04-10 03:50:05 +0200
|
|
|
++++ DBD-SQLite-1.12/dbdimp.c 2006-07-24 13:01:30 +0200
|
|
|
+@@ -390,14 +390,17 @@
|
|
|
+
|
|
|
+ sqlite_trace(3, "Execute returned %d cols\n", DBIc_NUM_FIELDS(imp_sth));
|
|
|
+ if (DBIc_NUM_FIELDS(imp_sth) == 0) {
|
|
|
++ char *defererr = strdup((char*)sqlite3_errmsg(imp_dbh->db));
|
|
|
+ while ((retval = sqlite3_step(imp_sth->stmt)) != SQLITE_DONE) {
|
|
|
+ if (retval == SQLITE_ROW) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ sqlite3_finalize(imp_sth->stmt);
|
|
|
+- sqlite_error(sth, (imp_xxh_t*)imp_sth, retval, (char*)sqlite3_errmsg(imp_dbh->db));
|
|
|
++ sqlite_error(sth, (imp_xxh_t*)imp_sth, retval, defererr);
|
|
|
++ free(defererr);
|
|
|
+ return -5;
|
|
|
+ }
|
|
|
++ free(defererr);
|
|
|
+ /* warn("Finalize\n"); */
|
|
|
+ sqlite3_finalize(imp_sth->stmt);
|
|
|
+ imp_sth->nrow = sqlite3_changes(imp_dbh->db);
|