Online Server 7.20 Segfaults when nesting cursors.
Posted in 1998
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Data Types & Schema Design
I'm running version 7.20UC of Informix Online Server, on an SGI origin 200, running Irix 6.4. I can get it to crash consistently by performing a particular action in a client ESQL/C program. The server's log says it caught a signal 11 (yikes!) and shut down. Here's the code that does it (in pseudocode): We have only 2 tables in the database: call them 'outer' and 'inner'. 'outer' looks like this: uniqueID integer PRIMARY KEY column1 varchar(127) column2 TEXT 'inner' looks like this: uniqueID integer column1 float Now, I have code that cursors over one table, and then cursors over the other in a nested loop inside, like so: while not done fetching | | fetch a row from the outer table into local host variables. | | while not done fetching | | | | fetch the next row from the inner table who's uniqueID matches | | the uniqueID of the outer table row we just selected above. | | (There can be many such rows per uniqueID, hence this | | inner cursor loop.) | | | | | end - while | end - while Whenever I do this, it *consistently* crashes the Online Server. It seems to only happen when the outer table contains a TEXT field. If I do the exact same code, but I don't select the TEXT column in the outer select, it does not crash. Note that it is *NOT* the ESQL/C program that crashes, but the SERVER. (So changes to the way I handle the text blob in C have proved irrelevant to the bug - it happens when I use my own allocated memory, when I have ESQL allocate it for me, whatever.) So, my question is this: has anyone else had the same problem? Has this beeen fixed in a newer version (if not it's not worth buying the newer version.) -- Steve Mading: madings@execpc.com http://www.execpc.com/~madings