mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 22:28:47 -04:00
DBD::SQLite: we don't need to discard the database handle even if these pragmata should fail
This commit is contained in:
parent
e37b62e6ef
commit
8b24efecf9
1 changed files with 0 additions and 6 deletions
6
dbdimp.c
6
dbdimp.c
|
@ -74,20 +74,14 @@ sqlite_db_login(SV *dbh, imp_dbh_t *imp_dbh, char *dbname, char *user, char *pas
|
|||
|
||||
rc = sqlite3_exec(imp_dbh->db, "PRAGMA empty_result_callbacks = ON", NULL, NULL, &errmsg);
|
||||
if ( rc != SQLITE_OK ) {
|
||||
/* warn("failed to set pragma: %s\n", errmsg); */
|
||||
sqlite_error(dbh, rc, errmsg);
|
||||
if (errmsg) sqlite3_free(errmsg);
|
||||
sqlite3_close(imp_dbh->db); /* we don't use this handle */
|
||||
return FALSE; /* -> undef in lib/DBD/SQLite.pm */
|
||||
}
|
||||
|
||||
rc = sqlite3_exec(imp_dbh->db, "PRAGMA show_datatypes = ON", NULL, NULL, &errmsg);
|
||||
if ( rc != SQLITE_OK ) {
|
||||
/* warn("failed to set pragma: %s\n", errmsg); */
|
||||
sqlite_error(dbh, rc, errmsg);
|
||||
if (errmsg) sqlite3_free(errmsg);
|
||||
sqlite3_close(imp_dbh->db); /* we don't use this handle */
|
||||
return FALSE; /* -> undef in lib/DBD/SQLite.pm */
|
||||
}
|
||||
|
||||
DBIc_ACTIVE_on(imp_dbh);
|
||||
|
|
Loading…
Add table
Reference in a new issue