* Modified SQLite/SQLiteInventoryStore.cs to not throw if the inventory row does not exist, to match the mysql behavior. * Modified SQLite/SQLiteRegionData.cs to only persist temporary items following the same rules mysql uses. * Added another ignore to the inventory test that was missing. * Added a few more ignores to the RegionTest that the first version of my test were missing. * Added ignoring the root Folder ID, which is set by the inventory system. * Added several improvements to the PropertyCompareConstraint: Protection against infinite loops, added IComparable<T> (for UUID) and moved IComparable before the property matching. * Fixed a bug where I was saving the inside of the ignore expression instead of the outside of it.

This commit is contained in:
Kunnis
2009-08-15 06:08:36 -05:00
committed by Teravus Ovares (Dan Olivares)
parent 23d478f2fa
commit f6251ce810
6 changed files with 154 additions and 64 deletions

View File

@@ -301,7 +301,8 @@ namespace OpenSim.Data.SQLite
DataTable inventoryFolderTable = ds.Tables["inventoryfolders"];
inventoryRow = inventoryFolderTable.Rows.Find(item.Folder.ToString());
inventoryRow["version"] = (int)inventoryRow["version"] + 1;
if(inventoryRow != null) //MySQL doesn't throw an exception here, so sqlite shouldn't either.
inventoryRow["version"] = (int)inventoryRow["version"] + 1;
invFoldersDa.Update(ds, "inventoryfolders");
}

View File

@@ -307,26 +307,21 @@ namespace OpenSim.Data.SQLite
/// <param name="regionUUID">the region UUID</param>
public void StoreObject(SceneObjectGroup obj, UUID regionUUID)
{
uint flags = obj.RootPart.GetEffectiveObjectFlags();
// Eligibility check
//
if ((flags & (uint)PrimFlags.Temporary) != 0)
return;
if ((flags & (uint)PrimFlags.TemporaryOnRez) != 0)
return;
lock (ds)
{
foreach (SceneObjectPart prim in obj.Children.Values)
{
if ((prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Temporary) == 0
&& (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) == 0)
{
m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
addPrim(prim, obj.UUID, regionUUID);
}
else if (prim.Stopped)
{
//m_log.Info("[DATASTORE]: " +
//"Adding stopped obj: " + obj.UUID + " to region: " + regionUUID);
//addPrim(prim, obj.UUID.ToString(), regionUUID.ToString());
}
else
{
// m_log.Info("[DATASTORE]: Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID);
}
m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
addPrim(prim, obj.UUID, regionUUID);
}
}
@@ -1130,7 +1125,7 @@ namespace OpenSim.Data.SQLite
// explicit conversion of integers is required, which sort
// of sucks. No idea if there is a shortcut here or not.
prim.CreationDate = Convert.ToInt32(row["CreationDate"]);
prim.Name = (String) row["Name"];
prim.Name = row["Name"] == DBNull.Value ? string.Empty : (string)row["Name"];
// various text fields
prim.Text = (String) row["Text"];
prim.Color = Color.FromArgb(Convert.ToInt32(row["ColorA"]),