aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDiva Canto2013-04-28 09:03:09 -0700
committerDiva Canto2013-04-28 09:03:09 -0700
commita517e597f5960e5ce5eeea89e9087ac32a42bf06 (patch)
tree71f683d03c26cf5ec993fb969350e8be8cc582af
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC-a517e597f5960e5ce5eeea89e9087ac32a42bf06.zip
opensim-SC-a517e597f5960e5ce5eeea89e9087ac32a42bf06.tar.gz
opensim-SC-a517e597f5960e5ce5eeea89e9087ac32a42bf06.tar.bz2
opensim-SC-a517e597f5960e5ce5eeea89e9087ac32a42bf06.tar.xz
Fix wrong sql statement in offline im.
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/MySQLOfflineIMData.cs7
1 files changed, 2 insertions, 5 deletions
diff --git a/OpenSim/Data/MySQL/MySQLOfflineIMData.cs b/OpenSim/Data/MySQL/MySQLOfflineIMData.cs
index 252f358..bafd204 100644
--- a/OpenSim/Data/MySQL/MySQLOfflineIMData.cs
+++ b/OpenSim/Data/MySQL/MySQLOfflineIMData.cs
@@ -47,13 +47,10 @@ namespace OpenSim.Data.MySQL
47 47
48 public void DeleteOld() 48 public void DeleteOld()
49 { 49 {
50 uint now = (uint)Util.UnixTimeSinceEpoch();
51
52 using (MySqlCommand cmd = new MySqlCommand()) 50 using (MySqlCommand cmd = new MySqlCommand())
53 { 51 {
54 cmd.CommandText = String.Format("delete from {0} where TMStamp < ?tstamp", m_Realm); 52 cmd.CommandText = String.Format("delete from {0} where TMStamp < NOW() - INTERVAL 2 WEEK", m_Realm);
55 cmd.Parameters.AddWithValue("?tstamp", now - 14 * 24 * 60 * 60); // > 2 weeks old 53
56
57 ExecuteNonQuery(cmd); 54 ExecuteNonQuery(cmd);
58 } 55 }
59 56