aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Storage
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-01-05 21:17:51 +0000
committerJustin Clarke Casey2008-01-05 21:17:51 +0000
commita55c987b781b726086480cb752db0f2bfe2dfde1 (patch)
tree6aaea2b3286538c9e9369bf802cc775bd214bb3f /OpenSim/Region/Storage
parentFix for typo in updateInventoryItem in MSSQLInventoryData.cs (thanks Grumly!) (diff)
downloadopensim-SC_OLD-a55c987b781b726086480cb752db0f2bfe2dfde1.zip
opensim-SC_OLD-a55c987b781b726086480cb752db0f2bfe2dfde1.tar.gz
opensim-SC_OLD-a55c987b781b726086480cb752db0f2bfe2dfde1.tar.bz2
opensim-SC_OLD-a55c987b781b726086480cb752db0f2bfe2dfde1.tar.xz
Dah, don't try and commit the primitems table if we're not running with prim inventories
Diffstat (limited to 'OpenSim/Region/Storage')
-rw-r--r--OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs38
1 files changed, 37 insertions, 1 deletions
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs
index 5dac92f..2de7e25 100644
--- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs
+++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs
@@ -238,6 +238,11 @@ namespace OpenSim.DataStore.MonoSqlite
238 Commit(); 238 Commit();
239 } 239 }
240 240
241 /// <summary>
242 /// Load persisted objects from region storage.
243 /// </summary>
244 /// <param name="regionUUID"></param>
245 /// <returns></returns>
241 public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) 246 public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID)
242 { 247 {
243 Dictionary<LLUUID, SceneObjectGroup> createdObjects = new Dictionary<LLUUID, SceneObjectGroup>(); 248 Dictionary<LLUUID, SceneObjectGroup> createdObjects = new Dictionary<LLUUID, SceneObjectGroup>();
@@ -299,6 +304,9 @@ namespace OpenSim.DataStore.MonoSqlite
299 } 304 }
300 createdObjects[new LLUUID(objID)].AddPart(prim); 305 createdObjects[new LLUUID(objID)].AddPart(prim);
301 } 306 }
307
308 // Add inventory restore code here, probably in a separate method.
309
302 } 310 }
303 catch (Exception e) 311 catch (Exception e)
304 { 312 {
@@ -314,6 +322,29 @@ namespace OpenSim.DataStore.MonoSqlite
314 return retvals; 322 return retvals;
315 } 323 }
316 324
325 /// <summary>
326 /// Load in a prim's persisted inventory.
327 /// </summary>
328 /// <param name="prim"></param>
329 /*
330 private void LoadPrimInventory(SceneObjectPart prim)
331 {
332 String sql = String.Format("primID = '{0}'", primID);
333 DataRow[] dbItemRows = dbItems.Select(sql);
334
335 DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(prim.UUID));
336 if (shapeRow != null)
337 {
338 prim.Shape = buildShape(shapeRow);
339 }
340 else
341 {
342 MainLog.Instance.Notice(
343 "No shape found for prim in storage, so setting default box shape");
344 prim.Shape = PrimitiveBaseShape.Default;
345 }
346 }
347 */
317 348
318 public void StoreTerrain(double[,] ter, LLUUID regionID) 349 public void StoreTerrain(double[,] ter, LLUUID regionID)
319 { 350 {
@@ -499,7 +530,12 @@ namespace OpenSim.DataStore.MonoSqlite
499 { 530 {
500 primDa.Update(ds, "prims"); 531 primDa.Update(ds, "prims");
501 shapeDa.Update(ds, "primshapes"); 532 shapeDa.Update(ds, "primshapes");
502 itemsDa.Update(ds, "primitems"); 533
534 if (persistPrimInventories)
535 {
536 itemsDa.Update(ds, "primitems");
537 }
538
503 terrainDa.Update(ds, "terrain"); 539 terrainDa.Update(ds, "terrain");
504 landDa.Update(ds, "land"); 540 landDa.Update(ds, "land");
505 landAccessListDa.Update(ds, "landaccesslist"); 541 landAccessListDa.Update(ds, "landaccesslist");