Hi guys,
I'm up to moving an application from Progress 8.3 to 9.1D and I'm having trouble.
I'm having code that looks like:
retVal = sqllogin(....); /* retVal == 0 */
EXEC SQL DECLARE myCursor CURSOR FOR
EXEC SQL BEGIN DECLARE SECTION;
char i[25];
char j[13];
char k[42];
EXEC SQL END DECLARE SECTION;
EXEC SQL WHENEVER SQLERROR GOTO err;
EXEC SQL OPEN myCursor;
EXEC SQL WHENEVER NOT FOUND GOTO done1;
while(1)
{
done1:
EXEC SQL CLOSE myCursor;
err:
......
This code has been properly compiled and it has been running on HP-UX with Progress 8.3, now, when moving it to Progress 9.1D, and compiling with the provided .o-files and libs, I keep getting coredumps.
gdb reports that it's sqlfetch() that kills me ......
(gdb) ba
#0 0x400000000028c214 in sqlfetch ()
#1 0x40000000000991cc in pat (departm=0x800003ffff581178 "70",
pro_database=0x800003ffff5812f0 "/pathtodatabasefile/db/ade/kurs/pas", resultstr=0x80000001000c63a4 "",
serverlog=0x800003ffff5aa050, threadlog=0x800003ffff5aa070) at pro_mp.c:412
#2 0x40000000000967bc in do_pat (arg=0x80000001000b77f0 "PAT 70 meltest2_syb12\n") at serv_cmds.c:664
#3 0x800003ffff715da0 in __pthread_body () from /usr/lib/pa20_64/libpthread.1
#4 0x800003ffff71f874 in __pthread_start () from /usr/lib/pa20_64/libpthread.1
(gdb) select-frame 1
(gdb) print sqlv
$1 = {0x800003ffff5814b0 "19", 0x800003ffff5814b8 "730120-XXXX", 0x800003ffff5814c8 "Sundgren, Lisa",
0x800003ffff5814f0 "-", 0x800003ffff5814f8 "D", 0x0}
(gdb) print sql0
$2 = 0x80000001000c6370 "0-9289!Sundgren, Lisa", ' ' <repeats 22 times>, "!- !D \n"
(gdb) print SQLCODE
$3 = 429497481496
(gdb) print *SQLCODE
Error accessing memory address 0x64000b7918: Bad address.
(gdb) quit
So is this me, or is there something with this transition that makes this thing crash and die on me all the time???
There seems to come out some data here, is it sqlfetch() that all of a sudden doesn't like to be called repeatedly?
SQLCODE has a very strange value ..... It is declared locally in the function that crash as
I'm up to moving an application from Progress 8.3 to 9.1D and I'm having trouble.
I'm having code that looks like:
retVal = sqllogin(....); /* retVal == 0 */
EXEC SQL DECLARE myCursor CURSOR FOR
SELECT A, B, C FROM FOO
UNION
SELECT FOO,BAR,BAZ FROM FROTZ
UNION
SELECT GNOME,KDE,CDE FROM DESKTOP
ORDER BY 3,2;
and a little later in my pc-file,UNION
SELECT FOO,BAR,BAZ FROM FROTZ
UNION
SELECT GNOME,KDE,CDE FROM DESKTOP
ORDER BY 3,2;
EXEC SQL BEGIN DECLARE SECTION;
char i[25];
char j[13];
char k[42];
EXEC SQL END DECLARE SECTION;
EXEC SQL WHENEVER SQLERROR GOTO err;
EXEC SQL OPEN myCursor;
EXEC SQL WHENEVER NOT FOUND GOTO done1;
while(1)
{
EXEC SQL FETCH myCursor INTO :i,:j,:k;
sprintf(outputResult, "%s %s %s", i, j, k);
}sprintf(outputResult, "%s %s %s", i, j, k);
done1:
EXEC SQL CLOSE myCursor;
err:
......
This code has been properly compiled and it has been running on HP-UX with Progress 8.3, now, when moving it to Progress 9.1D, and compiling with the provided .o-files and libs, I keep getting coredumps.
gdb reports that it's sqlfetch() that kills me ......
(gdb) ba
#0 0x400000000028c214 in sqlfetch ()
#1 0x40000000000991cc in pat (departm=0x800003ffff581178 "70",
pro_database=0x800003ffff5812f0 "/pathtodatabasefile/db/ade/kurs/pas", resultstr=0x80000001000c63a4 "",
serverlog=0x800003ffff5aa050, threadlog=0x800003ffff5aa070) at pro_mp.c:412
#2 0x40000000000967bc in do_pat (arg=0x80000001000b77f0 "PAT 70 meltest2_syb12\n") at serv_cmds.c:664
#3 0x800003ffff715da0 in __pthread_body () from /usr/lib/pa20_64/libpthread.1
#4 0x800003ffff71f874 in __pthread_start () from /usr/lib/pa20_64/libpthread.1
(gdb) select-frame 1
(gdb) print sqlv
$1 = {0x800003ffff5814b0 "19", 0x800003ffff5814b8 "730120-XXXX", 0x800003ffff5814c8 "Sundgren, Lisa",
0x800003ffff5814f0 "-", 0x800003ffff5814f8 "D", 0x0}
(gdb) print sql0
$2 = 0x80000001000c6370 "0-9289!Sundgren, Lisa", ' ' <repeats 22 times>, "!- !D \n"
(gdb) print SQLCODE
$3 = 429497481496
(gdb) print *SQLCODE
Error accessing memory address 0x64000b7918: Bad address.
(gdb) quit
So is this me, or is there something with this transition that makes this thing crash and die on me all the time???
There seems to come out some data here, is it sqlfetch() that all of a sudden doesn't like to be called repeatedly?
SQLCODE has a very strange value ..... It is declared locally in the function that crash as
long SQLCODE;
I hope that somebody can help me with this one .....