pike.git/
lib/
modules/
Sql.pmod/
pgsql_util.pmod
Branch:
Tag:
Non-build tags
All tags
No tags
2020-06-22
2020-06-22 12:03:34 by Stephen R. van den Berg <srb@cuci.nl>
ad7334129a563b0bd72fef9e6b6a7cb8b19b0c5c (
13
lines) (+
7
/-
6
)
[
Show
|
Annotate
]
Branch:
8.0
pgsql: Terminate early if the processloop has already folded.
1784:
final int _fetchlimit = FETCHLIMIT; final MUTEX unnamedportalmux; final MUTEX unnamedstatement;
-
private Thread.MutexKey termlock;
+
private Thread.MutexKey
|int
termlock;
final Thread.ResourceCount portalsinflight, statementsinflight; final int(0..1) wasparallelisable; final int(0..1) intransaction;
1960:
if (catch(cs = ci->start())) { destruct(waitforauthready); unnamedstatement = 0;
-
termlock =
0
;
+
termlock =
1
;
return; } else { CHAIN(cs)->add_hstring(plugbuffer, 4, 4);
2668:
portal->_purgeportal(); } destruct(waitforauthready);
-
termlock =
0
;
+
termlock =
1
;
if (err && !stringp(err)) throw(err); }; catch { unnamedstatement = 0;
-
termlock =
0
;
+
termlock =
1
;
if (err) { PD("Terminating processloop due to %s\n", describe_backtrace(err)); delayederror = err;
2688:
throwdelayederror(this); { Thread.MutexKey lock;
-
if (unnamedstatement)
+
if (unnamedstatement
&& !termlock
)
termlock = unnamedstatement->lock(1); foreach (c->runningportals; sql_result result; ) if (result->_state < CLOSED)