aboutsummaryrefslogtreecommitdiff
path: root/src/server/authserver/Main.cpp
diff options
context:
space:
mode:
authorMachiavelli <none@none>2010-06-28 16:09:16 +0200
committerMachiavelli <none@none>2010-06-28 16:09:16 +0200
commitfb4d4514e53a6dcd2704c957a8904be8bf02034b (patch)
tree770484072d04753a03d451d896f74e8150194fad /src/server/authserver/Main.cpp
parentb6e180c17c0626a665cd189075e9d9b7f4b48d0d (diff)
Add prepared statement example for auth server ping
--HG-- branch : trunk
Diffstat (limited to 'src/server/authserver/Main.cpp')
-rw-r--r--src/server/authserver/Main.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp
index 46ea2b38212..28757e914e3 100644
--- a/src/server/authserver/Main.cpp
+++ b/src/server/authserver/Main.cpp
@@ -24,6 +24,7 @@
#include "Common.h"
#include "Database/DatabaseEnv.h"
+#include "Database/PreparedStatements.h"
#include "Configuration/ConfigEnv.h"
#include "Log.h"
@@ -313,7 +314,7 @@ extern int main(int argc, char **argv)
{
loopCounter = 0;
sLog.outDetail("Ping MySQL to keep connection alive");
- LoginDatabase.Query("SELECT 1 FROM realmlist LIMIT 1");
+ sPreparedStatement.Query(&LoginDatabase, "auth_ping");
}
#ifdef _WIN32
if (m_ServiceStatus == 0) stopEvent = true;
@@ -345,6 +346,10 @@ bool StartDB()
return false;
}
LoginDatabase.ThreadStart();
+
+ uint32 count = 0;
+ sPreparedStatement.LoadAuthserver(&LoginDatabase, count);
+ sLog.outString("Loaded %u prepared MySQL statements for auth DB.", count);
return true;
}