After reading the docs it's still unclear to me what the correct usage is. Should one:
- Call
mysql_init()andmysql_real_connect()once at startup, before thread creation, and all threads share theMYSQLhandle returned frommysql_real_connect(). - Call
mysql_init()once at startup, before thread creation, and then each thread callsmysql_real_connect()to get a thread specificMYSQLhandle. - Each thread calls
mysql_init()andmysql_real_connect(). - Something else?