Are prepared statements thread safe?
Posted by: K R
Date: September 04, 2013 09:18AM


I am writing a multi threaded application using the mysql C API to communicate with my database. I have read the "Writing C API Threaded Client Programs" documentation here:

However, it does not discuss the use of prepared statements. Do I still need to use a mutex around my prepared statement execution and my mysql_stmt_sore_result calls?

Or are prepared statements safe to use across all threads? Note that my connection is global and shared by all prepared statements in all threads.

Thanks for the help!

Options: ReplyQuote

Written By
Are prepared statements thread safe?
September 04, 2013 09:18AM

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.