ankursaxena
Programmer
Hi!
I have a program which creats multiple threads of a function, each of the funtion create a connection, run the query and close connection and continues doing that in an infinite loop. i dont understand why this procedure gives a segmentation fault core dump, sometimes bus error core dump. when i run the same program and only create 1 thread, no problem, but as soon as i create 3,4,5 thread, it starts cribbing at random times. generally the error is in run_query function creating some new memory as it uses my_malloc function.
this lead to conclusion that the lib provided my mysql install is not thread safe,is this correct, or am i doing something wrong, i doubt i am, cuz i have checked it with process, single threads, but no problem with that, only in multi thread senario, the problem occurs, someone please help.
thanx a ton.
Ankur
I have a program which creats multiple threads of a function, each of the funtion create a connection, run the query and close connection and continues doing that in an infinite loop. i dont understand why this procedure gives a segmentation fault core dump, sometimes bus error core dump. when i run the same program and only create 1 thread, no problem, but as soon as i create 3,4,5 thread, it starts cribbing at random times. generally the error is in run_query function creating some new memory as it uses my_malloc function.
this lead to conclusion that the lib provided my mysql install is not thread safe,is this correct, or am i doing something wrong, i doubt i am, cuz i have checked it with process, single threads, but no problem with that, only in multi thread senario, the problem occurs, someone please help.
thanx a ton.
Ankur