diff options
author | Jonathan Freedman | 2010-10-17 18:45:25 -0400 |
---|---|---|
committer | Jonathan Freedman | 2010-10-17 18:45:25 -0400 |
commit | 4e4fb93fae6c13ca6c6ac521991c4e4969b0fe65 (patch) | |
tree | 79142f2364b658f52b63e3ae688a5521290e2a4f /OpenSim/Data | |
parent | * more url / hg cleanup (diff) | |
parent | Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-4e4fb93fae6c13ca6c6ac521991c4e4969b0fe65.zip opensim-SC_OLD-4e4fb93fae6c13ca6c6ac521991c4e4969b0fe65.tar.gz opensim-SC_OLD-4e4fb93fae6c13ca6c6ac521991c4e4969b0fe65.tar.bz2 opensim-SC_OLD-4e4fb93fae6c13ca6c6ac521991c4e4969b0fe65.tar.xz |
Merge branch 'master' of git://opensimulator.org/git/opensim
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLPresenceData.cs | 6 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLSimulationData.cs | 1 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/Presence.migrations | 8 |
3 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Data/MySQL/MySQLPresenceData.cs b/OpenSim/Data/MySQL/MySQLPresenceData.cs index 71caa1a..2390feb 100644 --- a/OpenSim/Data/MySQL/MySQLPresenceData.cs +++ b/OpenSim/Data/MySQL/MySQLPresenceData.cs | |||
@@ -78,9 +78,12 @@ namespace OpenSim.Data.MySQL | |||
78 | if (pd.Length == 0) | 78 | if (pd.Length == 0) |
79 | return false; | 79 | return false; |
80 | 80 | ||
81 | if (regionID == UUID.Zero) | ||
82 | return false; | ||
83 | |||
81 | MySqlCommand cmd = new MySqlCommand(); | 84 | MySqlCommand cmd = new MySqlCommand(); |
82 | 85 | ||
83 | cmd.CommandText = String.Format("update {0} set RegionID=?RegionID where `SessionID`=?SessionID", m_Realm); | 86 | cmd.CommandText = String.Format("update {0} set RegionID=?RegionID, LastSeen=NOW() where `SessionID`=?SessionID", m_Realm); |
84 | 87 | ||
85 | cmd.Parameters.AddWithValue("?SessionID", sessionID.ToString()); | 88 | cmd.Parameters.AddWithValue("?SessionID", sessionID.ToString()); |
86 | cmd.Parameters.AddWithValue("?RegionID", regionID.ToString()); | 89 | cmd.Parameters.AddWithValue("?RegionID", regionID.ToString()); |
@@ -90,6 +93,5 @@ namespace OpenSim.Data.MySQL | |||
90 | 93 | ||
91 | return true; | 94 | return true; |
92 | } | 95 | } |
93 | |||
94 | } | 96 | } |
95 | } | 97 | } |
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index 3450e2f..e2b6953 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs | |||
@@ -424,6 +424,7 @@ namespace OpenSim.Data.MySQL | |||
424 | cmd.CommandText = | 424 | cmd.CommandText = |
425 | "SELECT * FROM prims LEFT JOIN primshapes ON prims.UUID = primshapes.UUID WHERE RegionUUID = ?RegionUUID"; | 425 | "SELECT * FROM prims LEFT JOIN primshapes ON prims.UUID = primshapes.UUID WHERE RegionUUID = ?RegionUUID"; |
426 | cmd.Parameters.AddWithValue("RegionUUID", regionID.ToString()); | 426 | cmd.Parameters.AddWithValue("RegionUUID", regionID.ToString()); |
427 | cmd.CommandTimeout = 3600; | ||
427 | 428 | ||
428 | using (IDataReader reader = ExecuteReader(cmd)) | 429 | using (IDataReader reader = ExecuteReader(cmd)) |
429 | { | 430 | { |
diff --git a/OpenSim/Data/MySQL/Resources/Presence.migrations b/OpenSim/Data/MySQL/Resources/Presence.migrations index 91f7de5..1075a15 100644 --- a/OpenSim/Data/MySQL/Resources/Presence.migrations +++ b/OpenSim/Data/MySQL/Resources/Presence.migrations | |||
@@ -13,3 +13,11 @@ CREATE UNIQUE INDEX SessionID ON Presence(SessionID); | |||
13 | CREATE INDEX UserID ON Presence(UserID); | 13 | CREATE INDEX UserID ON Presence(UserID); |
14 | 14 | ||
15 | COMMIT; | 15 | COMMIT; |
16 | |||
17 | :VERSION 1 # -------------------------- | ||
18 | |||
19 | BEGIN; | ||
20 | |||
21 | ALTER TABLE `Presence` ADD COLUMN LastSeen timestamp; | ||
22 | |||
23 | COMMIT; | ||