* If an orphaned group is found in the mysql or mssql databases (i.e. there is no prim where UUID = SceneGroupID), then force one prim to have UUID = SceneGroupID.

* A warning is posted about this on startup giving the location of the object
* This should allow one class of persistently undeletable prims to be removed
* This change should not cause any issues, but I still suggest that you backup your database beforehand
* If this doesn't work for previously linked objects, then you could also try the workaround in http://opensimulator.org/mantis/view.php?id=3059
* This change has been made to mysql and mssql, but sqlite appears to work in a different way
This commit is contained in:
Justin Clarke Casey
2009-01-29 20:08:04 +00:00
parent ea6e4a95ce
commit 13f069b945
3 changed files with 40 additions and 14 deletions

View File

@@ -455,6 +455,20 @@ namespace OpenSim.Data.MySQL
objects.Add(grp);
lastGroupID = groupID;
// There sometimes exist OpenSim bugs that 'orphan groups' so that none of the prims are
// recorded as the root prim (for which the UUID must equal the persisted group UUID). In
// this case, force the UUID to be the same as the group UUID so that at least these can be
// deleted (we need to change the UUID so that any other prims in the linkset can also be
// deleted).
if (prim.UUID != groupID && groupID != UUID.Zero)
{
m_log.WarnFormat(
"[REGION DB]: Found root prim {0} {1} at {2} where group was actually {3}. Forcing UUID to group UUID",
prim.Name, prim.UUID, prim.GroupPosition, groupID);
prim.UUID = groupID;
}
grp = new SceneObjectGroup(prim);
}
@@ -484,7 +498,7 @@ namespace OpenSim.Data.MySQL
foreach (SceneObjectPart part in prims)
LoadItems(part);
m_log.DebugFormat("[DATABASE] Loaded {0} objects using {1} prims", objects.Count, prims.Count);
m_log.DebugFormat("[REGION DB]: Loaded {0} objects using {1} prims", objects.Count, prims.Count);
return objects;
}