Front-end growth with a describe statement.
Posted in 1992
We've recently discovered something that is TOTALLY undocumented, that may explain front-end growth. The situation is where you use ESQL, and do not know the exact number/type of variables in the row. In that case, you can use a describe statement into a sqlda POINTER. It turns out that the describe is a library call, and this library does a MALLOC, to set up a sqlda structure that your pointer now points to. [ With 20/20 hindsight, this makes sense, since a POINTER must point to something substantial. The problem, however, was that ESQL has always been a black-box, with the inner workings hidden. We did not expect that a library would have undocumented side-effects. ] This malloced memory is NOT freed when you close/ $ free the cursor associated with the describe. Instead, the user is EXPECTED to do a normal C library free of the sqlda pointer. NOTE of course, that if you use describe only once, then it's not a problem. If, however, you do MANY describes, then you may experience unusual growth until your server exits [ours do not]. Note that this is NOT common knowledge even among Informix support personnel. Standard disclaimers apply, Ihor Kinal att!cbnewsh!ijk att!trumpet!ijk