mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
Apply fix
This commit is contained in:
parent
e006b039bf
commit
73b940a1e2
@ -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()
|
||||
}
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user