mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 14:19:10 -04:00
DBD::SQLite: applied a patch to fix "closing dbh with active statement handles" issue [RT #40383]
This commit is contained in:
parent
e109bc83b4
commit
f75c9fb39d
1 changed files with 6 additions and 1 deletions
7
dbdimp.c
7
dbdimp.c
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue