diff options
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLDataStore.cs | 22 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLDataStore.cs | 23 | ||||
-rw-r--r-- | OpenSim/Data/NHibernate/NHibernateRegionData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/Null/NullDataStore.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteRegionData.cs | 25 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/RegionApplicationBase.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Environment/StorageManager.cs | 6 | ||||
-rw-r--r-- | OpenSim/Tools/Export/OpenSimExport.cs | 2 | ||||
-rw-r--r-- | bin/OpenSim.ini.example | 13 |
11 files changed, 20 insertions, 96 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLDataStore.cs b/OpenSim/Data/MSSQL/MSSQLDataStore.cs index c7d034f..569268e 100644 --- a/OpenSim/Data/MSSQL/MSSQLDataStore.cs +++ b/OpenSim/Data/MSSQL/MSSQLDataStore.cs | |||
@@ -71,7 +71,6 @@ namespace OpenSim.Data.MSSQL | |||
71 | private DataTable m_landAccessListTable; | 71 | private DataTable m_landAccessListTable; |
72 | 72 | ||
73 | /// <summary>Temporary attribute while this is experimental</summary> | 73 | /// <summary>Temporary attribute while this is experimental</summary> |
74 | private bool persistPrimInventories; | ||
75 | 74 | ||
76 | /*********************************************************************** | 75 | /*********************************************************************** |
77 | * | 76 | * |
@@ -83,13 +82,11 @@ namespace OpenSim.Data.MSSQL | |||
83 | /// see IRegionDataStore | 82 | /// see IRegionDataStore |
84 | /// </summary> | 83 | /// </summary> |
85 | /// <param name="connectionString"></param> | 84 | /// <param name="connectionString"></param> |
86 | /// <param name="persistPrimInventories"></param> | 85 | public void Initialise(string connectionString) |
87 | public void Initialise(string connectionString, bool persistPrimInventories) | ||
88 | { | 86 | { |
89 | // Instance.Initialise("", true); | 87 | // Instance.Initialise("", true); |
90 | 88 | ||
91 | m_dataSet = new DataSet(); | 89 | m_dataSet = new DataSet(); |
92 | this.persistPrimInventories = persistPrimInventories; | ||
93 | 90 | ||
94 | m_log.Info("[REGION DB]: MSSql - connecting: " + connectionString); | 91 | m_log.Info("[REGION DB]: MSSql - connecting: " + connectionString); |
95 | m_connection = new SqlConnection(connectionString); | 92 | m_connection = new SqlConnection(connectionString); |
@@ -126,13 +123,10 @@ namespace OpenSim.Data.MSSQL | |||
126 | setupShapeCommands(m_shapeDataAdapter, m_connection); | 123 | setupShapeCommands(m_shapeDataAdapter, m_connection); |
127 | m_shapeDataAdapter.Fill(m_shapeTable); | 124 | m_shapeDataAdapter.Fill(m_shapeTable); |
128 | 125 | ||
129 | if (persistPrimInventories) | ||
130 | { | ||
131 | m_itemsTable = createItemsTable(); | 126 | m_itemsTable = createItemsTable(); |
132 | m_dataSet.Tables.Add(m_itemsTable); | 127 | m_dataSet.Tables.Add(m_itemsTable); |
133 | SetupItemsCommands(m_itemsDataAdapter, m_connection); | 128 | SetupItemsCommands(m_itemsDataAdapter, m_connection); |
134 | m_itemsDataAdapter.Fill(m_itemsTable); | 129 | m_itemsDataAdapter.Fill(m_itemsTable); |
135 | } | ||
136 | 130 | ||
137 | m_terrainTable = createTerrainTable(); | 131 | m_terrainTable = createTerrainTable(); |
138 | m_dataSet.Tables.Add(m_terrainTable); | 132 | m_dataSet.Tables.Add(m_terrainTable); |
@@ -218,10 +212,7 @@ namespace OpenSim.Data.MSSQL | |||
218 | shapeRow.Delete(); | 212 | shapeRow.Delete(); |
219 | } | 213 | } |
220 | 214 | ||
221 | if (persistPrimInventories) | ||
222 | { | ||
223 | RemoveItems(new LLUUID((string)row["UUID"])); | 215 | RemoveItems(new LLUUID((string)row["UUID"])); |
224 | } | ||
225 | 216 | ||
226 | // Remove prim row | 217 | // Remove prim row |
227 | row.Delete(); | 218 | row.Delete(); |
@@ -317,11 +308,8 @@ namespace OpenSim.Data.MSSQL | |||
317 | createdObjects[new LLUUID(objID)].AddPart(prim); | 308 | createdObjects[new LLUUID(objID)].AddPart(prim); |
318 | } | 309 | } |
319 | 310 | ||
320 | if (persistPrimInventories) | ||
321 | { | ||
322 | LoadItems(prim); | 311 | LoadItems(prim); |
323 | } | 312 | } |
324 | } | ||
325 | catch (Exception e) | 313 | catch (Exception e) |
326 | { | 314 | { |
327 | m_log.Error("[DATASTORE]: Failed create prim object, exception and data follows"); | 315 | m_log.Error("[DATASTORE]: Failed create prim object, exception and data follows"); |
@@ -589,10 +577,7 @@ namespace OpenSim.Data.MSSQL | |||
589 | m_primDataAdapter.Update(m_primTable); | 577 | m_primDataAdapter.Update(m_primTable); |
590 | m_shapeDataAdapter.Update(m_shapeTable); | 578 | m_shapeDataAdapter.Update(m_shapeTable); |
591 | 579 | ||
592 | if (persistPrimInventories) | ||
593 | { | ||
594 | m_itemsDataAdapter.Update(m_itemsTable); | 580 | m_itemsDataAdapter.Update(m_itemsTable); |
595 | } | ||
596 | 581 | ||
597 | m_terrainDataAdapter.Update(m_terrainTable); | 582 | m_terrainDataAdapter.Update(m_terrainTable); |
598 | m_landDataAdapter.Update(m_landTable); | 583 | m_landDataAdapter.Update(m_landTable); |
@@ -1378,9 +1363,6 @@ namespace OpenSim.Data.MSSQL | |||
1378 | /// <param name="items"></param> | 1363 | /// <param name="items"></param> |
1379 | public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) | 1364 | public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) |
1380 | { | 1365 | { |
1381 | if (!persistPrimInventories) | ||
1382 | return; | ||
1383 | |||
1384 | m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID); | 1366 | m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID); |
1385 | 1367 | ||
1386 | // For now, we're just going to crudely remove all the previous inventory items | 1368 | // For now, we're just going to crudely remove all the previous inventory items |
@@ -1749,7 +1731,6 @@ namespace OpenSim.Data.MSSQL | |||
1749 | pDa.Fill(tmpDS, "prims"); | 1731 | pDa.Fill(tmpDS, "prims"); |
1750 | sDa.Fill(tmpDS, "primshapes"); | 1732 | sDa.Fill(tmpDS, "primshapes"); |
1751 | 1733 | ||
1752 | if (persistPrimInventories) | ||
1753 | iDa.Fill(tmpDS, "primitems"); | 1734 | iDa.Fill(tmpDS, "primitems"); |
1754 | 1735 | ||
1755 | tDa.Fill(tmpDS, "terrain"); | 1736 | tDa.Fill(tmpDS, "terrain"); |
@@ -1765,7 +1746,6 @@ namespace OpenSim.Data.MSSQL | |||
1765 | pDa.Fill(tmpDS, "prims"); | 1746 | pDa.Fill(tmpDS, "prims"); |
1766 | sDa.Fill(tmpDS, "primshapes"); | 1747 | sDa.Fill(tmpDS, "primshapes"); |
1767 | 1748 | ||
1768 | if (persistPrimInventories) | ||
1769 | iDa.Fill(tmpDS, "primitems"); | 1749 | iDa.Fill(tmpDS, "primitems"); |
1770 | 1750 | ||
1771 | tDa.Fill(tmpDS, "terrain"); | 1751 | tDa.Fill(tmpDS, "terrain"); |
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"); |
diff --git a/OpenSim/Data/NHibernate/NHibernateRegionData.cs b/OpenSim/Data/NHibernate/NHibernateRegionData.cs index 40861ae..55331d5 100644 --- a/OpenSim/Data/NHibernate/NHibernateRegionData.cs +++ b/OpenSim/Data/NHibernate/NHibernateRegionData.cs | |||
@@ -61,7 +61,7 @@ namespace OpenSim.Data.NHibernate | |||
61 | // Initialise("SQLiteDialect;SqliteClientDriver;URI=file:OpenSim.db,version=3", true); | 61 | // Initialise("SQLiteDialect;SqliteClientDriver;URI=file:OpenSim.db,version=3", true); |
62 | // } | 62 | // } |
63 | 63 | ||
64 | public void Initialise(string connect, bool persistpriminventories) | 64 | public void Initialise(string connect) |
65 | { | 65 | { |
66 | // Split out the dialect, driver, and connect string | 66 | // Split out the dialect, driver, and connect string |
67 | char[] split = {';'}; | 67 | char[] split = {';'}; |
diff --git a/OpenSim/Data/Null/NullDataStore.cs b/OpenSim/Data/Null/NullDataStore.cs index e244a5e..76369bd 100644 --- a/OpenSim/Data/Null/NullDataStore.cs +++ b/OpenSim/Data/Null/NullDataStore.cs | |||
@@ -38,7 +38,7 @@ namespace OpenSim.Data.Null | |||
38 | /// </summary> | 38 | /// </summary> |
39 | public class NullDataStore : IRegionDataStore | 39 | public class NullDataStore : IRegionDataStore |
40 | { | 40 | { |
41 | public void Initialise(string dbfile, bool persistPrimInventories) | 41 | public void Initialise(string dbfile) |
42 | { | 42 | { |
43 | return; | 43 | return; |
44 | } | 44 | } |
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"); |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 910ec55..05e4f46 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -300,9 +300,8 @@ namespace OpenSim | |||
300 | } | 300 | } |
301 | m_storageConnectionString | 301 | m_storageConnectionString |
302 | = startupConfig.GetString("storage_connection_string", "URI=file:OpenSim.db,version=3"); | 302 | = startupConfig.GetString("storage_connection_string", "URI=file:OpenSim.db,version=3"); |
303 | m_storagePersistPrimInventories | 303 | m_estateConnectionString |
304 | = startupConfig.GetBoolean("storage_prim_inventories", true); | 304 | = startupConfig.GetString("estate_connection_string", m_storageConnectionString); |
305 | |||
306 | m_scriptEngine = startupConfig.GetString("script_engine", "OpenSim.Region.ScriptEngine.DotNetEngine.dll"); | 305 | m_scriptEngine = startupConfig.GetString("script_engine", "OpenSim.Region.ScriptEngine.DotNetEngine.dll"); |
307 | m_assetStorage = startupConfig.GetString("asset_database", "local"); | 306 | m_assetStorage = startupConfig.GetString("asset_database", "local"); |
308 | m_clientstackDll = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll"); | 307 | m_clientstackDll = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll"); |
@@ -555,9 +554,9 @@ namespace OpenSim | |||
555 | return clientServer; | 554 | return clientServer; |
556 | } | 555 | } |
557 | 556 | ||
558 | protected override StorageManager CreateStorageManager(string connectionstring) | 557 | protected override StorageManager CreateStorageManager(string connectionstring, string estateconnectionstring) |
559 | { | 558 | { |
560 | return new StorageManager(m_storageDll, connectionstring, m_storagePersistPrimInventories); | 559 | return new StorageManager(m_storageDll, connectionstring, estateconnectionstring); |
561 | } | 560 | } |
562 | 561 | ||
563 | protected override ClientStackManager CreateClientStackManager() | 562 | protected override ClientStackManager CreateClientStackManager() |
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index dadaf88..3e941cf 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -62,13 +62,10 @@ namespace OpenSim.Region.ClientStack | |||
62 | 62 | ||
63 | protected StorageManager m_storageManager; | 63 | protected StorageManager m_storageManager; |
64 | protected string m_storageConnectionString; | 64 | protected string m_storageConnectionString; |
65 | protected string m_estateConnectionString; | ||
65 | 66 | ||
66 | protected ClientStackManager m_clientStackManager; | 67 | protected ClientStackManager m_clientStackManager; |
67 | 68 | ||
68 | // An attribute to indicate whether prim inventories should be persisted. | ||
69 | // Probably will be temporary until this stops being experimental. | ||
70 | protected bool m_storagePersistPrimInventories; | ||
71 | |||
72 | public SceneManager SceneManager | 69 | public SceneManager SceneManager |
73 | { | 70 | { |
74 | get { return m_sceneManager; } | 71 | get { return m_sceneManager; } |
@@ -78,7 +75,7 @@ namespace OpenSim.Region.ClientStack | |||
78 | { | 75 | { |
79 | base.Startup(); | 76 | base.Startup(); |
80 | 77 | ||
81 | m_storageManager = CreateStorageManager(m_storageConnectionString); | 78 | m_storageManager = CreateStorageManager(m_storageConnectionString, m_estateConnectionString); |
82 | 79 | ||
83 | m_clientStackManager = CreateClientStackManager(); | 80 | m_clientStackManager = CreateClientStackManager(); |
84 | 81 | ||
@@ -101,7 +98,7 @@ namespace OpenSim.Region.ClientStack | |||
101 | 98 | ||
102 | // protected abstract ConsoleBase CreateConsole(); | 99 | // protected abstract ConsoleBase CreateConsole(); |
103 | protected abstract PhysicsScene GetPhysicsScene(); | 100 | protected abstract PhysicsScene GetPhysicsScene(); |
104 | protected abstract StorageManager CreateStorageManager(string connectionstring); | 101 | protected abstract StorageManager CreateStorageManager(string connectionstring, string estateconnectionstring); |
105 | protected abstract ClientStackManager CreateClientStackManager(); | 102 | protected abstract ClientStackManager CreateClientStackManager(); |
106 | 103 | ||
107 | protected PhysicsScene GetPhysicsScene(string engine, string meshEngine, IConfigSource config) | 104 | protected PhysicsScene GetPhysicsScene(string engine, string meshEngine, IConfigSource config) |
diff --git a/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs b/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs index 0316f20..ad5983c 100644 --- a/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs +++ b/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs | |||
@@ -39,8 +39,7 @@ namespace OpenSim.Region.Environment.Interfaces | |||
39 | /// </summary> | 39 | /// </summary> |
40 | /// <param name="filename">The file to save the database to (may not be applicable). Alternatively, | 40 | /// <param name="filename">The file to save the database to (may not be applicable). Alternatively, |
41 | /// a connection string for the database</param> | 41 | /// a connection string for the database</param> |
42 | /// <param name="persistPrimInventories">Temporary switch while this option is immature</param> | 42 | void Initialise(string filename); |
43 | void Initialise(string filename, bool persistPrimInventories); | ||
44 | 43 | ||
45 | /// <summary> | 44 | /// <summary> |
46 | /// Stores all object's details apart from inventory | 45 | /// Stores all object's details apart from inventory |
diff --git a/OpenSim/Region/Environment/StorageManager.cs b/OpenSim/Region/Environment/StorageManager.cs index 768e12c..36c9196 100644 --- a/OpenSim/Region/Environment/StorageManager.cs +++ b/OpenSim/Region/Environment/StorageManager.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Environment | |||
55 | m_dataStore = storage; | 55 | m_dataStore = storage; |
56 | } | 56 | } |
57 | 57 | ||
58 | public StorageManager(string dllName, string connectionstring, bool persistPrimInventories) | 58 | public StorageManager(string dllName, string connectionstring, string estateconnectionstring) |
59 | { | 59 | { |
60 | m_log.Info("[DATASTORE]: Attempting to load " + dllName); | 60 | m_log.Info("[DATASTORE]: Attempting to load " + dllName); |
61 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); | 61 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); |
@@ -70,7 +70,7 @@ namespace OpenSim.Region.Environment | |||
70 | { | 70 | { |
71 | IRegionDataStore plug = | 71 | IRegionDataStore plug = |
72 | (IRegionDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 72 | (IRegionDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
73 | plug.Initialise(connectionstring, persistPrimInventories); | 73 | plug.Initialise(connectionstring); |
74 | 74 | ||
75 | m_dataStore = plug; | 75 | m_dataStore = plug; |
76 | 76 | ||
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Environment | |||
83 | { | 83 | { |
84 | IEstateDataStore estPlug = | 84 | IEstateDataStore estPlug = |
85 | (IEstateDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 85 | (IEstateDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
86 | estPlug.Initialise(connectionstring); | 86 | estPlug.Initialise(estateconnectionstring); |
87 | 87 | ||
88 | m_estateDataStore = estPlug; | 88 | m_estateDataStore = estPlug; |
89 | } | 89 | } |
diff --git a/OpenSim/Tools/Export/OpenSimExport.cs b/OpenSim/Tools/Export/OpenSimExport.cs index 1e7db51..f469d91 100644 --- a/OpenSim/Tools/Export/OpenSimExport.cs +++ b/OpenSim/Tools/Export/OpenSimExport.cs | |||
@@ -54,7 +54,7 @@ namespace OpenSimExport | |||
54 | sman = new StorageManager( | 54 | sman = new StorageManager( |
55 | startup.GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll"), | 55 | startup.GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll"), |
56 | startup.GetString("storage_connection_string", String.Empty), | 56 | startup.GetString("storage_connection_string", String.Empty), |
57 | false | 57 | startup.GetString("estate_connection_string", String.Empty) |
58 | ); | 58 | ); |
59 | } | 59 | } |
60 | 60 | ||
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 491e7dd..afcb8ee 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example | |||
@@ -42,16 +42,9 @@ storage_connection_string="URI=file:OpenSim.db,version=3"; | |||
42 | ; note that the supplied account needs create privilegies if you want it to auto-create needed tables. | 42 | ; note that the supplied account needs create privilegies if you want it to auto-create needed tables. |
43 | ; storage_plugin="OpenSim.Data.MySQL.dll" | 43 | ; storage_plugin="OpenSim.Data.MySQL.dll" |
44 | ; storage_connection_string="Data Source=localhost;Database=opensim;User ID=opensim;Password=*****;"; | 44 | ; storage_connection_string="Data Source=localhost;Database=opensim;User ID=opensim;Password=*****;"; |
45 | 45 | ; If you want to use a different database/server for estate data, then | |
46 | ; turn on experimental storage of prim inventories in the region database | 46 | ; uncomment and change this connect string. Defaults to the above if not set |
47 | 47 | ; estate_connection_string="Data Source=localhost;Database=opensim;User ID=opensim;Password=*****;"; | |
48 | ; Prim inventory storage is now turned on by default | ||
49 | ; However, this option remains in case it needs to be disabled | ||
50 | ; More details of the current state of this can be found at | ||
51 | ; | ||
52 | ; http://opensimulator.org/wiki/OpenSim:Prim_Inventory_Persistence | ||
53 | ; | ||
54 | storage_prim_inventories = true | ||
55 | 48 | ||
56 | ; Select whether you want to use local or grid asset storage. | 49 | ; Select whether you want to use local or grid asset storage. |
57 | ; | 50 | ; |