Skip to content

Commit

Permalink
Core/Database: removed unused prepared statements
Browse files Browse the repository at this point in the history
  • Loading branch information
joschiwald committed Sep 24, 2016
1 parent 3cd28ee commit c8a1859
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/server/database/Database/Implementation/LoginDatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,8 @@ void LoginDatabaseConnection::DoPrepareStatements()
PrepareStatement(LOGIN_SEL_BNET_MAX_ACCOUNT_INDEX, "SELECT MAX(battlenet_index) FROM account WHERE battlenet_account = ?", CONNECTION_SYNCH);

PrepareStatement(LOGIN_UPD_BNET_FAILED_LOGINS, "UPDATE battlenet_accounts SET failed_logins = failed_logins + 1 WHERE id = ?", CONNECTION_ASYNC);
PrepareStatement(LOGIN_SEL_BNET_FAILED_LOGINS, "SELECT failed_logins FROM battlenet_accounts WHERE id = ?", CONNECTION_SYNCH);
PrepareStatement(LOGIN_INS_BNET_ACCOUNT_AUTO_BANNED, "INSERT INTO battlenet_account_bans(id, bandate, unbandate, bannedby, banreason) VALUES(?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?, 'Trinity Auth', 'Failed login autoban')", CONNECTION_ASYNC);
PrepareStatement(LOGIN_DEL_BNET_EXPIRED_ACCOUNT_BANNED, "DELETE FROM battlenet_account_bans WHERE unbandate<>bandate AND unbandate<=UNIX_TIMESTAMP()", CONNECTION_ASYNC);
PrepareStatement(LOGIN_SEL_BNET_ACCOUNT_BANNED_BY_ID, "SELECT * FROM battlenet_account_bans WHERE id = ?", CONNECTION_SYNCH);
PrepareStatement(LOGIN_UPD_BNET_RESET_FAILED_LOGINS, "UPDATE battlenet_accounts SET failed_logins = 0 WHERE id = ?", CONNECTION_ASYNC);

PrepareStatement(LOGIN_SEL_LAST_CHAR_UNDELETE, "SELECT LastCharacterUndelete FROM battlenet_accounts WHERE Id = ?", CONNECTION_ASYNC);
Expand Down
2 changes: 0 additions & 2 deletions src/server/database/Database/Implementation/LoginDatabase.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,8 @@ enum LoginDatabaseStatements
LOGIN_SEL_BNET_MAX_ACCOUNT_INDEX,

LOGIN_UPD_BNET_FAILED_LOGINS,
LOGIN_SEL_BNET_FAILED_LOGINS,
LOGIN_INS_BNET_ACCOUNT_AUTO_BANNED,
LOGIN_DEL_BNET_EXPIRED_ACCOUNT_BANNED,
LOGIN_SEL_BNET_ACCOUNT_BANNED_BY_ID,
LOGIN_UPD_BNET_RESET_FAILED_LOGINS,

LOGIN_SEL_LAST_CHAR_UNDELETE,
Expand Down

0 comments on commit c8a1859

Please sign in to comment.