Informix - Problem description
Problem IT03924 | Status: Closed |
MEMORY ALLOCATION ERROR -208 ON OPEN CURSOR WHEN LOOPING PREPARE/DECLARE/OPEN/CLOSE WITH NO FREE | |
product: | |
INFORMIX SERVER / 5725A3900 / C10 - IDS 12.10 | |
Problem description: | |
The ESQL/C program reproduces the problem when compiled on redhat with both ESQL/C 3.50.UC3 (esql -m32 -static repro.ec -o repro) and ESQL/C 3.50.FC7 (esql -m64 -static repro.ec -o repro) The problem reproduces against IDS 12.10.FC3 on linux x86_64, but does not repro against 11.50.FC9 on same platform. The problem does not reproduce if the client sets env variable IFX_AUTOFREE=1 Given the repro.ec file below, the problem reproduces on the 4th call to do_cursor() in the $open. It does not reproduce when the second occurrence of "$EXECUTE Temp_Slot_del;" just before the return from do_cursor() is commented out. In my test, I created stores_demo via $ ifx dbaccessdemo7 stores_demo Here is the contents of the file repro.ec: *************************************** #include <stdio.h> void do_cursor() { $char demoquery[80]; $char workbuf[256]; $char queryvalue[2]; $CREATE TEMP TABLE TEMP_SLOT(c1 integer, c2 integer); sprintf(workbuf,"insert into temp_slot values(1,1)"); $PREPARE Temp_Slot_ins FROM :workbuf; $EXECUTE Temp_Slot_ins; sprintf(demoquery, "%s %s", "select fname, lname from customer", "where lname < ? "); EXEC SQL prepare demo2id from :demoquery; if (sqlca.sqlcode != 0) { printf("PREPARE error %d\n",sqlca.sqlcode); exit(4); } EXEC SQL declare demo2cursor cursor for demo2id; if (sqlca.sqlcode != 0) { printf("DECLARE error %d\n",sqlca.sqlcode); exit(4); } sprintf(queryvalue, "C"); EXEC SQL open demo2cursor using :queryvalue; if (sqlca.sqlcode != 0) { printf("OPEN error %d\n",sqlca.sqlcode); exit(4); } EXEC SQL close demo2cursor; sprintf(workbuf,"DELETE FROM TEMP_SLOT"); $PREPARE Temp_Slot_del FROM :workbuf; $EXECUTE Temp_Slot_del; $DROP TABLE TEMP_SLOT; $EXECUTE Temp_Slot_del; printf("Exeute Temp_Slot_del %d\n",sqlca.sqlcode); return; } main() { printf("DEMO2 Sample ESQL Program running.\n\n"); EXEC SQL WHENEVER ERROR STOP; EXEC SQL connect to 'stores_demo'; do_cursor(); do_cursor(); do_cursor(); do_cursor(); do_cursor(); do_cursor(); do_cursor(); do_cursor(); do_cursor(); do_cursor(); do_cursor(); do_cursor(); }; | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * Those not explicitly freeing statements * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Update to IDS-12.10.xC5 * **************************************************************** | |
Local Fix: | |
Solution | |
Problem Fixed In IDS-12.10.xC5 | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 21.08.2014 16.10.2015 16.10.2015 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
12.10.xC5 | |
12.10.xC5.W1 |