Hi!
I have created a Multhreaded Application in Pro*C (using pthreads) with about 5 Threads running simultaneously. The Application is basically to Update a Centralized Table in Oracle, which updates different rows in the Table (Each Thread updates different rows!). The problem is that it gets compiled and when I execute, I get an error.
This happens like this ...
void *thread_1(void *nothing)
{
EXEC SQL BEGIN DECLARE SECTION;
.
.
.
EXEC SQL END DECLARE SECTION;
EXEC SQL CONTEXT USE :ctx0;
EXEC SQL WHENEVER SQLERROR DO sql_error();
printf(" In Here\n");
EXEC SQL CONNECT : uid IDENTIFIED BY : pwd;
printf(" Out Here\n");
.
.
.
}
The "In Here" is displayed on the Screen, but "Out Here" message is never shown on screen, but instead, I get the message:
In Here
Stack overflow: pid 17041, proc UPDATE, addr 0x140065ff0, pc 0x1200b961c
Memory fault(coredump)
The UID/PWD is right. But when I reduse some "EXEC SQL ..." statements from the function, the program works perfecty fine!
Could someone tell me what exactly is the error and how can it be avoided.
Thanks and Regards
SHAIK