Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
From mysql 5.1 documentation: http://dev.mysql.com/doc/refman/5.1/en/threaded-clients.html * Two threads can't send a query to the MySQL server at the same time on the same connection. In particular, you have to ensure that between calls to mysql_query() and mysql_store_result() no other thread is using the same connection. * Many threads can access different result sets that are retrieved with mysql_store_result(). * If you use mysql_use_result(), you must ensure that no other thread is using the same connection until the result set is closed. However, it really is best for threaded clients that share the same connection to use mysql_store_result() So, create a pthread mutex around calls to mysql_real_query. Only support mysql_store_result for async mode.
- Loading branch information
Showing
1 changed file
with
21 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters