aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
authorMelanie2013-04-29 00:38:20 +0100
committerMelanie2013-04-29 00:38:20 +0100
commit7c729e1519add75bd11b998b5d1709d351d82d29 (patch)
tree1069522b2d63041966d9b66b399fa94597a38d51 /OpenSim/Data
parentMerge branch 'master' into careminster (diff)
parentFix wrong sql statement in offline im. (diff)
downloadopensim-SC-7c729e1519add75bd11b998b5d1709d351d82d29.zip
opensim-SC-7c729e1519add75bd11b998b5d1709d351d82d29.tar.gz
opensim-SC-7c729e1519add75bd11b998b5d1709d351d82d29.tar.bz2
opensim-SC-7c729e1519add75bd11b998b5d1709d351d82d29.tar.xz
Merge branch 'master' into careminster
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