MCPcopy Create free account
hub / github.com/ddnet/ddnet / MysqlInit

Function MysqlInit

src/engine/server/databases/mysql.cpp:37–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37int MysqlInit()
38{
39 dbg_assert(mysql_thread_safe(), "MySQL library without thread safety");
40 dbg_assert(g_MysqlState == MYSQLSTATE_UNINITIALIZED, "double MySQL initialization");
41 if(mysql_library_init(0, nullptr, nullptr))
42 {
43 return 1;
44 }
45 int Uninitialized = MYSQLSTATE_UNINITIALIZED;
46 bool Swapped = g_MysqlState.compare_exchange_strong(Uninitialized, MYSQLSTATE_INITIALIZED);
47 (void)Swapped;
48 dbg_assert(Swapped, "MySQL double initialization");
49 return 0;
50}
51
52void MysqlUninit()
53{

Callers 2

mainFunction · 0.85
score_test.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected