MCPcopy Create free account
hub / github.com/Tencent/phxsql / InitLibrary

Method InitLibrary

phxsqlclient/phxsqlclientbase.cpp:248–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248void PhxSQLClientBase::InitLibrary() {
249 static bool init = false;
250 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
251 if (!init) {
252 pthread_mutex_lock(&mutex);
253 if (!init) {
254 mysql_library_init(0, NULL, NULL);
255 init = true;
256 }
257 pthread_mutex_unlock(&mutex);
258 }
259}
260
261//random version
262PhxSQLClient_Random::PhxSQLClient_Random(const char *pcUser, const char *pcPasswd, const char *pcDB,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected