using libmysqlclient_r.so i.e c mysql connector. as per current arch, In thread1 for connection1 prepared stmt will be created and cached . next for thread2 connection2 cached prepared stmt will be reused.
after executing, program throws segmentation fault at random location.
Note: If I keep only one thread and execute then it never throws segmentation fault.
I didn't not find anything in mysql documentation about it, even though I followed all the necessary steps as given under : http://dev.mysql.com/doc/refman/4.1/en/threaded-clients.html
Please suggest if sharing of prepare stmts across the thread is problem ??