C UDR crashes the server
Posted in 2007
Hi all, This is pretty long, but if you have time to skim it and if you've seen something like this I'd appreciate a pointer in the right direction. I've researched this and I think there's some bad memory related issues here. I've also found several links to known issues in earlier versions of Informix that were supposedly fixed...but maybe not. Thanks in advance for your time! :-) I've written a C UDR that's trying to just select from a table containing one row. The select is "select * from ing_property;" . When this is called via mi_exec with a valid connection (MI_CONNECTION*), as in: #define ING_TEST_SQL "select * from ing_property;" mi_string* sqlString; sqlString = (char*)ING_TEST_SQL; fprintf(stderr,"IngParseInput.c::IngGetProperties - query is '%s'\\n",s qlString); if (conn == NULL) { fprintf(stderr,"Conn was null in IngParseInput.c\\n") ; } else { fprintf(stderr,"Conn was not null in IngParseInput.c\\n"); } if ( MI_ERROR == mi_exec(conn, sqlString, MI_QUERY_NORMAL) ) { //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< FAILS HERE fprintf(stderr,"IngParseInput.c::IngGetProperties - query failed\\n"); mi_db_error_raise(conn, MI_EXCEPTION, "mi_exec failed\\n"); } else { fprintf(stderr,"IngParseInput.c::IngGetProperties - getting nextrow of the query\\r\\n"); oneRow = mi_next_row(conn,&error) ; /* handle fields in oneRow */ ..... } The code fails on the mi_exec statement every time. Below you'll see a trace of the fprintf statements I have in my code... Note that it gets to the mi_exec statement and then appears to print a license line over and over and the server crashes. I'm using a trial version to write something for a customer that has the full, paid for version. This code comes straight from an example in the Datablade programmers guide. bash-2.05b# encryptVarchar - enteredconnected to db, getting dbInfoUser is informixIngIdxIcspInit.c::checking IngIcspReady... IngIdxIcspInit.c::initializing IngInputDef IngIdxIcspInit.c::IS NOT NULL!!! IngIdxIcspInit.c::stepping into IngGetProperties IngParseInput.c::IngGetProperties - entering IngParseInput.c::IngGetProperties - logging a msg, an Ing_Init is 360 bytes IngParseInput.c::IngGetProperties - inputDef was not null, moving on IngParseInput.c::IngGetProperties - logging a msg2 IngParseInput.c::IngGetProperties - logging a msg3 IngParseInput.c::IngGetProperties - logging a msg4 IngParseInput.c::IngGetProperties - query is 'select * from ing_property;' Conn was not null in IngParseInput.c Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00 Your evaluation license will expire on 2007-11-25 16:00:00@@NL