I'm confused by manual's tutorial for threading. I don't believe I need any of the thread-safe measures, because while the worker thread is running, the main thread doesn't make any MySQL calls. So the only issue I should be facing is getting the connection to work in a different thread, and not worry about synchronization . This is the code I have for my worker thread:
verify(mysql_li brary_init(-1, NULL, NULL) == 0);
verify(mysql_th read_init()...