From a73d87ef1651ac1e935e0cfebed99282a69c3941 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Fri, 18 Jul 2008 20:50:47 +0000
Subject: 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.
---
OpenSim/Data/MSSQL/MSSQLDataStore.cs | 22 +---------------------
OpenSim/Data/MySQL/MySQLDataStore.cs | 23 +----------------------
OpenSim/Data/NHibernate/NHibernateRegionData.cs | 2 +-
OpenSim/Data/Null/NullDataStore.cs | 2 +-
OpenSim/Data/SQLite/SQLiteRegionData.cs | 25 +------------------------
5 files changed, 5 insertions(+), 69 deletions(-)
(limited to 'OpenSim/Data')
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
private DataTable m_landAccessListTable;
/// Temporary attribute while this is experimental
- private bool persistPrimInventories;
/***********************************************************************
*
@@ -83,13 +82,11 @@ namespace OpenSim.Data.MSSQL
/// see IRegionDataStore
///
///
- ///
- public void Initialise(string connectionString, bool persistPrimInventories)
+ public void Initialise(string connectionString)
{
// Instance.Initialise("", true);
m_dataSet = new DataSet();
- this.persistPrimInventories = persistPrimInventories;
m_log.Info("[REGION DB]: MSSql - connecting: " + connectionString);
m_connection = new SqlConnection(connectionString);
@@ -126,13 +123,10 @@ namespace OpenSim.Data.MSSQL
setupShapeCommands(m_shapeDataAdapter, m_connection);
m_shapeDataAdapter.Fill(m_shapeTable);
- if (persistPrimInventories)
- {
m_itemsTable = createItemsTable();
m_dataSet.Tables.Add(m_itemsTable);
SetupItemsCommands(m_itemsDataAdapter, m_connection);
m_itemsDataAdapter.Fill(m_itemsTable);
- }
m_terrainTable = createTerrainTable();
m_dataSet.Tables.Add(m_terrainTable);
@@ -218,10 +212,7 @@ namespace OpenSim.Data.MSSQL
shapeRow.Delete();
}
- if (persistPrimInventories)
- {
RemoveItems(new LLUUID((string)row["UUID"]));
- }
// Remove prim row
row.Delete();
@@ -317,11 +308,8 @@ namespace OpenSim.Data.MSSQL
createdObjects[new LLUUID(objID)].AddPart(prim);
}
- if (persistPrimInventories)
- {
LoadItems(prim);
}
- }
catch (Exception e)
{
m_log.Error("[DATASTORE]: Failed create prim object, exception and data follows");
@@ -589,10 +577,7 @@ namespace OpenSim.Data.MSSQL
m_primDataAdapter.Update(m_primTable);
m_shapeDataAdapter.Update(m_shapeTable);
- if (persistPrimInventories)
- {
m_itemsDataAdapter.Update(m_itemsTable);
- }
m_terrainDataAdapter.Update(m_terrainTable);
m_landDataAdapter.Update(m_landTable);
@@ -1378,9 +1363,6 @@ namespace OpenSim.Data.MSSQL
///
public void StorePrimInventory(LLUUID primID, ICollection items)
{
- if (!persistPrimInventories)
- return;
-
m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID);
// For now, we're just going to crudely remove all the previous inventory items
@@ -1749,7 +1731,6 @@ namespace OpenSim.Data.MSSQL
pDa.Fill(tmpDS, "prims");
sDa.Fill(tmpDS, "primshapes");
- if (persistPrimInventories)
iDa.Fill(tmpDS, "primitems");
tDa.Fill(tmpDS, "terrain");
@@ -1765,7 +1746,6 @@ namespace OpenSim.Data.MSSQL
pDa.Fill(tmpDS, "prims");
sDa.Fill(tmpDS, "primshapes");
- if (persistPrimInventories)
iDa.Fill(tmpDS, "primitems");
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
private DataTable m_landAccessListTable;
private DataTable m_regionSettingsTable;
- /// Temporary attribute while this is experimental
- private bool persistPrimInventories;
-
/***********************************************************************
*
* Public Interface Functions
@@ -105,13 +102,11 @@ namespace OpenSim.Data.MySQL
/// see IRegionDataStore
///
///
- ///
- public void Initialise(string connectionString, bool persistPrimInventories)
+ public void Initialise(string connectionString)
{
m_connectionString = connectionString;
m_dataSet = new DataSet();
- this.persistPrimInventories = persistPrimInventories;
int passPosition = 0;
int passEndPosition = 0;
@@ -184,13 +179,10 @@ namespace OpenSim.Data.MySQL
m_shapeDataAdapter.Fill(m_shapeTable);
- if (persistPrimInventories)
- {
m_itemsTable = createItemsTable();
m_dataSet.Tables.Add(m_itemsTable);
SetupItemsCommands(m_itemsDataAdapter, m_connection);
m_itemsDataAdapter.Fill(m_itemsTable);
- }
m_terrainTable = createTerrainTable();
m_dataSet.Tables.Add(m_terrainTable);
@@ -429,10 +421,7 @@ namespace OpenSim.Data.MySQL
shapeRow.Delete();
}
- if (persistPrimInventories)
- {
RemoveItems(uuid);
- }
// Remove prim row
row.Delete();
@@ -527,11 +516,8 @@ namespace OpenSim.Data.MySQL
createdObjects[new LLUUID(objID)].AddPart(prim);
}
- if (persistPrimInventories)
- {
LoadItems(prim);
}
- }
catch (Exception e)
{
m_log.Error("[REGION DB]: Failed create prim object, exception and data follows");
@@ -827,10 +813,7 @@ namespace OpenSim.Data.MySQL
m_primDataAdapter.Update(m_primTable);
m_shapeDataAdapter.Update(m_shapeTable);
- if (persistPrimInventories)
- {
m_itemsDataAdapter.Update(m_itemsTable);
- }
m_terrainDataAdapter.Update(m_terrainTable);
m_landDataAdapter.Update(m_landTable);
@@ -1812,9 +1795,6 @@ namespace OpenSim.Data.MySQL
///
public void StorePrimInventory(LLUUID primID, ICollection items)
{
- if (!persistPrimInventories)
- return;
-
m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID);
// For now, we're just going to crudely remove all the previous inventory items
@@ -2241,7 +2221,6 @@ namespace OpenSim.Data.MySQL
// pDa.Fill(tmpDS, "prims");
// sDa.Fill(tmpDS, "primshapes");
- // if (persistPrimInventories)
// iDa.Fill(tmpDS, "primitems");
// 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
// Initialise("SQLiteDialect;SqliteClientDriver;URI=file:OpenSim.db,version=3", true);
// }
- public void Initialise(string connect, bool persistpriminventories)
+ public void Initialise(string connect)
{
// Split out the dialect, driver, and connect string
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
///
public class NullDataStore : IRegionDataStore
{
- public void Initialise(string dbfile, bool persistPrimInventories)
+ public void Initialise(string dbfile)
{
return;
}
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
private String m_connectionString;
// Temporary attribute while this is experimental
- private bool persistPrimInventories;
/***********************************************************************
*
@@ -84,11 +83,9 @@ namespace OpenSim.Data.SQLite
///
///
/// the connection string
- /// ?
- public void Initialise(string connectionString, bool persistPrimInventories)
+ public void Initialise(string connectionString)
{
m_connectionString = connectionString;
- this.persistPrimInventories = persistPrimInventories;
ds = new DataSet();
@@ -137,12 +134,9 @@ namespace OpenSim.Data.SQLite
ds.Tables.Add(createShapeTable());
setupShapeCommands(shapeDa, m_conn);
- if (persistPrimInventories)
- {
ds.Tables.Add(createItemsTable());
setupItemsCommands(itemsDa, m_conn);
itemsDa.Fill(ds.Tables["primitems"]);
- }
ds.Tables.Add(createTerrainTable());
setupTerrainCommands(terrainDa, m_conn);
@@ -267,10 +261,7 @@ namespace OpenSim.Data.SQLite
shapeRow.Delete();
}
- if (persistPrimInventories)
- {
RemoveItems(uuid);
- }
// Remove prim row
row.Delete();
@@ -367,11 +358,8 @@ namespace OpenSim.Data.SQLite
createdObjects[new LLUUID(objID)].AddPart(prim);
}
- if (persistPrimInventories)
- {
LoadItems(prim);
}
- }
catch (Exception e)
{
m_log.Error("[REGION DB]: Failed create prim object, exception and data follows");
@@ -615,10 +603,7 @@ namespace OpenSim.Data.SQLite
primDa.Update(ds, "prims");
shapeDa.Update(ds, "primshapes");
- if (persistPrimInventories)
- {
itemsDa.Update(ds, "primitems");
- }
terrainDa.Update(ds, "terrain");
landDa.Update(ds, "land");
@@ -1475,9 +1460,6 @@ namespace OpenSim.Data.SQLite
///
public void StorePrimInventory(LLUUID primID, ICollection items)
{
- if (!persistPrimInventories)
- return;
-
m_log.InfoFormat("[REGION DB]: Entered StorePrimInventory with prim ID {0}", primID);
DataTable dbItems = ds.Tables["primitems"];
@@ -1779,8 +1761,6 @@ namespace OpenSim.Data.SQLite
// m_log.Warn("[REGION DB]: Shapes Table Already Exists");
// }
- // if (persistPrimInventories)
- // {
// try
// {
// icmd.ExecuteNonQuery();
@@ -1789,7 +1769,6 @@ namespace OpenSim.Data.SQLite
// {
// m_log.Warn("[REGION DB]: Primitives Inventory Table Already Exists");
// }
- // }
// try
// {
@@ -1851,7 +1830,6 @@ namespace OpenSim.Data.SQLite
pDa.Fill(tmpDS, "prims");
sDa.Fill(tmpDS, "primshapes");
- if (persistPrimInventories)
iDa.Fill(tmpDS, "primitems");
tDa.Fill(tmpDS, "terrain");
@@ -1874,7 +1852,6 @@ namespace OpenSim.Data.SQLite
// pDa.Fill(tmpDS, "prims");
// sDa.Fill(tmpDS, "primshapes");
- // if (persistPrimInventories)
// iDa.Fill(tmpDS, "primitems");
// tDa.Fill(tmpDS, "terrain");
--
cgit v1.1