From a55c987b781b726086480cb752db0f2bfe2dfde1 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Sat, 5 Jan 2008 21:17:51 +0000
Subject: Dah, don't try and commit the primitems table if we're not running
with prim inventories
---
.../MonoSqliteDataStore.cs | 38 +++++++++++++++++++++-
1 file changed, 37 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region')
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
Commit();
}
+ ///
+ /// Load persisted objects from region storage.
+ ///
+ ///
+ ///
public List LoadObjects(LLUUID regionUUID)
{
Dictionary createdObjects = new Dictionary();
@@ -299,6 +304,9 @@ namespace OpenSim.DataStore.MonoSqlite
}
createdObjects[new LLUUID(objID)].AddPart(prim);
}
+
+ // Add inventory restore code here, probably in a separate method.
+
}
catch (Exception e)
{
@@ -314,6 +322,29 @@ namespace OpenSim.DataStore.MonoSqlite
return retvals;
}
+ ///
+ /// Load in a prim's persisted inventory.
+ ///
+ ///
+ /*
+ private void LoadPrimInventory(SceneObjectPart prim)
+ {
+ String sql = String.Format("primID = '{0}'", primID);
+ DataRow[] dbItemRows = dbItems.Select(sql);
+
+ DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(prim.UUID));
+ if (shapeRow != null)
+ {
+ prim.Shape = buildShape(shapeRow);
+ }
+ else
+ {
+ MainLog.Instance.Notice(
+ "No shape found for prim in storage, so setting default box shape");
+ prim.Shape = PrimitiveBaseShape.Default;
+ }
+ }
+ */
public void StoreTerrain(double[,] ter, LLUUID regionID)
{
@@ -499,7 +530,12 @@ namespace OpenSim.DataStore.MonoSqlite
{
primDa.Update(ds, "prims");
shapeDa.Update(ds, "primshapes");
- itemsDa.Update(ds, "primitems");
+
+ if (persistPrimInventories)
+ {
+ itemsDa.Update(ds, "primitems");
+ }
+
terrainDa.Update(ds, "terrain");
landDa.Update(ds, "land");
landAccessListDa.Update(ds, "landaccesslist");
--
cgit v1.1