1
0
Fork 0
mirror of https://github.com/DBD-SQLite/DBD-SQLite synced 2025-06-07 06:08:38 -04:00

DBD::SQLite: applied a patch to fix "closing dbh with active statement handles" issue [RT #40383]

This commit is contained in:
Kenichi Ishigaki 2009-01-29 01:56:59 +00:00
parent e109bc83b4
commit f75c9fb39d

View file

@ -151,8 +151,13 @@ sqlite_db_disconnect (SV *dbh, imp_dbh_t *imp_dbh)
}
if (sqlite3_close(imp_dbh->db) == SQLITE_BUSY) {
sqlite3_stmt *pStmt;
/* active statements! */
warn("closing dbh with active statement handles");
while ((pStmt = sqlite3_next_stmt(imp_dbh->db, NULL)) != NULL)
sqlite3_finalize(pStmt);
sqlite3_close(imp_dbh->db);
}
imp_dbh->db = NULL;