From a517e597f5960e5ce5eeea89e9087ac32a42bf06 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 28 Apr 2013 09:03:09 -0700 Subject: [PATCH] Fix wrong sql statement in offline im. --- OpenSim/Data/MySQL/MySQLOfflineIMData.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/OpenSim/Data/MySQL/MySQLOfflineIMData.cs b/OpenSim/Data/MySQL/MySQLOfflineIMData.cs index 252f358b7c..bafd204a32 100644 --- a/OpenSim/Data/MySQL/MySQLOfflineIMData.cs +++ b/OpenSim/Data/MySQL/MySQLOfflineIMData.cs @@ -47,13 +47,10 @@ namespace OpenSim.Data.MySQL public void DeleteOld() { - uint now = (uint)Util.UnixTimeSinceEpoch(); - using (MySqlCommand cmd = new MySqlCommand()) { - cmd.CommandText = String.Format("delete from {0} where TMStamp < ?tstamp", m_Realm); - cmd.Parameters.AddWithValue("?tstamp", now - 14 * 24 * 60 * 60); // > 2 weeks old - + cmd.CommandText = String.Format("delete from {0} where TMStamp < NOW() - INTERVAL 2 WEEK", m_Realm); + ExecuteNonQuery(cmd); }