[DBD::Pg] And revert the revert. Sorry about that.
dbdpg-commits-gENoVmVU/[email protected] Wed, 17 Dec 2014 16:22:29 +0000
| Newsgroups | gmane.comp.db.postgresql.dbdpg.cvs |
|---|---|
| Message-ID | <[email protected]> |
Committed by Greg Sabino Mullane <greg-O9fzpki4YnJWk0Htik3J/[email protected]> And revert the revert. Sorry about that. --- dbdimp.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/dbdimp.c b/dbdimp.c index 2c5ca3c..40c62fa 100644 --- a/dbdimp.c +++ b/dbdimp.c @@ -465,8 +465,6 @@ int dbd_db_ping (SV * dbh) tstatus = pg_db_txn_status(aTHX_ imp_dbh); - fprintf(stderr, "tstatus is now %d\n", tstatus); - if (TRACE5_slow) TRC(DBILOGFP, "%sdbd_db_ping txn_status is %d\n", THEADER_slow, tstatus); if (tstatus >= 4) { /* Unknown, so we err on the side of "bad" */ @@ -474,18 +472,15 @@ int dbd_db_ping (SV * dbh) return -2; } - fprintf(stderr, "tstatus is now %d\n", tstatus); - - if (tstatus != 0 && tstatus != 2) {/* 0=idle, 1=active, 2=intrans, 3=error 4=unknown */ + if (tstatus != 0) {/* 2=active, 3=intrans, 4=inerror */ if (TEND_slow) TRC(DBILOGFP, "%sEnd dbd_pg_ping (result: %d)\n", THEADER_slow, 1+tstatus); - //return 1+tstatus; + return 1+tstatus; } /* Even though it may be reported as normal, we have to make sure by issuing a command */ status = _result(aTHX_ imp_dbh, "SELECT 'DBD::Pg ping test'"); - fprintf(stderr, "Select gave us a %d\n", status); if (PGRES_TUPLES_OK == status) { if (TEND_slow) TRC(DBILOGFP, "%sEnd dbd_pg_ping (result: 1 PGRES_TUPLES_OK)\n", THEADER_slow); return 1; @@ -2838,7 +2833,6 @@ static SV * pg_destringify_array(pTHX_ imp_dbh_t *imp_dbh, unsigned char * input } SV *sv = newSVpvn(string, section_size); - sv_2mortal(sv); // Mark as utf8 if needed (but never bytea) if (0 != strncmp(coltype->type_name, "_bytea", 6) -- 1.8.4