home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / database / informix / 2391 < prev    next >
Encoding:
Text File  |  1992-11-11  |  1.5 KB  |  46 lines

  1. Newsgroups: comp.databases.informix
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!att-out!cbnewsh!ijk
  3. From: ijk@cbnewsh.cb.att.com (ihor.j.kinal)
  4. Subject: Front-end growth with a describe statement.
  5. Organization: AT&T
  6. Date: Wed, 11 Nov 1992 21:10:32 GMT
  7. Message-ID: <1992Nov11.211032.14274@cbnewsh.cb.att.com>
  8. Lines: 36
  9.  
  10. We've recently discovered something that is TOTALLY undocumented,
  11. that may explain front-end growth.  
  12.  
  13. The situation is where you use ESQL, and do not know the
  14. exact number/type of variables in the row.  In that case,
  15. you can use a describe statement into a sqlda POINTER.
  16.  
  17. It turns out that the describe is a library call, and this
  18. library does a MALLOC, to set up a sqlda structure that
  19. your pointer now points to. [ With 20/20 hindsight, this
  20. makes sense, since a POINTER must point to something substantial.
  21. The problem, however, was that ESQL has always been a black-box,
  22. with the inner workings hidden.  We did not expect that a library
  23. would have undocumented side-effects. ]
  24.  
  25.  
  26. This malloced memory is NOT freed when you close/ $ free
  27. the cursor associated with the describe.  Instead, the
  28. user is EXPECTED to do a normal C library free of the
  29. sqlda pointer.
  30.  
  31.  
  32. NOTE of course, that if you use describe only once, then it's
  33. not a problem.  If, however, you do MANY describes,
  34. then you may experience unusual growth until your server exits
  35. [ours do not].
  36.  
  37.  
  38. Note that this is NOT common knowledge even among Informix
  39. support personnel. 
  40.  
  41.  
  42. Standard disclaimers apply,
  43. Ihor Kinal
  44. att!cbnewsh!ijk
  45. att!trumpet!ijk
  46.