From d7f0de3f2956136a1d7d34ab24271723eebe2e63 Mon Sep 17 00:00:00 2001 From: heinrich5991 Date: Sat, 27 Feb 2021 22:34:44 +0100 Subject: [PATCH 1/2] Use `ExecuteUpdate` instead of `Step` for `INSERT INTO` Forgot an instance of this in mysql.cpp in the previous commit. --- src/engine/server/databases/mysql.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/server/databases/mysql.cpp b/src/engine/server/databases/mysql.cpp index de58d870a..542915757 100644 --- a/src/engine/server/databases/mysql.cpp +++ b/src/engine/server/databases/mysql.cpp @@ -647,8 +647,8 @@ bool CMysqlConnection::AddPoints(const char *pPlayer, int Points, char *pError, BindString(1, pPlayer); BindInt(2, Points); BindInt(3, Points); - bool End; - if(Step(&End, pError, ErrorSize)) + int NumUpdated; + if(ExecuteUpdate(&NumUpdated, pError, ErrorSize)) { return true; } From dd964316cb8fea332325988bc70b285f083534ad Mon Sep 17 00:00:00 2001 From: heinrich5991 Date: Sat, 27 Feb 2021 22:35:44 +0100 Subject: [PATCH 2/2] Fix duplicate teamranks getting inserted There was a logic error that caused the loop to never execute. --- src/game/server/score.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/server/score.cpp b/src/game/server/score.cpp index ebc7c9d08..0a0a54638 100644 --- a/src/game/server/score.cpp +++ b/src/game/server/score.cpp @@ -686,7 +686,7 @@ bool CScore::SaveTeamScoreThread(IDbConnection *pSqlServer, const ISqlData *pGam } if(!End) { - bool SearchTeamEnd = true; + bool SearchTeamEnd = false; while(!SearchTeamEnd) { Time = pSqlServer->GetFloat(3);