We're currently experiencing a problem under Solaris 2.3 using Informix
OnLine 5.02.UC2, ESQL/C 4.12.UC1, JAM 5.04e and JAM DBi 5.10h.
Because of the large number of online concurrent users we may potentially
have, we close the database, and kill the user's sqlturbo (via sqlexit())
if the user hasn't hit the keyboard in a certain amount of time (default
7 minutes). The next time the user hits a key, we re-open the database,
which re-execs the sqlturbo process. Our database accesses are performed
via a combination of JAM DBi calls and ESQL/C library routines. In the
ESQL/C routines, we prepare the statements and cursors we'll need, and keep
them around until the sqlturbo is brought down, when we free any outstanding
statements or cursors.
Here's the ESQL/C calls (minus error checks) we use to bring down
$ free <open_stmts>;
$ close database;
The problem is that once the sqlturbo gets killed & re-started and freed
statements get re-prepared, after a little bit of running, prepared
statments that previously had been working fine start returning -254
Informix errors (too many or too few host variables given), even though
the number of host variables passed is definately the correct number.
It's as if something is scrogging some Informix structure somewhere, such
that it's confused about the currently prepared statments.
Has anyone else ever seen this behavior? I can easily reproduce it
using JAM, but I haven't been able to reproduce it using straight ESQL/C.
Also, this all worked fine under Informix 4.10.UG1 and JAM DBi 4.8 (in that
version, JYACC gave out their ESQL/C source, which they no longer do), but
somehow broke in the port to Solaris 2.3.
Any ideas anyone might have would be greatly appreciated!
AT&T Bell Labs