From 8b6005666dc10ba6acb423c7ad936b8b290fd6ee Mon Sep 17 00:00:00 2001 From: n0n4m3 Date: Wed, 14 Apr 2010 13:02:05 +0400 Subject: Add index for some tables in characters DB. by AlexDereka. --HG-- branch : trunk --- src/game/GlobalEvents.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/game/GlobalEvents.cpp') diff --git a/src/game/GlobalEvents.cpp b/src/game/GlobalEvents.cpp index 9f72e96936c..300527aad73 100644 --- a/src/game/GlobalEvents.cpp +++ b/src/game/GlobalEvents.cpp @@ -75,7 +75,7 @@ static void CorpsesErase(bool bones,uint32 delay) { ///- Get the list of eligible corpses/bones to be removed //No SQL injection (uint32 and enum) - CharacterDatabase.AsyncPQuery(&CorpsesEraseCallBack, bones, "SELECT guid,position_x,position_y,map,player FROM corpse WHERE UNIX_TIMESTAMP()-time > '%u' AND corpse_type %s '0'", delay, (bones ? "=" : "<>")); + CharacterDatabase.AsyncPQuery(&CorpsesEraseCallBack, bones, "SELECT guid,position_x,position_y,map,player FROM corpse WHERE time < (UNIX_TIMESTAMP()+'%u') AND corpse_type %s '0'", delay, (bones ? "=" : "<>")); } /// not thread guarded variant for call from other thread -- cgit v1.2.3