From 547741ae6aac6cec4b7c7a724d746a30c2ade465 Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Tue, 1 Jan 2019 17:08:56 -0600 Subject: [PATCH] Fix bug with ready for query counter --- pgconn.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgconn.go b/pgconn.go index d7a99676..1e70a82b 100644 --- a/pgconn.go +++ b/pgconn.go @@ -382,7 +382,6 @@ func (pgConn *PgConn) SendExecParams(sql string, paramValues [][]byte, paramOIDs pgConn.batchBuf = (&pgproto3.Parse{Query: sql, ParameterOIDs: paramOIDs}).Encode(pgConn.batchBuf) pgConn.SendExecPrepared("", paramValues, paramFormats, resultFormats) - pgConn.batchCount += 1 } // SendExecPrepared enqueues the execution of a prepared statement via the PostgreSQL extended query protocol. @@ -708,6 +707,7 @@ func (pgConn *PgConn) bufferLastResult(ctx context.Context) (*PgResult, error) { CommandTag: commandTag, } } + if result == nil { return nil, errors.New("unexpected missing result") }