aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLDataStore.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLDataStore.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLDataStore.cs23
1 files changed, 1 insertions, 22 deletions
diff --git a/OpenSim/Data/MySQL/MySQLDataStore.cs b/OpenSim/Data/MySQL/MySQLDataStore.cs
index d1db064..74f15cb 100644
--- a/OpenSim/Data/MySQL/MySQLDataStore.cs
+++ b/OpenSim/Data/MySQL/MySQLDataStore.cs
@@ -92,9 +92,6 @@ namespace OpenSim.Data.MySQL
92 private DataTable m_landAccessListTable; 92 private DataTable m_landAccessListTable;
93 private DataTable m_regionSettingsTable; 93 private DataTable m_regionSettingsTable;
94 94
95 /// <value>Temporary attribute while this is experimental</value>
96 private bool persistPrimInventories;
97
98 /*********************************************************************** 95 /***********************************************************************
99 * 96 *
100 * Public Interface Functions 97 * Public Interface Functions
@@ -105,13 +102,11 @@ namespace OpenSim.Data.MySQL
105 /// see IRegionDataStore 102 /// see IRegionDataStore
106 /// </summary> 103 /// </summary>
107 /// <param name="connectionstring"></param> 104 /// <param name="connectionstring"></param>
108 /// <param name="persistPrimInventories"></param> 105 public void Initialise(string connectionString)
109 public void Initialise(string connectionString, bool persistPrimInventories)
110 { 106 {
111 m_connectionString = connectionString; 107 m_connectionString = connectionString;
112 108
113 m_dataSet = new DataSet(); 109 m_dataSet = new DataSet();
114 this.persistPrimInventories = persistPrimInventories;
115 110
116 int passPosition = 0; 111 int passPosition = 0;
117 int passEndPosition = 0; 112 int passEndPosition = 0;
@@ -184,13 +179,10 @@ namespace OpenSim.Data.MySQL
184 m_shapeDataAdapter.Fill(m_shapeTable); 179 m_shapeDataAdapter.Fill(m_shapeTable);
185 180
186 181
187 if (persistPrimInventories)
188 {
189 m_itemsTable = createItemsTable(); 182 m_itemsTable = createItemsTable();
190 m_dataSet.Tables.Add(m_itemsTable); 183 m_dataSet.Tables.Add(m_itemsTable);
191 SetupItemsCommands(m_itemsDataAdapter, m_connection); 184 SetupItemsCommands(m_itemsDataAdapter, m_connection);
192 m_itemsDataAdapter.Fill(m_itemsTable); 185 m_itemsDataAdapter.Fill(m_itemsTable);
193 }
194 186
195 m_terrainTable = createTerrainTable(); 187 m_terrainTable = createTerrainTable();
196 m_dataSet.Tables.Add(m_terrainTable); 188 m_dataSet.Tables.Add(m_terrainTable);
@@ -429,10 +421,7 @@ namespace OpenSim.Data.MySQL
429 shapeRow.Delete(); 421 shapeRow.Delete();
430 } 422 }
431 423
432 if (persistPrimInventories)
433 {
434 RemoveItems(uuid); 424 RemoveItems(uuid);
435 }
436 425
437 // Remove prim row 426 // Remove prim row
438 row.Delete(); 427 row.Delete();
@@ -527,11 +516,8 @@ namespace OpenSim.Data.MySQL
527 createdObjects[new LLUUID(objID)].AddPart(prim); 516 createdObjects[new LLUUID(objID)].AddPart(prim);
528 } 517 }
529 518
530 if (persistPrimInventories)
531 {
532 LoadItems(prim); 519 LoadItems(prim);
533 } 520 }
534 }
535 catch (Exception e) 521 catch (Exception e)
536 { 522 {
537 m_log.Error("[REGION DB]: Failed create prim object, exception and data follows"); 523 m_log.Error("[REGION DB]: Failed create prim object, exception and data follows");
@@ -827,10 +813,7 @@ namespace OpenSim.Data.MySQL
827 m_primDataAdapter.Update(m_primTable); 813 m_primDataAdapter.Update(m_primTable);
828 m_shapeDataAdapter.Update(m_shapeTable); 814 m_shapeDataAdapter.Update(m_shapeTable);
829 815
830 if (persistPrimInventories)
831 {
832 m_itemsDataAdapter.Update(m_itemsTable); 816 m_itemsDataAdapter.Update(m_itemsTable);
833 }
834 817
835 m_terrainDataAdapter.Update(m_terrainTable); 818 m_terrainDataAdapter.Update(m_terrainTable);
836 m_landDataAdapter.Update(m_landTable); 819 m_landDataAdapter.Update(m_landTable);
@@ -1812,9 +1795,6 @@ namespace OpenSim.Data.MySQL
1812 /// <param name="items"></param> 1795 /// <param name="items"></param>
1813 public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) 1796 public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items)
1814 { 1797 {
1815 if (!persistPrimInventories)
1816 return;
1817
1818 m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID); 1798 m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID);
1819 1799
1820 // For now, we're just going to crudely remove all the previous inventory items 1800 // For now, we're just going to crudely remove all the previous inventory items
@@ -2241,7 +2221,6 @@ namespace OpenSim.Data.MySQL
2241 // pDa.Fill(tmpDS, "prims"); 2221 // pDa.Fill(tmpDS, "prims");
2242 // sDa.Fill(tmpDS, "primshapes"); 2222 // sDa.Fill(tmpDS, "primshapes");
2243 2223
2244 // if (persistPrimInventories)
2245 // iDa.Fill(tmpDS, "primitems"); 2224 // iDa.Fill(tmpDS, "primitems");
2246 2225
2247 // tDa.Fill(tmpDS, "terrain"); 2226 // tDa.Fill(tmpDS, "terrain");