aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite
diff options
context:
space:
mode:
authorMelanie Thielker2008-07-18 20:50:47 +0000
committerMelanie Thielker2008-07-18 20:50:47 +0000
commita73d87ef1651ac1e935e0cfebed99282a69c3941 (patch)
tree5d3428e079e5f720670215b7071da0f331648709 /OpenSim/Data/SQLite
parentPatch to fix saving of estate managers list loaded during migration. (diff)
downloadopensim-SC_OLD-a73d87ef1651ac1e935e0cfebed99282a69c3941.zip
opensim-SC_OLD-a73d87ef1651ac1e935e0cfebed99282a69c3941.tar.gz
opensim-SC_OLD-a73d87ef1651ac1e935e0cfebed99282a69c3941.tar.bz2
opensim-SC_OLD-a73d87ef1651ac1e935e0cfebed99282a69c3941.tar.xz
Introduce a separate connection string for estates, which defaults to the one gi
ven for the region datastore. Removes the flag to store prim inventories, which are now always stored.
Diffstat (limited to 'OpenSim/Data/SQLite')
-rw-r--r--OpenSim/Data/SQLite/SQLiteRegionData.cs25
1 files changed, 1 insertions, 24 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs
index 4e87e0d..6e30060 100644
--- a/OpenSim/Data/SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs
@@ -68,7 +68,6 @@ namespace OpenSim.Data.SQLite
68 private String m_connectionString; 68 private String m_connectionString;
69 69
70 // Temporary attribute while this is experimental 70 // Temporary attribute while this is experimental
71 private bool persistPrimInventories;
72 71
73 /*********************************************************************** 72 /***********************************************************************
74 * 73 *
@@ -84,11 +83,9 @@ namespace OpenSim.Data.SQLite
84 /// </list> 83 /// </list>
85 /// </summary> 84 /// </summary>
86 /// <param name="connectionString">the connection string</param> 85 /// <param name="connectionString">the connection string</param>
87 /// <param name="persistPrimInventories">?</param> 86 public void Initialise(string connectionString)
88 public void Initialise(string connectionString, bool persistPrimInventories)
89 { 87 {
90 m_connectionString = connectionString; 88 m_connectionString = connectionString;
91 this.persistPrimInventories = persistPrimInventories;
92 89
93 ds = new DataSet(); 90 ds = new DataSet();
94 91
@@ -137,12 +134,9 @@ namespace OpenSim.Data.SQLite
137 ds.Tables.Add(createShapeTable()); 134 ds.Tables.Add(createShapeTable());
138 setupShapeCommands(shapeDa, m_conn); 135 setupShapeCommands(shapeDa, m_conn);
139 136
140 if (persistPrimInventories)
141 {
142 ds.Tables.Add(createItemsTable()); 137 ds.Tables.Add(createItemsTable());
143 setupItemsCommands(itemsDa, m_conn); 138 setupItemsCommands(itemsDa, m_conn);
144 itemsDa.Fill(ds.Tables["primitems"]); 139 itemsDa.Fill(ds.Tables["primitems"]);
145 }
146 140
147 ds.Tables.Add(createTerrainTable()); 141 ds.Tables.Add(createTerrainTable());
148 setupTerrainCommands(terrainDa, m_conn); 142 setupTerrainCommands(terrainDa, m_conn);
@@ -267,10 +261,7 @@ namespace OpenSim.Data.SQLite
267 shapeRow.Delete(); 261 shapeRow.Delete();
268 } 262 }
269 263
270 if (persistPrimInventories)
271 {
272 RemoveItems(uuid); 264 RemoveItems(uuid);
273 }
274 265
275 // Remove prim row 266 // Remove prim row
276 row.Delete(); 267 row.Delete();
@@ -367,11 +358,8 @@ namespace OpenSim.Data.SQLite
367 createdObjects[new LLUUID(objID)].AddPart(prim); 358 createdObjects[new LLUUID(objID)].AddPart(prim);
368 } 359 }
369 360
370 if (persistPrimInventories)
371 {
372 LoadItems(prim); 361 LoadItems(prim);
373 } 362 }
374 }
375 catch (Exception e) 363 catch (Exception e)
376 { 364 {
377 m_log.Error("[REGION DB]: Failed create prim object, exception and data follows"); 365 m_log.Error("[REGION DB]: Failed create prim object, exception and data follows");
@@ -615,10 +603,7 @@ namespace OpenSim.Data.SQLite
615 primDa.Update(ds, "prims"); 603 primDa.Update(ds, "prims");
616 shapeDa.Update(ds, "primshapes"); 604 shapeDa.Update(ds, "primshapes");
617 605
618 if (persistPrimInventories)
619 {
620 itemsDa.Update(ds, "primitems"); 606 itemsDa.Update(ds, "primitems");
621 }
622 607
623 terrainDa.Update(ds, "terrain"); 608 terrainDa.Update(ds, "terrain");
624 landDa.Update(ds, "land"); 609 landDa.Update(ds, "land");
@@ -1475,9 +1460,6 @@ namespace OpenSim.Data.SQLite
1475 /// <param name="items"></param> 1460 /// <param name="items"></param>
1476 public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) 1461 public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items)
1477 { 1462 {
1478 if (!persistPrimInventories)
1479 return;
1480
1481 m_log.InfoFormat("[REGION DB]: Entered StorePrimInventory with prim ID {0}", primID); 1463 m_log.InfoFormat("[REGION DB]: Entered StorePrimInventory with prim ID {0}", primID);
1482 1464
1483 DataTable dbItems = ds.Tables["primitems"]; 1465 DataTable dbItems = ds.Tables["primitems"];
@@ -1779,8 +1761,6 @@ namespace OpenSim.Data.SQLite
1779 // m_log.Warn("[REGION DB]: Shapes Table Already Exists"); 1761 // m_log.Warn("[REGION DB]: Shapes Table Already Exists");
1780 // } 1762 // }
1781 1763
1782 // if (persistPrimInventories)
1783 // {
1784 // try 1764 // try
1785 // { 1765 // {
1786 // icmd.ExecuteNonQuery(); 1766 // icmd.ExecuteNonQuery();
@@ -1789,7 +1769,6 @@ namespace OpenSim.Data.SQLite
1789 // { 1769 // {
1790 // m_log.Warn("[REGION DB]: Primitives Inventory Table Already Exists"); 1770 // m_log.Warn("[REGION DB]: Primitives Inventory Table Already Exists");
1791 // } 1771 // }
1792 // }
1793 1772
1794 // try 1773 // try
1795 // { 1774 // {
@@ -1851,7 +1830,6 @@ namespace OpenSim.Data.SQLite
1851 pDa.Fill(tmpDS, "prims"); 1830 pDa.Fill(tmpDS, "prims");
1852 sDa.Fill(tmpDS, "primshapes"); 1831 sDa.Fill(tmpDS, "primshapes");
1853 1832
1854 if (persistPrimInventories)
1855 iDa.Fill(tmpDS, "primitems"); 1833 iDa.Fill(tmpDS, "primitems");
1856 1834
1857 tDa.Fill(tmpDS, "terrain"); 1835 tDa.Fill(tmpDS, "terrain");
@@ -1874,7 +1852,6 @@ namespace OpenSim.Data.SQLite
1874 // pDa.Fill(tmpDS, "prims"); 1852 // pDa.Fill(tmpDS, "prims");
1875 // sDa.Fill(tmpDS, "primshapes"); 1853 // sDa.Fill(tmpDS, "primshapes");
1876 1854
1877 // if (persistPrimInventories)
1878 // iDa.Fill(tmpDS, "primitems"); 1855 // iDa.Fill(tmpDS, "primitems");
1879 1856
1880 // tDa.Fill(tmpDS, "terrain"); 1857 // tDa.Fill(tmpDS, "terrain");