From 0193c3f6ff17e150bdd59de3fa0894b899311847 Mon Sep 17 00:00:00 2001 From: Kenichi Ishigaki Date: Fri, 30 May 2014 01:08:07 +0900 Subject: [PATCH] error is too severe for calling db_filename against a closed connection --- dbdimp.c | 1 - t/rt_96050_db_filename_for_a_closed_database.t | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dbdimp.c b/dbdimp.c index 70e8242..f47e618 100644 --- a/dbdimp.c +++ b/dbdimp.c @@ -1373,7 +1373,6 @@ sqlite_db_filename(pTHX_ SV *dbh) const char *filename; if (!imp_dbh->db) { - sqlite_error(dbh, -1, "Can't tell the filename of a closed database"); return &PL_sv_undef; } diff --git a/t/rt_96050_db_filename_for_a_closed_database.t b/t/rt_96050_db_filename_for_a_closed_database.t index aaf6854..08d9fa1 100644 --- a/t/rt_96050_db_filename_for_a_closed_database.t +++ b/t/rt_96050_db_filename_for_a_closed_database.t @@ -20,5 +20,5 @@ $dbh->disconnect; { my $filename = eval { $dbh->sqlite_db_filename }; - ok $@ && !$filename, "got an error; no filename; and no segfault"; + ok !$@ && !$filename, "got no error; no filename; and no segfault"; }