diff options
author | AlexRa | 2010-05-18 14:28:12 +0300 |
---|---|---|
committer | AlexRa | 2010-05-19 01:33:02 +0300 |
commit | 8a0c5d14d45571c3e7529fdacea6f0483af482e5 (patch) | |
tree | 30b580dbda83e3b8e3966fa7d538d5aee8102a63 /OpenSim/Data/MySQL/MySQLRegionData.cs | |
parent | Added DBGuids.cs (static func DBGuid.FromDB() (diff) | |
download | opensim-SC-8a0c5d14d45571c3e7529fdacea6f0483af482e5.zip opensim-SC-8a0c5d14d45571c3e7529fdacea6f0483af482e5.tar.gz opensim-SC-8a0c5d14d45571c3e7529fdacea6f0483af482e5.tar.bz2 opensim-SC-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 '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLRegionData.cs | 10 |
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; | |||
31 | using System.Data; | 31 | using System.Data; |
32 | using OpenMetaverse; | 32 | using OpenMetaverse; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Data; | ||
34 | using MySql.Data.MySqlClient; | 35 | using MySql.Data.MySqlClient; |
35 | 36 | ||
36 | namespace OpenSim.Data.MySQL | 37 | namespace 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"]); |