Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cursor hangs on 64 bit linux. Works for 32

Status
Not open for further replies.

jrichemont

IS-IT--Management
Feb 10, 2012
1
0
0
GB
Hi. I have an esql/c program which runs a cursor with 45 returned columns. It has worked fine on a 32 bit machine for many years but when I tried compiling it on a 64 bit one (with 64 bit informix libs) it hangs indefinately on the first fetch.

Other database activity works fine and I can make a simpler cursor in the same position in the code and that works also. My program is multi threaded and is built thus:

esql -thread -local -Isource -IC_Declarations -fPIC -xc -g -ggdb -funsigned-char -Wimplicit -Wunused -Wall -Wno-format -x c -DLINUX -DBITS="\"X64\"" -DBUILD_DATE="\"Fri 17:47 10 Feb 2012\"" -DOPEN_KEY -DNO_MTMALLOC -D_REENTRANT -I/usr/local/informix/incl/esql -I/usr/local/informix/incl/public -e -I/usr/local/informix/incl/esql source/Databases/ExportDaemon_IFX.ec -o source/Databases/ExportDaemon_IFX.c

mv ExportDaemon_IFX.c objects

g++ -Isource -IC_Declarations -fPIC -xc -g -ggdb -funsigned-char -Wimplicit -Wunused -Wall -Wno-format -x c -DLINUX -DBITS="\"X64\"" -DBUILD_DATE="\"Fri 17:47 10 Feb 2012\"" -DOPEN_KEY -DNO_MTMALLOC -D_REENTRANT -I/usr/local/informix/incl/esql -I/usr/local/informix/incl/public -DIFX_THREAD -c -o objects/ExportDaemon_IFX.o objects/ExportDaemon_IFX.c

g++ -Isource -IC_Declarations -fPIC -xc -g -ggdb -funsigned-char -Wimplicit -Wunused -Wall -Wno-format -x c -DLINUX -DBITS="\"X64\"" -DBUILD_DATE="\"Fri 17:47 10 Feb 2012\"" -DOPEN_KEY -DNO_MTMALLOC -D_REENTRANT -c -o objects/LinkDate.o source/tools/LinkDate.c

g++ -rdynamic -o products/ExportDaemon objects/ExportDaemon.o objects/ExportDaemon_IFX.o objects/LinkDate.o -Llibs -lrt -lztools -lm -lnsl -ldl -lpthread -lz -lc -Lsource/tools/libs -lconfig_X64 /usr/local/informix/lib/esql/checkapi.o -L/lib -L/usr/local/informix/lib -L/usr/local/informix/lib/esql -lthsql -lthasf -lthgen -lthos -lifgls -lpthread -lm -ldl -lcrypt -lifglx

and the cursor is this:

select ID, NVL(Market_Uid,-1), Opcode, datagroup,
NVL(text1,'~'),
NVL(text2,'~'),
NVL(text3,'~'),
NVL(text4,'~'),
NVL(text5,'~'),
NVL(text6,'~'),
NVL(text7,'~'),
NVL(text8,'~'),
NVL(text9,'~'),
'~', '~', '~', '~', '~', '~',
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
NVL(int1,-9999),
NVL(int2,-9999),
NVL(int3,-9999),
NVL(int4,-9999),
NVL(int5,-9999),
NVL(int6,-9999),
NVL(int7,-9999),
NVL(int8,-9999),
NVL(int9,-9999),
0,
' ', ' ', ' ', ' ', ' ',
0.0, 0.0, 0.0, 0.0, 0.0
from ExportGeneric3 order by ID

I traced the esql preprocessed C file and it hangs on this call:

sqli_curs_fetch(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, _Cn2, 256), (ifx_sqlda_t *)0, _SD0, (char *)0, &_FS1);

after all the binding is complete.

Any advice would be most welcome...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top