mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #6197
6197: Fix teamranks not getting removed or moved out of _backup table r=heinrich5991 a=Zwelf Fixes #6194 ## Checklist - [x] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test (especially base/) or added coverage to integration test - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: Zwelf <zwelf@strct.cc>
This commit is contained in:
commit
e1de476fa2
|
@ -548,7 +548,7 @@ bool CScoreWorker::SaveTeamScore(IDbConnection *pSqlServer, const ISqlData *pGam
|
|||
if(w == Write::NORMAL_SUCCEEDED)
|
||||
{
|
||||
str_format(aBuf, sizeof(aBuf),
|
||||
"DELETE FROM %s_teamrace_backup WHERE GameId=?",
|
||||
"DELETE FROM %s_teamrace_backup WHERE ID=?",
|
||||
pSqlServer->GetPrefix());
|
||||
if(pSqlServer->PrepareStatement(aBuf, pError, ErrorSize))
|
||||
{
|
||||
|
@ -576,7 +576,7 @@ bool CScoreWorker::SaveTeamScore(IDbConnection *pSqlServer, const ISqlData *pGam
|
|||
CUuid TeamrankId = pData->m_TeamrankUuid;
|
||||
|
||||
str_format(aBuf, sizeof(aBuf),
|
||||
"INSERT INTO %s_teamrace SELECT * FROM %s_teamrace_backup WHERE GameId=?",
|
||||
"INSERT INTO %s_teamrace SELECT * FROM %s_teamrace_backup WHERE ID=?",
|
||||
pSqlServer->GetPrefix(), pSqlServer->GetPrefix());
|
||||
if(pSqlServer->PrepareStatement(aBuf, pError, ErrorSize))
|
||||
{
|
||||
|
@ -590,7 +590,7 @@ bool CScoreWorker::SaveTeamScore(IDbConnection *pSqlServer, const ISqlData *pGam
|
|||
}
|
||||
|
||||
str_format(aBuf, sizeof(aBuf),
|
||||
"DELETE FROM %s_teamrace_backup WHERE GameId=?",
|
||||
"DELETE FROM %s_teamrace_backup WHERE ID=?",
|
||||
pSqlServer->GetPrefix());
|
||||
if(pSqlServer->PrepareStatement(aBuf, pError, ErrorSize))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue