Apply fix

This commit is contained in:
Brian M. Carlson 2020-10-08 10:37:00 -05:00
parent e006b039bf
commit 73b940a1e2
2 changed files with 2 additions and 2 deletions

View File

@ -142,7 +142,7 @@ class Query extends EventEmitter {
// the docs here: https://www.postgresql.org/docs/9.6/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY
// say "Therefore, an Execute phase is always terminated by the appearance of exactly one of these messages: CommandComplete, EmptyQueryResponse (if the portal was created from an empty query string), ErrorResponse, or PortalSuspended."
maybeSync(connection) {
if (this.isPreparedStatement) {
if (this.isPreparedStatement && !this._hasSentSync) {
this._hasSentSync = true
connection.sync()
}

View File

@ -6,7 +6,7 @@ suite.testAsync('timeout causing query crashes', async () => {
const client = new helper.Client()
await client.connect()
await client.query('CREATE TEMP TABLE foobar( name TEXT NOT NULL, id SERIAL)')
client.query('BEGIN')
await client.query('BEGIN')
await client.query("SET LOCAL statement_timeout TO '1ms'")
let count = 0
while (count++ < 5000) {