From fa3f9e9ed37d02187f363465e545b905c0f94023 Mon Sep 17 00:00:00 2001 From: "Stephen R. van den Berg" <srb@cuci.nl> Date: Tue, 22 May 2018 15:33:09 +0200 Subject: [PATCH] pgsql: Fix unitialised mode regression from last commit. --- lib/modules/Sql.pmod/pgsql_util.pmod | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/modules/Sql.pmod/pgsql_util.pmod b/lib/modules/Sql.pmod/pgsql_util.pmod index 50aba734ea..f70e3a256b 100644 --- a/lib/modules/Sql.pmod/pgsql_util.pmod +++ b/lib/modules/Sql.pmod/pgsql_util.pmod @@ -469,14 +469,14 @@ class conxion { describe_backtrace(nostash->current_locking_thread()->backtrace())); #endif while (lock = (waitforreal ? nostash->lock : nostash->trylock)(1)) { - int mode; stashcount->wait_till_drained(); #ifdef PG_DEBUGRACE conxsess sess = conxsess(this); #endif started = lock; - lock = 0; // Force release before acquiring next - if (sizeof(stash) && getstash(KEEP) > KEEP) + lock = 0; // Release often, release early + int mode; + if (sizeof(stash) && (mode = getstash(KEEP)) > KEEP) sendcmd(mode); // Force out stash to the server #ifdef PG_DEBUGRACE return sess; -- GitLab