aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Storage
diff options
context:
space:
mode:
authorSean Dague2007-08-24 18:52:41 +0000
committerSean Dague2007-08-24 18:52:41 +0000
commit2ca00ba47e5182feee6d11016f03d941fece7643 (patch)
treeac91efb215acf6cb6b142324b0360ba47052143e /OpenSim/Region/Storage
parentHopefully fixed the issue of inventory not working for the master account. (N... (diff)
downloadopensim-SC_OLD-2ca00ba47e5182feee6d11016f03d941fece7643.zip
opensim-SC_OLD-2ca00ba47e5182feee6d11016f03d941fece7643.tar.gz
opensim-SC_OLD-2ca00ba47e5182feee6d11016f03d941fece7643.tar.bz2
opensim-SC_OLD-2ca00ba47e5182feee6d11016f03d941fece7643.tar.xz
add some better verbose statements to get a better feel for what is going
on in the data paths
Diffstat (limited to 'OpenSim/Region/Storage')
-rw-r--r--OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs20
1 files changed, 14 insertions, 6 deletions
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
59 TestTables(conn); 59 TestTables(conn);
60 60
61 ds.Tables.Add(createPrimTable()); 61 ds.Tables.Add(createPrimTable());
62 primDa.Fill(ds.Tables["prims"]);
63 setupPrimCommands(primDa, conn); 62 setupPrimCommands(primDa, conn);
63 primDa.Fill(ds.Tables["prims"]);
64 MainLog.Instance.Verbose("DATASTORE", "Populated Prim Definitions"); 64 MainLog.Instance.Verbose("DATASTORE", "Populated Prim Definitions");
65 65
66 ds.Tables.Add(createShapeTable()); 66 ds.Tables.Add(createShapeTable());
67 setupShapeCommands(shapeDa, conn);
67 68
69 // WORKAROUND: This is a work around for sqlite on
70 // windows, which gets really unhappy with blob columns
71 // that have no sample data in them. At some point we
72 // need to actually find a proper way to handle this.
68 try 73 try
69 { 74 {
70 shapeDa.Fill(ds.Tables["primshapes"]); 75 shapeDa.Fill(ds.Tables["primshapes"]);
@@ -73,10 +78,7 @@ namespace OpenSim.DataStore.MonoSqliteStorage
73 { 78 {
74 MainLog.Instance.Verbose("DATASTORE", "Caught fill error on primshapes table"); 79 MainLog.Instance.Verbose("DATASTORE", "Caught fill error on primshapes table");
75 } 80 }
76
77 setupShapeCommands(shapeDa, conn);
78 MainLog.Instance.Verbose("DATASTORE", "Populated Prim Shapes"); 81 MainLog.Instance.Verbose("DATASTORE", "Populated Prim Shapes");
79
80 return; 82 return;
81 } 83 }
82 84
@@ -84,12 +86,15 @@ namespace OpenSim.DataStore.MonoSqliteStorage
84 { 86 {
85 foreach (SceneObjectPart prim in obj.Children.Values) 87 foreach (SceneObjectPart prim in obj.Children.Values)
86 { 88 {
89 MainLog.Instance.Verbose("DATASTORE", "Adding obj: " + obj.UUID + " to region: " + regionUUID);
87 addPrim(prim, obj.UUID, regionUUID); 90 addPrim(prim, obj.UUID, regionUUID);
88 } 91 }
89 92
93
90 // MainLog.Instance.Verbose("Attempting to do database update...."); 94 // MainLog.Instance.Verbose("Attempting to do database update....");
91 primDa.Update(ds, "prims"); 95 primDa.Update(ds, "prims");
92 shapeDa.Update(ds, "primshapes"); 96 shapeDa.Update(ds, "primshapes");
97 ds.AcceptChanges();
93 // MainLog.Instance.Verbose("Dump of prims:", ds.GetXml()); 98 // MainLog.Instance.Verbose("Dump of prims:", ds.GetXml());
94 } 99 }
95 100
@@ -124,7 +129,10 @@ namespace OpenSim.DataStore.MonoSqliteStorage
124 DataTable shapes = ds.Tables["primshapes"]; 129 DataTable shapes = ds.Tables["primshapes"];
125 130
126 string byRegion = "RegionUUID = '" + regionUUID.ToString() + "'"; 131 string byRegion = "RegionUUID = '" + regionUUID.ToString() + "'";
127 foreach (DataRow primRow in prims.Select(byRegion)) 132 DataRow[] primsForRegion = prims.Select(byRegion);
133 MainLog.Instance.Verbose("DATASTORE", "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID);
134
135 foreach (DataRow primRow in primsForRegion)
128 { 136 {
129 string uuid = (string)primRow["UUID"]; 137 string uuid = (string)primRow["UUID"];
130 string objID = (string)primRow["SceneGroupID"]; 138 string objID = (string)primRow["SceneGroupID"];