what I want to know is that is mysql_query or other mysql function in C api thread-safe with the following conditions:
1. using the libmysqlclient.so but not the libmysqlclient_r.so
2. in every thread, call mysql_init and mysql_real_connect within the protect of an global mutex to get one mysql connection every thread
3. call mysql_query or other mysql function without the protect of the global mutex using each thread's own mysql connection
is this thread-safe ?
well I think it is, and from what I have tested, it seems it is thread-safe.
but I just not sure. can anyone tell me?
thank you very much
1. using the libmysqlclient.so but not the libmysqlclient_r.so
2. in every thread, call mysql_init and mysql_real_connect within the protect of an global mutex to get one mysql connection every thread
3. call mysql_query or other mysql function without the protect of the global mutex using each thread's own mysql connection
is this thread-safe ?
well I think it is, and from what I have tested, it seems it is thread-safe.
but I just not sure. can anyone tell me?
thank you very much