diff options
author | Bruce Momjian | 2002-09-23 01:43:23 +0000 |
---|---|---|
committer | Bruce Momjian | 2002-09-23 01:43:23 +0000 |
commit | f9a1ea6fa7fa07616aad12625031ff328624ed4a (patch) | |
tree | 85e7bbb6918611dcaa5c195b135f5e105dd80fe2 /src | |
parent | 2816141978adb83b263c40e3b45f428e9bff7a5a (diff) |
Obviously noone has ever tested the doubling of availiable result ids
up to
reaching the hard limit. After opening 16(=current REST_START value)
results via pg_exec, the next pg_exec tries to find an empty slot
forever :-( . In PgSetResultId file pgtclId.c in the for loop there
has to be done a break, if res_max ist reached. The piece of code
should look like
if (resid == connid->res_max)
{
resid = 0;
break; /* the break as to be added */
}
now everything works (double available results after reaching
RES_START up to reaching RES_HARD_MAX)
Gerhard Hintermayer
Diffstat (limited to 'src')
-rw-r--r-- | src/interfaces/libpgtcl/pgtclId.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/interfaces/libpgtcl/pgtclId.c b/src/interfaces/libpgtcl/pgtclId.c index 21875036469..f3465069b1e 100644 --- a/src/interfaces/libpgtcl/pgtclId.c +++ b/src/interfaces/libpgtcl/pgtclId.c @@ -13,7 +13,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclId.c,v 1.35 2002/09/04 20:31:46 momjian Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclId.c,v 1.36 2002/09/23 01:43:23 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -343,7 +343,10 @@ PgSetResultId(Tcl_Interp *interp, char *connid_c, PGresult *res) for (resid = connid->res_last + 1; resid != connid->res_last; resid++) { if (resid == connid->res_max) + { resid = 0; + break; + } if (!connid->results[resid]) { connid->res_last = resid; |