diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Data.MySQL/MySQLDataStore.cs | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs index 1938fe3..dcf7adc 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs | |||
@@ -149,7 +149,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
149 | DataTable prims = m_primTable; | 149 | DataTable prims = m_primTable; |
150 | DataTable shapes = m_shapeTable; | 150 | DataTable shapes = m_shapeTable; |
151 | 151 | ||
152 | string selectExp = "SceneGroupID = '" + obj.ToString() + "'"; | 152 | string selectExp = "SceneGroupID = '" + Util.ToRawUuidString(obj) + "'"; |
153 | lock (m_dataSet) | 153 | lock (m_dataSet) |
154 | { | 154 | { |
155 | DataRow[] primRows = prims.Select(selectExp); | 155 | DataRow[] primRows = prims.Select(selectExp); |
@@ -177,7 +177,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
177 | DataTable prims = m_primTable; | 177 | DataTable prims = m_primTable; |
178 | DataTable shapes = m_shapeTable; | 178 | DataTable shapes = m_shapeTable; |
179 | 179 | ||
180 | string byRegion = "RegionUUID = '" + regionUUID.ToString() + "'"; | 180 | string byRegion = "RegionUUID = '" + Util.ToRawUuidString(regionUUID) + "'"; |
181 | string orderByParent = "ParentID ASC"; | 181 | string orderByParent = "ParentID ASC"; |
182 | 182 | ||
183 | lock (m_dataSet) | 183 | lock (m_dataSet) |
@@ -258,7 +258,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
258 | using (cmd) | 258 | using (cmd) |
259 | { | 259 | { |
260 | 260 | ||
261 | cmd.Parameters.Add(new MySqlParameter("?RegionUUID", regionID.ToString())); | 261 | cmd.Parameters.Add(new MySqlParameter("?RegionUUID", Util.ToRawUuidString(regionID))); |
262 | cmd.Parameters.Add(new MySqlParameter("?Revision", revision)); | 262 | cmd.Parameters.Add(new MySqlParameter("?Revision", revision)); |
263 | cmd.Parameters.Add(new MySqlParameter("?Heightfield", serializeTerrain(ter))); | 263 | cmd.Parameters.Add(new MySqlParameter("?Heightfield", serializeTerrain(ter))); |
264 | cmd.ExecuteNonQuery(); | 264 | cmd.ExecuteNonQuery(); |
@@ -277,7 +277,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
277 | , m_connection); | 277 | , m_connection); |
278 | 278 | ||
279 | MySqlParameter param = new MySqlParameter(); | 279 | MySqlParameter param = new MySqlParameter(); |
280 | cmd.Parameters.Add(new MySqlParameter("?RegionUUID", regionID.ToString())); | 280 | cmd.Parameters.Add(new MySqlParameter("?RegionUUID", Util.ToRawUuidString(regionID))); |
281 | 281 | ||
282 | if (m_connection.State != ConnectionState.Open) | 282 | if (m_connection.State != ConnectionState.Open) |
283 | { | 283 | { |
@@ -317,13 +317,13 @@ namespace OpenSim.Framework.Data.MySQL | |||
317 | { | 317 | { |
318 | using (MySqlCommand cmd = new MySqlCommand("delete from land where UUID=?UUID", m_connection)) | 318 | using (MySqlCommand cmd = new MySqlCommand("delete from land where UUID=?UUID", m_connection)) |
319 | { | 319 | { |
320 | cmd.Parameters.Add(new MySqlParameter("?UUID", globalID.ToString())); | 320 | cmd.Parameters.Add(new MySqlParameter("?UUID", Util.ToRawUuidString(globalID))); |
321 | cmd.ExecuteNonQuery(); | 321 | cmd.ExecuteNonQuery(); |
322 | } | 322 | } |
323 | 323 | ||
324 | using (MySqlCommand cmd = new MySqlCommand("delete from landaccesslist where LandUUID=?UUID", m_connection)) | 324 | using (MySqlCommand cmd = new MySqlCommand("delete from landaccesslist where LandUUID=?UUID", m_connection)) |
325 | { | 325 | { |
326 | cmd.Parameters.Add(new MySqlParameter("?UUID", globalID.ToString())); | 326 | cmd.Parameters.Add(new MySqlParameter("?UUID", Util.ToRawUuidString(globalID))); |
327 | cmd.ExecuteNonQuery(); | 327 | cmd.ExecuteNonQuery(); |
328 | } | 328 | } |
329 | } | 329 | } |
@@ -336,7 +336,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
336 | DataTable land = m_landTable; | 336 | DataTable land = m_landTable; |
337 | DataTable landaccesslist = m_landAccessListTable; | 337 | DataTable landaccesslist = m_landAccessListTable; |
338 | 338 | ||
339 | DataRow landRow = land.Rows.Find(parcel.landData.globalID.ToString()); | 339 | DataRow landRow = land.Rows.Find(Util.ToRawUuidString(parcel.landData.globalID)); |
340 | if (landRow == null) | 340 | if (landRow == null) |
341 | { | 341 | { |
342 | landRow = land.NewRow(); | 342 | landRow = land.NewRow(); |
@@ -350,7 +350,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
350 | 350 | ||
351 | using (MySqlCommand cmd = new MySqlCommand("delete from landaccesslist where LandUUID=?LandUUID", m_connection)) | 351 | using (MySqlCommand cmd = new MySqlCommand("delete from landaccesslist where LandUUID=?LandUUID", m_connection)) |
352 | { | 352 | { |
353 | cmd.Parameters.Add(new MySqlParameter("?LandUUID", parcel.landData.globalID.ToString())); | 353 | cmd.Parameters.Add(new MySqlParameter("?LandUUID", Util.ToRawUuidString(parcel.landData.globalID))); |
354 | cmd.ExecuteNonQuery(); | 354 | cmd.ExecuteNonQuery(); |
355 | } | 355 | } |
356 | 356 | ||
@@ -373,12 +373,12 @@ namespace OpenSim.Framework.Data.MySQL | |||
373 | { | 373 | { |
374 | DataTable land = m_landTable; | 374 | DataTable land = m_landTable; |
375 | DataTable landaccesslist = m_landAccessListTable; | 375 | DataTable landaccesslist = m_landAccessListTable; |
376 | string searchExp = "RegionUUID = '" + regionUUID.ToString() + "'"; | 376 | string searchExp = "RegionUUID = '" + Util.ToRawUuidString(regionUUID) + "'"; |
377 | DataRow[] rawDataForRegion = land.Select(searchExp); | 377 | DataRow[] rawDataForRegion = land.Select(searchExp); |
378 | foreach (DataRow rawDataLand in rawDataForRegion) | 378 | foreach (DataRow rawDataLand in rawDataForRegion) |
379 | { | 379 | { |
380 | LandData newLand = buildLandData(rawDataLand); | 380 | LandData newLand = buildLandData(rawDataLand); |
381 | string accessListSearchExp = "LandUUID = '" + newLand.globalID.ToString() + "'"; | 381 | string accessListSearchExp = "LandUUID = '" + Util.ToRawUuidString(newLand.globalID) + "'"; |
382 | DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp); | 382 | DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp); |
383 | foreach (DataRow rawDataLandAccess in rawDataForLandAccessList) | 383 | foreach (DataRow rawDataLandAccess in rawDataForLandAccessList) |
384 | { | 384 | { |
@@ -801,8 +801,8 @@ namespace OpenSim.Framework.Data.MySQL | |||
801 | 801 | ||
802 | private void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) | 802 | private void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) |
803 | { | 803 | { |
804 | row["UUID"] = land.globalID.ToString(); | 804 | row["UUID"] = Util.ToRawUuidString(land.globalID); |
805 | row["RegionUUID"] = regionUUID.ToString(); | 805 | row["RegionUUID"] = Util.ToRawUuidString(regionUUID); |
806 | row["LocalLandID"] = land.localID; | 806 | row["LocalLandID"] = land.localID; |
807 | 807 | ||
808 | // Bitmap is a byte[512] | 808 | // Bitmap is a byte[512] |
@@ -810,25 +810,25 @@ namespace OpenSim.Framework.Data.MySQL | |||
810 | 810 | ||
811 | row["Name"] = land.landName; | 811 | row["Name"] = land.landName; |
812 | row["Description"] = land.landDesc; | 812 | row["Description"] = land.landDesc; |
813 | row["OwnerUUID"] = land.ownerID.ToString(); | 813 | row["OwnerUUID"] = Util.ToRawUuidString(land.ownerID); |
814 | row["IsGroupOwned"] = land.isGroupOwned; | 814 | row["IsGroupOwned"] = land.isGroupOwned; |
815 | row["Area"] = land.area; | 815 | row["Area"] = land.area; |
816 | row["AuctionID"] = land.auctionID; //Unemplemented | 816 | row["AuctionID"] = land.auctionID; //Unemplemented |
817 | row["Category"] = land.category; //Enum libsecondlife.Parcel.ParcelCategory | 817 | row["Category"] = land.category; //Enum libsecondlife.Parcel.ParcelCategory |
818 | row["ClaimDate"] = land.claimDate; | 818 | row["ClaimDate"] = land.claimDate; |
819 | row["ClaimPrice"] = land.claimPrice; | 819 | row["ClaimPrice"] = land.claimPrice; |
820 | row["GroupUUID"] = land.groupID.ToString(); | 820 | row["GroupUUID"] = Util.ToRawUuidString(land.groupID); |
821 | row["SalePrice"] = land.salePrice; | 821 | row["SalePrice"] = land.salePrice; |
822 | row["LandStatus"] = land.landStatus; //Enum. libsecondlife.Parcel.ParcelStatus | 822 | row["LandStatus"] = land.landStatus; //Enum. libsecondlife.Parcel.ParcelStatus |
823 | row["LandFlags"] = land.landFlags; | 823 | row["LandFlags"] = land.landFlags; |
824 | row["LandingType"] = land.landingType; | 824 | row["LandingType"] = land.landingType; |
825 | row["MediaAutoScale"] = land.mediaAutoScale; | 825 | row["MediaAutoScale"] = land.mediaAutoScale; |
826 | row["MediaTextureUUID"] = land.mediaID.ToString(); | 826 | row["MediaTextureUUID"] = Util.ToRawUuidString(land.mediaID); |
827 | row["MediaURL"] = land.mediaURL; | 827 | row["MediaURL"] = land.mediaURL; |
828 | row["MusicURL"] = land.musicURL; | 828 | row["MusicURL"] = land.musicURL; |
829 | row["PassHours"] = land.passHours; | 829 | row["PassHours"] = land.passHours; |
830 | row["PassPrice"] = land.passPrice; | 830 | row["PassPrice"] = land.passPrice; |
831 | row["SnapshotUUID"] = land.snapshotID.ToString(); | 831 | row["SnapshotUUID"] = Util.ToRawUuidString(land.snapshotID); |
832 | row["UserLocationX"] = land.userLocation.X; | 832 | row["UserLocationX"] = land.userLocation.X; |
833 | row["UserLocationY"] = land.userLocation.Y; | 833 | row["UserLocationY"] = land.userLocation.Y; |
834 | row["UserLocationZ"] = land.userLocation.Z; | 834 | row["UserLocationZ"] = land.userLocation.Z; |
@@ -839,8 +839,8 @@ namespace OpenSim.Framework.Data.MySQL | |||
839 | 839 | ||
840 | private void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, LLUUID parcelID) | 840 | private void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, LLUUID parcelID) |
841 | { | 841 | { |
842 | row["LandUUID"] = parcelID.ToString(); | 842 | row["LandUUID"] = Util.ToRawUuidString(parcelID); |
843 | row["AccessUUID"] = entry.AgentID.ToString(); | 843 | row["AccessUUID"] = Util.ToRawUuidString(entry.AgentID); |
844 | row["Flags"] = entry.Flags; | 844 | row["Flags"] = entry.Flags; |
845 | } | 845 | } |
846 | 846 | ||