From 2ca00ba47e5182feee6d11016f03d941fece7643 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Fri, 24 Aug 2007 18:52:41 +0000 Subject: add some better verbose statements to get a better feel for what is going on in the data paths --- .../MonoSqliteDataStore.cs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs index 7d45a30..d711e4b 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs @@ -59,12 +59,17 @@ namespace OpenSim.DataStore.MonoSqliteStorage TestTables(conn); ds.Tables.Add(createPrimTable()); - primDa.Fill(ds.Tables["prims"]); setupPrimCommands(primDa, conn); + primDa.Fill(ds.Tables["prims"]); MainLog.Instance.Verbose("DATASTORE", "Populated Prim Definitions"); ds.Tables.Add(createShapeTable()); + setupShapeCommands(shapeDa, conn); + // WORKAROUND: This is a work around for sqlite on + // windows, which gets really unhappy with blob columns + // that have no sample data in them. At some point we + // need to actually find a proper way to handle this. try { shapeDa.Fill(ds.Tables["primshapes"]); @@ -73,10 +78,7 @@ namespace OpenSim.DataStore.MonoSqliteStorage { MainLog.Instance.Verbose("DATASTORE", "Caught fill error on primshapes table"); } - - setupShapeCommands(shapeDa, conn); MainLog.Instance.Verbose("DATASTORE", "Populated Prim Shapes"); - return; } @@ -84,12 +86,15 @@ namespace OpenSim.DataStore.MonoSqliteStorage { foreach (SceneObjectPart prim in obj.Children.Values) { + MainLog.Instance.Verbose("DATASTORE", "Adding obj: " + obj.UUID + " to region: " + regionUUID); addPrim(prim, obj.UUID, regionUUID); } - + + // MainLog.Instance.Verbose("Attempting to do database update...."); primDa.Update(ds, "prims"); shapeDa.Update(ds, "primshapes"); + ds.AcceptChanges(); // MainLog.Instance.Verbose("Dump of prims:", ds.GetXml()); } @@ -124,7 +129,10 @@ namespace OpenSim.DataStore.MonoSqliteStorage DataTable shapes = ds.Tables["primshapes"]; string byRegion = "RegionUUID = '" + regionUUID.ToString() + "'"; - foreach (DataRow primRow in prims.Select(byRegion)) + DataRow[] primsForRegion = prims.Select(byRegion); + MainLog.Instance.Verbose("DATASTORE", "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID); + + foreach (DataRow primRow in primsForRegion) { string uuid = (string)primRow["UUID"]; string objID = (string)primRow["SceneGroupID"]; -- cgit v1.1