MySQL Forums
Forum List  »  General

Client library and threads
Posted by: Chris Slominski
Date: October 26, 2004 08:12AM

I am using the MySQL client library in a threaded program, but all calls to MySQL 'C' API functions are performed within one thread. My simple connect and query block works as expected when I place it in the main thread. If I paste it to another thread and run, I get a core dump. I have tried linking both the mysqlclient and mysqlclient_r libraries and see no difference. I have read the section on creating a threaded application within the MySQL rerference manual, but I don't fully understand the ramifications of using the 'C' API in a threaded program. Since I am not sharing a connection between threads, I don't see how this differs from using MySQL in a nin-threaded application. What does it care which threads uses the API? I am running on a HPUX (UNIX) platform using POSIX threads. Could someone advise me of the situation or steer me to some more detailed MySQL information?

Thanks,
Chris

Options: ReplyQuote


Subject
Written By
Posted
Client library and threads
October 26, 2004 08:12AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.