aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLRegionData.cs
diff options
context:
space:
mode:
authorAlexRa2010-05-18 14:28:12 +0300
committerAlexRa2010-05-19 01:33:02 +0300
commit8a0c5d14d45571c3e7529fdacea6f0483af482e5 (patch)
tree30b580dbda83e3b8e3966fa7d538d5aee8102a63 /OpenSim/Data/MySQL/MySQLRegionData.cs
parentAdded DBGuids.cs (static func DBGuid.FromDB() (diff)
downloadopensim-SC_OLD-8a0c5d14d45571c3e7529fdacea6f0483af482e5.zip
opensim-SC_OLD-8a0c5d14d45571c3e7529fdacea6f0483af482e5.tar.gz
opensim-SC_OLD-8a0c5d14d45571c3e7529fdacea6f0483af482e5.tar.bz2
opensim-SC_OLD-8a0c5d14d45571c3e7529fdacea6f0483af482e5.tar.xz
All (?) MySQL stores fixed to use DBGuid.FromDB()
This was needed if we want to update to the latest MySQL connector dll. It automatically converts CHAR(36) to Guids, so getting them as strings no longer works. By using DBGuid.FromDB(), we unlink from any particular storage format of GUIDs, could even make them BINARY(16) if we like. Actually not all MySql units are touched, but the remaining ones don't seem to be affected (they don't read GUIDs from DB)
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLRegionData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLRegionData.cs10
1 files changed, 4 insertions, 6 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs
index aa9a104..c7bddac 100644
--- a/OpenSim/Data/MySQL/MySQLRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLRegionData.cs
@@ -31,6 +31,7 @@ using System.Collections.Generic;
31using System.Data; 31using System.Data;
32using OpenMetaverse; 32using OpenMetaverse;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Data;
34using MySql.Data.MySqlClient; 35using MySql.Data.MySqlClient;
35 36
36namespace OpenSim.Data.MySQL 37namespace OpenSim.Data.MySQL
@@ -143,12 +144,9 @@ namespace OpenSim.Data.MySQL
143 RegionData ret = new RegionData(); 144 RegionData ret = new RegionData();
144 ret.Data = new Dictionary<string, object>(); 145 ret.Data = new Dictionary<string, object>();
145 146
146 UUID regionID; 147 ret.RegionID = DBGuid.FromDB(result["uuid"]);
147 UUID.TryParse(result["uuid"].ToString(), out regionID); 148 ret.ScopeID = DBGuid.FromDB(result["ScopeID"]);
148 ret.RegionID = regionID; 149
149 UUID scope;
150 UUID.TryParse(result["ScopeID"].ToString(), out scope);
151 ret.ScopeID = scope;
152 ret.RegionName = result["regionName"].ToString(); 150 ret.RegionName = result["regionName"].ToString();
153 ret.posX = Convert.ToInt32(result["locX"]); 151 ret.posX = Convert.ToInt32(result["locX"]);
154 ret.posY = Convert.ToInt32(result["locY"]); 152 ret.posY = Convert.ToInt32(result["locY"]);