diff options
author | Justin Clarke Casey | 2007-12-20 19:13:34 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2007-12-20 19:13:34 +0000 |
commit | f1ebe79824aa82fa30af35d07bf6720e719cd741 (patch) | |
tree | 18f43d04bdf2547dd66274a96f22c85171fc892a /OpenSim | |
parent | Establish Util.ToRawUuidString to get LLUUIDs in unhyphenated form (diff) | |
download | opensim-SC-f1ebe79824aa82fa30af35d07bf6720e719cd741.zip opensim-SC-f1ebe79824aa82fa30af35d07bf6720e719cd741.tar.gz opensim-SC-f1ebe79824aa82fa30af35d07bf6720e719cd741.tar.bz2 opensim-SC-f1ebe79824aa82fa30af35d07bf6720e719cd741.tar.xz |
Fix up other sqlite db interactions to use non-hyphenated uuid
Inventory contents retrieval and persistent region storage standalone now appear to work as well as they did before :)
This patch will not fix grid problems.
May be bugs present due to conversions I didn't spot.
I personally probably don't have any more time for this today. I'm also not entirely convinced this is the right way forward
so this might be a handy pause for thought. I'll also be delighted if I wake up tommorrow and everything is fine again.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs | 10 | ||||
-rw-r--r-- | OpenSim/Framework/Data.SQLite/SQLiteGridData.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/Data.SQLite/SQLiteUserData.cs | 12 | ||||
-rw-r--r-- | OpenSim/Framework/Util.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs | 68 |
5 files changed, 48 insertions, 48 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs index bf43e6e..6199911 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs | |||
@@ -79,7 +79,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
79 | public AssetBase FetchAsset(LLUUID uuid) | 79 | public AssetBase FetchAsset(LLUUID uuid) |
80 | { | 80 | { |
81 | AssetBase asset = new AssetBase(); | 81 | AssetBase asset = new AssetBase(); |
82 | DataRow row = ds.Tables["assets"].Rows.Find(uuid); | 82 | DataRow row = ds.Tables["assets"].Rows.Find(Util.ToRawUuidString(uuid)); |
83 | if (row != null) | 83 | if (row != null) |
84 | { | 84 | { |
85 | return buildAsset(row); | 85 | return buildAsset(row); |
@@ -103,7 +103,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
103 | DataTable assets = ds.Tables["assets"]; | 103 | DataTable assets = ds.Tables["assets"]; |
104 | lock (ds) | 104 | lock (ds) |
105 | { | 105 | { |
106 | DataRow row = assets.Rows.Find(asset.FullID); | 106 | DataRow row = assets.Rows.Find(Util.ToRawUuidString(asset.FullID)); |
107 | if (row == null) | 107 | if (row == null) |
108 | { | 108 | { |
109 | row = assets.NewRow(); | 109 | row = assets.NewRow(); |
@@ -130,7 +130,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
130 | 130 | ||
131 | public bool ExistsAsset(LLUUID uuid) | 131 | public bool ExistsAsset(LLUUID uuid) |
132 | { | 132 | { |
133 | DataRow row = ds.Tables["assets"].Rows.Find(uuid); | 133 | DataRow row = ds.Tables["assets"].Rows.Find(Util.ToRawUuidString(uuid)); |
134 | return (row != null); | 134 | return (row != null); |
135 | } | 135 | } |
136 | 136 | ||
@@ -138,7 +138,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
138 | { | 138 | { |
139 | lock (ds) | 139 | lock (ds) |
140 | { | 140 | { |
141 | DataRow row = ds.Tables["assets"].Rows.Find(uuid); | 141 | DataRow row = ds.Tables["assets"].Rows.Find(Util.ToRawUuidString(uuid)); |
142 | if (row != null) | 142 | if (row != null) |
143 | { | 143 | { |
144 | row.Delete(); | 144 | row.Delete(); |
@@ -210,7 +210,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
210 | 210 | ||
211 | private void fillAssetRow(DataRow row, AssetBase asset) | 211 | private void fillAssetRow(DataRow row, AssetBase asset) |
212 | { | 212 | { |
213 | row["UUID"] = asset.FullID; | 213 | row["UUID"] = Util.ToRawUuidString(asset.FullID); |
214 | row["Name"] = asset.Name; | 214 | row["Name"] = asset.Name; |
215 | if (asset.Description != null) | 215 | if (asset.Description != null) |
216 | { | 216 | { |
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs b/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs index dddc085..bb16a3e 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs | |||
@@ -119,7 +119,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
119 | public RegionProfileData GetProfileByLLUUID(LLUUID uuid) | 119 | public RegionProfileData GetProfileByLLUUID(LLUUID uuid) |
120 | { | 120 | { |
121 | Dictionary<string, string> param = new Dictionary<string, string>(); | 121 | Dictionary<string, string> param = new Dictionary<string, string>(); |
122 | param["uuid"] = uuid.ToString(); | 122 | param["uuid"] = Util.ToRawUuidString(uuid); |
123 | 123 | ||
124 | IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param); | 124 | IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param); |
125 | IDataReader reader = result.ExecuteReader(); | 125 | IDataReader reader = result.ExecuteReader(); |
@@ -190,7 +190,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
190 | SHA512Managed HashProvider = new SHA512Managed(); | 190 | SHA512Managed HashProvider = new SHA512Managed(); |
191 | ASCIIEncoding TextProvider = new ASCIIEncoding(); | 191 | ASCIIEncoding TextProvider = new ASCIIEncoding(); |
192 | 192 | ||
193 | byte[] stream = TextProvider.GetBytes(uuid.ToString() + ":" + handle.ToString() + ":" + challenge); | 193 | byte[] stream = TextProvider.GetBytes(Util.ToRawUuidString(uuid) + ":" + handle.ToString() + ":" + challenge); |
194 | byte[] hash = HashProvider.ComputeHash(stream); | 194 | byte[] hash = HashProvider.ComputeHash(stream); |
195 | 195 | ||
196 | return false; | 196 | return false; |
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs index 99121be..461cd08 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs | |||
@@ -77,11 +77,11 @@ namespace OpenSim.Framework.Data.SQLite | |||
77 | { | 77 | { |
78 | lock (ds) | 78 | lock (ds) |
79 | { | 79 | { |
80 | DataRow row = ds.Tables["users"].Rows.Find(uuid); | 80 | DataRow row = ds.Tables["users"].Rows.Find(Util.ToRawUuidString(uuid)); |
81 | if (row != null) | 81 | if (row != null) |
82 | { | 82 | { |
83 | UserProfileData user = buildUserProfile(row); | 83 | UserProfileData user = buildUserProfile(row); |
84 | row = ds.Tables["useragents"].Rows.Find(uuid); | 84 | row = ds.Tables["useragents"].Rows.Find(Util.ToRawUuidString(uuid)); |
85 | if (row != null) | 85 | if (row != null) |
86 | { | 86 | { |
87 | user.currentAgent = buildUserAgent(row); | 87 | user.currentAgent = buildUserAgent(row); |
@@ -105,7 +105,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
105 | if (rows.Length > 0) | 105 | if (rows.Length > 0) |
106 | { | 106 | { |
107 | UserProfileData user = buildUserProfile(rows[0]); | 107 | UserProfileData user = buildUserProfile(rows[0]); |
108 | DataRow row = ds.Tables["useragents"].Rows.Find(user.UUID); | 108 | DataRow row = ds.Tables["useragents"].Rows.Find(Util.ToRawUuidString(user.UUID)); |
109 | if (row != null) | 109 | if (row != null) |
110 | { | 110 | { |
111 | user.currentAgent = buildUserAgent(row); | 111 | user.currentAgent = buildUserAgent(row); |
@@ -220,7 +220,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
220 | DataTable users = ds.Tables["users"]; | 220 | DataTable users = ds.Tables["users"]; |
221 | lock (ds) | 221 | lock (ds) |
222 | { | 222 | { |
223 | DataRow row = users.Rows.Find(user.UUID); | 223 | DataRow row = users.Rows.Find(Util.ToRawUuidString(user.UUID)); |
224 | if (row == null) | 224 | if (row == null) |
225 | { | 225 | { |
226 | row = users.NewRow(); | 226 | row = users.NewRow(); |
@@ -238,7 +238,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
238 | if (user.currentAgent != null) | 238 | if (user.currentAgent != null) |
239 | { | 239 | { |
240 | DataTable ua = ds.Tables["useragents"]; | 240 | DataTable ua = ds.Tables["useragents"]; |
241 | row = ua.Rows.Find(user.UUID); | 241 | row = ua.Rows.Find(Util.ToRawUuidString(user.UUID)); |
242 | if (row == null) | 242 | if (row == null) |
243 | { | 243 | { |
244 | row = ua.NewRow(); | 244 | row = ua.NewRow(); |
@@ -255,7 +255,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
255 | // I just added this to help the standalone login situation. | 255 | // I just added this to help the standalone login situation. |
256 | //It still needs to be looked at by a Database guy | 256 | //It still needs to be looked at by a Database guy |
257 | DataTable ua = ds.Tables["useragents"]; | 257 | DataTable ua = ds.Tables["useragents"]; |
258 | row = ua.Rows.Find(user.UUID); | 258 | row = ua.Rows.Find(Util.ToRawUuidString(user.UUID)); |
259 | 259 | ||
260 | if (row == null) | 260 | if (row == null) |
261 | { | 261 | { |
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 0b05eac..1c8f273 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -385,7 +385,7 @@ namespace OpenSim.Framework | |||
385 | } | 385 | } |
386 | 386 | ||
387 | /// <summary> | 387 | /// <summary> |
388 | /// Convert an LLUUID to a raw uuid string. This is a string without hyphens. | 388 | /// Convert an LLUUID to a raw uuid string. Right now this is a string without hyphens. |
389 | /// </summary> | 389 | /// </summary> |
390 | /// <param name="lluuid"></param> | 390 | /// <param name="lluuid"></param> |
391 | /// <returns></returns> | 391 | /// <returns></returns> |
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs index 721c08e..bf521bd 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs | |||
@@ -175,12 +175,12 @@ namespace OpenSim.DataStore.MonoSqlite | |||
175 | if ((prim.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) == 0) | 175 | if ((prim.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) == 0) |
176 | { | 176 | { |
177 | MainLog.Instance.Verbose("DATASTORE", "Adding obj: " + obj.UUID + " to region: " + regionUUID); | 177 | MainLog.Instance.Verbose("DATASTORE", "Adding obj: " + obj.UUID + " to region: " + regionUUID); |
178 | addPrim(prim, obj.UUID, regionUUID); | 178 | addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID)); |
179 | } | 179 | } |
180 | else if (Stopped(prim)) | 180 | else if (Stopped(prim)) |
181 | { | 181 | { |
182 | MainLog.Instance.Verbose("DATASTORE", "Adding stopped obj: " + obj.UUID + " to region: " + regionUUID); | 182 | MainLog.Instance.Verbose("DATASTORE", "Adding stopped obj: " + obj.UUID + " to region: " + regionUUID); |
183 | addPrim(prim, obj.UUID, regionUUID); | 183 | addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID)); |
184 | } | 184 | } |
185 | else | 185 | else |
186 | { | 186 | { |
@@ -199,7 +199,7 @@ namespace OpenSim.DataStore.MonoSqlite | |||
199 | DataTable prims = ds.Tables["prims"]; | 199 | DataTable prims = ds.Tables["prims"]; |
200 | DataTable shapes = ds.Tables["primshapes"]; | 200 | DataTable shapes = ds.Tables["primshapes"]; |
201 | 201 | ||
202 | string selectExp = "SceneGroupID = '" + obj.ToString() + "'"; | 202 | string selectExp = "SceneGroupID = '" + Util.ToRawUuidString(obj) + "'"; |
203 | lock (ds) | 203 | lock (ds) |
204 | { | 204 | { |
205 | DataRow[] primRows = prims.Select(selectExp); | 205 | DataRow[] primRows = prims.Select(selectExp); |
@@ -227,7 +227,7 @@ namespace OpenSim.DataStore.MonoSqlite | |||
227 | DataTable prims = ds.Tables["prims"]; | 227 | DataTable prims = ds.Tables["prims"]; |
228 | DataTable shapes = ds.Tables["primshapes"]; | 228 | DataTable shapes = ds.Tables["primshapes"]; |
229 | 229 | ||
230 | string byRegion = "RegionUUID = '" + regionUUID.ToString() + "'"; | 230 | string byRegion = "RegionUUID = '" + Util.ToRawUuidString(regionUUID) + "'"; |
231 | string orderByParent = "ParentID ASC"; | 231 | string orderByParent = "ParentID ASC"; |
232 | 232 | ||
233 | lock (ds) | 233 | lock (ds) |
@@ -246,7 +246,7 @@ namespace OpenSim.DataStore.MonoSqlite | |||
246 | { | 246 | { |
247 | SceneObjectGroup group = new SceneObjectGroup(); | 247 | SceneObjectGroup group = new SceneObjectGroup(); |
248 | SceneObjectPart prim = buildPrim(primRow); | 248 | SceneObjectPart prim = buildPrim(primRow); |
249 | DataRow shapeRow = shapes.Rows.Find(prim.UUID); | 249 | DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(prim.UUID)); |
250 | if (shapeRow != null) | 250 | if (shapeRow != null) |
251 | { | 251 | { |
252 | prim.Shape = buildShape(shapeRow); | 252 | prim.Shape = buildShape(shapeRow); |
@@ -260,13 +260,13 @@ namespace OpenSim.DataStore.MonoSqlite | |||
260 | group.AddPart(prim); | 260 | group.AddPart(prim); |
261 | group.RootPart = prim; | 261 | group.RootPart = prim; |
262 | 262 | ||
263 | createdObjects.Add(group.UUID, group); | 263 | createdObjects.Add(Util.ToRawUuidString(group.UUID), group); |
264 | retvals.Add(group); | 264 | retvals.Add(group); |
265 | } | 265 | } |
266 | else | 266 | else |
267 | { | 267 | { |
268 | SceneObjectPart prim = buildPrim(primRow); | 268 | SceneObjectPart prim = buildPrim(primRow); |
269 | DataRow shapeRow = shapes.Rows.Find(prim.UUID); | 269 | DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(prim.UUID)); |
270 | if (shapeRow != null) | 270 | if (shapeRow != null) |
271 | { | 271 | { |
272 | prim.Shape = buildShape(shapeRow); | 272 | prim.Shape = buildShape(shapeRow); |
@@ -310,7 +310,7 @@ namespace OpenSim.DataStore.MonoSqlite | |||
310 | 310 | ||
311 | using(SqliteCommand cmd = new SqliteCommand(sql, conn)) | 311 | using(SqliteCommand cmd = new SqliteCommand(sql, conn)) |
312 | { | 312 | { |
313 | cmd.Parameters.Add(new SqliteParameter(":RegionUUID", regionID.ToString())); | 313 | cmd.Parameters.Add(new SqliteParameter(":RegionUUID", Util.ToRawUuidString(regionID))); |
314 | cmd.Parameters.Add(new SqliteParameter(":Revision", revision)); | 314 | cmd.Parameters.Add(new SqliteParameter(":Revision", revision)); |
315 | cmd.Parameters.Add(new SqliteParameter(":Heightfield", serializeTerrain(ter))); | 315 | cmd.Parameters.Add(new SqliteParameter(":Heightfield", serializeTerrain(ter))); |
316 | cmd.ExecuteNonQuery(); | 316 | cmd.ExecuteNonQuery(); |
@@ -325,7 +325,7 @@ namespace OpenSim.DataStore.MonoSqlite | |||
325 | 325 | ||
326 | using(SqliteCommand cmd = new SqliteCommand("delete from terrain where RegionUUID=:RegionUUID and Revision < :Revision", conn)) | 326 | using(SqliteCommand cmd = new SqliteCommand("delete from terrain where RegionUUID=:RegionUUID and Revision < :Revision", conn)) |
327 | { | 327 | { |
328 | cmd.Parameters.Add(new SqliteParameter(":RegionUUID", regionID.ToString())); | 328 | cmd.Parameters.Add(new SqliteParameter(":RegionUUID", Util.ToRawUuidString(regionID))); |
329 | cmd.Parameters.Add(new SqliteParameter(":Revision", revision)); | 329 | cmd.Parameters.Add(new SqliteParameter(":Revision", revision)); |
330 | cmd.ExecuteNonQuery(); | 330 | cmd.ExecuteNonQuery(); |
331 | } | 331 | } |
@@ -348,7 +348,7 @@ namespace OpenSim.DataStore.MonoSqlite | |||
348 | 348 | ||
349 | using (SqliteCommand cmd = new SqliteCommand(sql, conn)) | 349 | using (SqliteCommand cmd = new SqliteCommand(sql, conn)) |
350 | { | 350 | { |
351 | cmd.Parameters.Add(new SqliteParameter(":RegionUUID", regionID.ToString())); | 351 | cmd.Parameters.Add(new SqliteParameter(":RegionUUID", Util.ToRawUuidString(regionID))); |
352 | 352 | ||
353 | using (IDataReader row = cmd.ExecuteReader()) | 353 | using (IDataReader row = cmd.ExecuteReader()) |
354 | { | 354 | { |
@@ -390,13 +390,13 @@ namespace OpenSim.DataStore.MonoSqlite | |||
390 | 390 | ||
391 | using (SqliteCommand cmd = new SqliteCommand("delete from land where UUID=:UUID", conn)) | 391 | using (SqliteCommand cmd = new SqliteCommand("delete from land where UUID=:UUID", conn)) |
392 | { | 392 | { |
393 | cmd.Parameters.Add(new SqliteParameter(":UUID", globalID.ToString())); | 393 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(globalID))); |
394 | cmd.ExecuteNonQuery(); | 394 | cmd.ExecuteNonQuery(); |
395 | } | 395 | } |
396 | 396 | ||
397 | using (SqliteCommand cmd = new SqliteCommand("delete from landaccesslist where LandUUID=:UUID", conn)) | 397 | using (SqliteCommand cmd = new SqliteCommand("delete from landaccesslist where LandUUID=:UUID", conn)) |
398 | { | 398 | { |
399 | cmd.Parameters.Add(new SqliteParameter(":UUID", globalID.ToString())); | 399 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(globalID))); |
400 | cmd.ExecuteNonQuery(); | 400 | cmd.ExecuteNonQuery(); |
401 | } | 401 | } |
402 | conn.Close(); | 402 | conn.Close(); |
@@ -412,7 +412,7 @@ namespace OpenSim.DataStore.MonoSqlite | |||
412 | DataTable land = ds.Tables["land"]; | 412 | DataTable land = ds.Tables["land"]; |
413 | DataTable landaccesslist = ds.Tables["landaccesslist"]; | 413 | DataTable landaccesslist = ds.Tables["landaccesslist"]; |
414 | 414 | ||
415 | DataRow landRow = land.Rows.Find(parcel.landData.globalID.ToString()); | 415 | DataRow landRow = land.Rows.Find(Util.ToRawUuidString(parcel.landData.globalID)); |
416 | if (landRow == null) | 416 | if (landRow == null) |
417 | { | 417 | { |
418 | landRow = land.NewRow(); | 418 | landRow = land.NewRow(); |
@@ -426,7 +426,7 @@ namespace OpenSim.DataStore.MonoSqlite | |||
426 | 426 | ||
427 | using (SqliteCommand cmd = new SqliteCommand("delete from landaccesslist where LandUUID=:LandUUID", conn)) | 427 | using (SqliteCommand cmd = new SqliteCommand("delete from landaccesslist where LandUUID=:LandUUID", conn)) |
428 | { | 428 | { |
429 | cmd.Parameters.Add(new SqliteParameter(":LandUUID", parcel.landData.globalID.ToString())); | 429 | cmd.Parameters.Add(new SqliteParameter(":LandUUID", Util.ToRawUuidString(parcel.landData.globalID))); |
430 | cmd.ExecuteNonQuery(); | 430 | cmd.ExecuteNonQuery(); |
431 | } | 431 | } |
432 | 432 | ||
@@ -450,12 +450,12 @@ namespace OpenSim.DataStore.MonoSqlite | |||
450 | { | 450 | { |
451 | DataTable land = ds.Tables["land"]; | 451 | DataTable land = ds.Tables["land"]; |
452 | DataTable landaccesslist = ds.Tables["landaccesslist"]; | 452 | DataTable landaccesslist = ds.Tables["landaccesslist"]; |
453 | string searchExp = "RegionUUID = '" + regionUUID.ToString() + "'"; | 453 | string searchExp = "RegionUUID = '" + Util.ToRawUuidString(regionUUID) + "'"; |
454 | DataRow[] rawDataForRegion = land.Select(searchExp); | 454 | DataRow[] rawDataForRegion = land.Select(searchExp); |
455 | foreach (DataRow rawDataLand in rawDataForRegion) | 455 | foreach (DataRow rawDataLand in rawDataForRegion) |
456 | { | 456 | { |
457 | LandData newLand = buildLandData(rawDataLand); | 457 | LandData newLand = buildLandData(rawDataLand); |
458 | string accessListSearchExp = "LandUUID = '" + newLand.globalID.ToString() + "'"; | 458 | string accessListSearchExp = "LandUUID = '" + Util.ToRawUuidString(newLand.globalID) + "'"; |
459 | DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp); | 459 | DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp); |
460 | foreach (DataRow rawDataLandAccess in rawDataForLandAccessList) | 460 | foreach (DataRow rawDataLandAccess in rawDataForLandAccessList) |
461 | { | 461 | { |
@@ -811,12 +811,12 @@ namespace OpenSim.DataStore.MonoSqlite | |||
811 | 811 | ||
812 | private void fillPrimRow(DataRow row, SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) | 812 | private void fillPrimRow(DataRow row, SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) |
813 | { | 813 | { |
814 | row["UUID"] = prim.UUID; | 814 | row["UUID"] = Util.ToRawUuidString(prim.UUID); |
815 | row["RegionUUID"] = regionUUID; | 815 | row["RegionUUID"] = Util.ToRawUuidString(regionUUID); |
816 | row["ParentID"] = prim.ParentID; | 816 | row["ParentID"] = prim.ParentID; |
817 | row["CreationDate"] = prim.CreationDate; | 817 | row["CreationDate"] = prim.CreationDate; |
818 | row["Name"] = prim.Name; | 818 | row["Name"] = prim.Name; |
819 | row["SceneGroupID"] = sceneGroupID; // the UUID of the root part for this SceneObjectGroup | 819 | row["SceneGroupID"] = Util.ToRawUuidString(sceneGroupID); // the UUID of the root part for this SceneObjectGroup |
820 | // various text fields | 820 | // various text fields |
821 | row["Text"] = prim.Text; | 821 | row["Text"] = prim.Text; |
822 | row["Description"] = prim.Description; | 822 | row["Description"] = prim.Description; |
@@ -824,10 +824,10 @@ namespace OpenSim.DataStore.MonoSqlite | |||
824 | row["TouchName"] = prim.TouchName; | 824 | row["TouchName"] = prim.TouchName; |
825 | // permissions | 825 | // permissions |
826 | row["ObjectFlags"] = prim.ObjectFlags; | 826 | row["ObjectFlags"] = prim.ObjectFlags; |
827 | row["CreatorID"] = prim.CreatorID; | 827 | row["CreatorID"] = Util.ToRawUuidString(prim.CreatorID); |
828 | row["OwnerID"] = prim.OwnerID; | 828 | row["OwnerID"] = Util.ToRawUuidString(prim.OwnerID); |
829 | row["GroupID"] = prim.GroupID; | 829 | row["GroupID"] = Util.ToRawUuidString(prim.GroupID); |
830 | row["LastOwnerID"] = prim.LastOwnerID; | 830 | row["LastOwnerID"] = Util.ToRawUuidString(prim.LastOwnerID); |
831 | row["OwnerMask"] = prim.OwnerMask; | 831 | row["OwnerMask"] = prim.OwnerMask; |
832 | row["NextOwnerMask"] = prim.NextOwnerMask; | 832 | row["NextOwnerMask"] = prim.NextOwnerMask; |
833 | row["GroupMask"] = prim.GroupMask; | 833 | row["GroupMask"] = prim.GroupMask; |
@@ -858,8 +858,8 @@ namespace OpenSim.DataStore.MonoSqlite | |||
858 | 858 | ||
859 | private void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) | 859 | private void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) |
860 | { | 860 | { |
861 | row["UUID"] = land.globalID.ToString(); | 861 | row["UUID"] = Util.ToRawUuidString(land.globalID); |
862 | row["RegionUUID"] = regionUUID.ToString(); | 862 | row["RegionUUID"] = Util.ToRawUuidString(regionUUID); |
863 | row["LocalLandID"] = land.localID; | 863 | row["LocalLandID"] = land.localID; |
864 | 864 | ||
865 | // Bitmap is a byte[512] | 865 | // Bitmap is a byte[512] |
@@ -867,25 +867,25 @@ namespace OpenSim.DataStore.MonoSqlite | |||
867 | 867 | ||
868 | row["Name"] = land.landName; | 868 | row["Name"] = land.landName; |
869 | row["Desc"] = land.landDesc; | 869 | row["Desc"] = land.landDesc; |
870 | row["OwnerUUID"] = land.ownerID.ToString(); | 870 | row["OwnerUUID"] = Util.ToRawUuidString(land.ownerID); |
871 | row["IsGroupOwned"] = land.isGroupOwned; | 871 | row["IsGroupOwned"] = land.isGroupOwned; |
872 | row["Area"] = land.area; | 872 | row["Area"] = land.area; |
873 | row["AuctionID"] = land.auctionID; //Unemplemented | 873 | row["AuctionID"] = land.auctionID; //Unemplemented |
874 | row["Category"] = land.category; //Enum libsecondlife.Parcel.ParcelCategory | 874 | row["Category"] = land.category; //Enum libsecondlife.Parcel.ParcelCategory |
875 | row["ClaimDate"] = land.claimDate; | 875 | row["ClaimDate"] = land.claimDate; |
876 | row["ClaimPrice"] = land.claimPrice; | 876 | row["ClaimPrice"] = land.claimPrice; |
877 | row["GroupUUID"] = land.groupID.ToString(); | 877 | row["GroupUUID"] = Util.ToRawUuidString(land.groupID); |
878 | row["SalePrice"] = land.salePrice; | 878 | row["SalePrice"] = land.salePrice; |
879 | row["LandStatus"] = land.landStatus; //Enum. libsecondlife.Parcel.ParcelStatus | 879 | row["LandStatus"] = land.landStatus; //Enum. libsecondlife.Parcel.ParcelStatus |
880 | row["LandFlags"] = land.landFlags; | 880 | row["LandFlags"] = land.landFlags; |
881 | row["LandingType"] = land.landingType; | 881 | row["LandingType"] = land.landingType; |
882 | row["MediaAutoScale"] = land.mediaAutoScale; | 882 | row["MediaAutoScale"] = land.mediaAutoScale; |
883 | row["MediaTextureUUID"] = land.mediaID.ToString(); | 883 | row["MediaTextureUUID"] = Util.ToRawUuidString(land.mediaID); |
884 | row["MediaURL"] = land.mediaURL; | 884 | row["MediaURL"] = land.mediaURL; |
885 | row["MusicURL"] = land.musicURL; | 885 | row["MusicURL"] = land.musicURL; |
886 | row["PassHours"] = land.passHours; | 886 | row["PassHours"] = land.passHours; |
887 | row["PassPrice"] = land.passPrice; | 887 | row["PassPrice"] = land.passPrice; |
888 | row["SnapshotUUID"] = land.snapshotID.ToString(); | 888 | row["SnapshotUUID"] = Util.ToRawUuidString(land.snapshotID); |
889 | row["UserLocationX"] = land.userLocation.X; | 889 | row["UserLocationX"] = land.userLocation.X; |
890 | row["UserLocationY"] = land.userLocation.Y; | 890 | row["UserLocationY"] = land.userLocation.Y; |
891 | row["UserLocationZ"] = land.userLocation.Z; | 891 | row["UserLocationZ"] = land.userLocation.Z; |
@@ -896,8 +896,8 @@ namespace OpenSim.DataStore.MonoSqlite | |||
896 | 896 | ||
897 | private void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, LLUUID parcelID) | 897 | private void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, LLUUID parcelID) |
898 | { | 898 | { |
899 | row["LandUUID"] = parcelID.ToString(); | 899 | row["LandUUID"] = Util.ToRawUuidString(parcelID); |
900 | row["AccessUUID"] = entry.AgentID.ToString(); | 900 | row["AccessUUID"] = Util.ToRawUuidString(entry.AgentID); |
901 | row["Flags"] = entry.Flags; | 901 | row["Flags"] = entry.Flags; |
902 | } | 902 | } |
903 | 903 | ||
@@ -956,7 +956,7 @@ namespace OpenSim.DataStore.MonoSqlite | |||
956 | private void fillShapeRow(DataRow row, SceneObjectPart prim) | 956 | private void fillShapeRow(DataRow row, SceneObjectPart prim) |
957 | { | 957 | { |
958 | PrimitiveBaseShape s = prim.Shape; | 958 | PrimitiveBaseShape s = prim.Shape; |
959 | row["UUID"] = prim.UUID; | 959 | row["UUID"] = Util.ToRawUuidString(prim.UUID); |
960 | // shape is an enum | 960 | // shape is an enum |
961 | row["Shape"] = 0; | 961 | row["Shape"] = 0; |
962 | // vectors | 962 | // vectors |
@@ -994,7 +994,7 @@ namespace OpenSim.DataStore.MonoSqlite | |||
994 | DataTable prims = ds.Tables["prims"]; | 994 | DataTable prims = ds.Tables["prims"]; |
995 | DataTable shapes = ds.Tables["primshapes"]; | 995 | DataTable shapes = ds.Tables["primshapes"]; |
996 | 996 | ||
997 | DataRow primRow = prims.Rows.Find(prim.UUID); | 997 | DataRow primRow = prims.Rows.Find(Util.ToRawUuidString(prim.UUID)); |
998 | if (primRow == null) | 998 | if (primRow == null) |
999 | { | 999 | { |
1000 | primRow = prims.NewRow(); | 1000 | primRow = prims.NewRow(); |
@@ -1006,7 +1006,7 @@ namespace OpenSim.DataStore.MonoSqlite | |||
1006 | fillPrimRow(primRow, prim, sceneGroupID, regionUUID); | 1006 | fillPrimRow(primRow, prim, sceneGroupID, regionUUID); |
1007 | } | 1007 | } |
1008 | 1008 | ||
1009 | DataRow shapeRow = shapes.Rows.Find(prim.UUID); | 1009 | DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(prim.UUID)); |
1010 | if (shapeRow == null) | 1010 | if (shapeRow == null) |
1011 | { | 1011 | { |
1012 | shapeRow = shapes.NewRow(); | 1012 | shapeRow = shapes.NewRow(); |