use order by ParentID to ensure root prims are selected first
parent
9a09b7532d
commit
2b3b1faf6d
|
@ -129,11 +129,13 @@ namespace OpenSim.DataStore.MonoSqliteStorage
|
||||||
DataTable shapes = ds.Tables["primshapes"];
|
DataTable shapes = ds.Tables["primshapes"];
|
||||||
|
|
||||||
string byRegion = "RegionUUID = '" + regionUUID.ToString() + "'";
|
string byRegion = "RegionUUID = '" + regionUUID.ToString() + "'";
|
||||||
DataRow[] primsForRegion = prims.Select(byRegion);
|
string orderByParent = "ParentID ASC";
|
||||||
|
DataRow[] primsForRegion = prims.Select(byRegion, orderByParent);
|
||||||
MainLog.Instance.Verbose("DATASTORE", "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID);
|
MainLog.Instance.Verbose("DATASTORE", "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID);
|
||||||
|
|
||||||
foreach (DataRow primRow in primsForRegion)
|
foreach (DataRow primRow in primsForRegion)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
string uuid = (string)primRow["UUID"];
|
string uuid = (string)primRow["UUID"];
|
||||||
string objID = (string)primRow["SceneGroupID"];
|
string objID = (string)primRow["SceneGroupID"];
|
||||||
if (uuid == objID) //is new SceneObjectGroup ?
|
if (uuid == objID) //is new SceneObjectGroup ?
|
||||||
|
@ -169,13 +171,14 @@ namespace OpenSim.DataStore.MonoSqliteStorage
|
||||||
Console.WriteLine("No shape found for prim in storage, so setting default box shape");
|
Console.WriteLine("No shape found for prim in storage, so setting default box shape");
|
||||||
prim.Shape = BoxShape.Default;
|
prim.Shape = BoxShape.Default;
|
||||||
}
|
}
|
||||||
|
|
||||||
createdObjects[new LLUUID(objID)].AddPart(prim);
|
createdObjects[new LLUUID(objID)].AddPart(prim);
|
||||||
|
}
|
||||||
|
} catch(Exception) {
|
||||||
|
foreach (DataColumn col in prims.Columns) {
|
||||||
|
MainLog.Instance.Verbose("Col: " + col.ColumnName + " => " + primRow[col]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MainLog.Instance.Verbose("DATASTORE", "Sqlite - LoadObjects found " + prims.Rows.Count + " primitives");
|
MainLog.Instance.Verbose("DATASTORE", "Sqlite - LoadObjects found " + prims.Rows.Count + " primitives");
|
||||||
|
|
||||||
return retvals;
|
return retvals;
|
||||||
|
|
Loading…
Reference in New Issue