Core/DBLayer: Make database interaction after create character packet completely asynchronous. This is more performant and fixes a DoS loophole and possible data desynchronisation caused by spamming this packet.

Closes #584
Closes #2089
This commit is contained in:
Machiavelli committed 2011-06-22 14:22:08 +02:00
1 parent 5c85d43030
commit fe8cb75bf1
12 files changed
+379 -228

No files matched your search

@@ -44,4 +44,5 @@ void LoginDatabaseConnection::DoPrepareStatements()
PREPARE_STATEMENT(LOGIN_SET_ACCOUNT_NOT_BANNED, "UPDATE account_banned SET active = 0 WHERE id = ? AND active != 0", CONNECTION_ASYNC)
PREPARE_STATEMENT(LOGIN_DEL_REALMCHARACTERS, "DELETE FROM realmcharacters WHERE acctid = ? AND realmid = ?", CONNECTION_ASYNC)
PREPARE_STATEMENT(LOGIN_ADD_REALMCHARACTERS, "INSERT INTO realmcharacters (numchars, acctid, realmid) VALUES (?, ?, ?)", CONNECTION_ASYNC)
PREPARE_STATEMENT(LOGIN_GET_SUM_REALMCHARS, "SELECT SUM(numchars) FROM realmcharacters WHERE acctid = ?", CONNECTION_ASYNC);
}