aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteRegionData.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-05-01 13:27:40 +0000
committerJustin Clarke Casey2008-05-01 13:27:40 +0000
commitd72bdf432a622f237b3030c1da9d1bccca20f83c (patch)
tree80b72df740a2858ac9ca8c3707ef45ff81488f67 /OpenSim/Data/SQLite/SQLiteRegionData.cs
parent* Change mysql inventory items table version 3 upgrade sql to provide explici... (diff)
downloadopensim-SC_OLD-d72bdf432a622f237b3030c1da9d1bccca20f83c.zip
opensim-SC_OLD-d72bdf432a622f237b3030c1da9d1bccca20f83c.tar.gz
opensim-SC_OLD-d72bdf432a622f237b3030c1da9d1bccca20f83c.tar.bz2
opensim-SC_OLD-d72bdf432a622f237b3030c1da9d1bccca20f83c.tar.xz
* Align new fields upgrade sql to have the same 'not null' and default settings as when an inventoryitems table is newly created
* Normalize logging titles in database code, though this doesn't yet cover invoking code
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteRegionData.cs')
-rw-r--r--OpenSim/Data/SQLite/SQLiteRegionData.cs56
1 files changed, 28 insertions, 28 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs
index b6463f3..5a3d350 100644
--- a/OpenSim/Data/SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs
@@ -79,7 +79,7 @@ namespace OpenSim.Data.SQLite
79 79
80 ds = new DataSet(); 80 ds = new DataSet();
81 81
82 m_log.Info("[DATASTORE]: Sqlite - connecting: " + connectionString); 82 m_log.Info("[REGION DB]: Sqlite - connecting: " + connectionString);
83 m_conn = new SqliteConnection(m_connectionString); 83 m_conn = new SqliteConnection(m_connectionString);
84 m_conn.Open(); 84 m_conn.Open();
85 85
@@ -143,7 +143,7 @@ namespace OpenSim.Data.SQLite
143 } 143 }
144 catch (Exception) 144 catch (Exception)
145 { 145 {
146 m_log.Info("[DATASTORE]: Caught fill error on primshapes table"); 146 m_log.Info("[REGION DB]: Caught fill error on primshapes table");
147 } 147 }
148 148
149 try 149 try
@@ -152,7 +152,7 @@ namespace OpenSim.Data.SQLite
152 } 152 }
153 catch (Exception) 153 catch (Exception)
154 { 154 {
155 m_log.Info("[DATASTORE]: Caught fill error on terrain table"); 155 m_log.Info("[REGION DB]: Caught fill error on terrain table");
156 } 156 }
157 157
158 try 158 try
@@ -161,7 +161,7 @@ namespace OpenSim.Data.SQLite
161 } 161 }
162 catch (Exception) 162 catch (Exception)
163 { 163 {
164 m_log.Info("[DATASTORE]: Caught fill error on land table"); 164 m_log.Info("[REGION DB]: Caught fill error on land table");
165 } 165 }
166 166
167 try 167 try
@@ -170,7 +170,7 @@ namespace OpenSim.Data.SQLite
170 } 170 }
171 catch (Exception) 171 catch (Exception)
172 { 172 {
173 m_log.Info("[DATASTORE]: Caught fill error on landaccesslist table"); 173 m_log.Info("[REGION DB]: Caught fill error on landaccesslist table");
174 } 174 }
175 return; 175 return;
176 } 176 }
@@ -184,7 +184,7 @@ namespace OpenSim.Data.SQLite
184 { 184 {
185 if ((prim.GetEffectiveObjectFlags() & (uint) LLObject.ObjectFlags.Physics) == 0) 185 if ((prim.GetEffectiveObjectFlags() & (uint) LLObject.ObjectFlags.Physics) == 0)
186 { 186 {
187 m_log.Info("[DATASTORE]: Adding obj: " + obj.UUID + " to region: " + regionUUID); 187 m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
188 addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID)); 188 addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID));
189 } 189 }
190 else if (prim.Stopped) 190 else if (prim.Stopped)
@@ -206,7 +206,7 @@ namespace OpenSim.Data.SQLite
206 206
207 public void RemoveObject(LLUUID obj, LLUUID regionUUID) 207 public void RemoveObject(LLUUID obj, LLUUID regionUUID)
208 { 208 {
209 m_log.InfoFormat("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); 209 m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID);
210 210
211 DataTable prims = ds.Tables["prims"]; 211 DataTable prims = ds.Tables["prims"];
212 DataTable shapes = ds.Tables["primshapes"]; 212 DataTable shapes = ds.Tables["primshapes"];
@@ -275,7 +275,7 @@ namespace OpenSim.Data.SQLite
275 lock (ds) 275 lock (ds)
276 { 276 {
277 DataRow[] primsForRegion = prims.Select(byRegion, orderByParent); 277 DataRow[] primsForRegion = prims.Select(byRegion, orderByParent);
278 m_log.Info("[DATASTORE]: " + 278 m_log.Info("[REGION DB]: " +
279 "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID); 279 "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID);
280 280
281 foreach (DataRow primRow in primsForRegion) 281 foreach (DataRow primRow in primsForRegion)
@@ -298,7 +298,7 @@ namespace OpenSim.Data.SQLite
298 else 298 else
299 { 299 {
300 m_log.Info( 300 m_log.Info(
301 "No shape found for prim in storage, so setting default box shape"); 301 "[REGION DB]: No shape found for prim in storage, so setting default box shape");
302 prim.Shape = PrimitiveBaseShape.Default; 302 prim.Shape = PrimitiveBaseShape.Default;
303 } 303 }
304 group.AddPart(prim); 304 group.AddPart(prim);
@@ -318,7 +318,7 @@ namespace OpenSim.Data.SQLite
318 else 318 else
319 { 319 {
320 m_log.Info( 320 m_log.Info(
321 "No shape found for prim in storage, so setting default box shape"); 321 "[REGION DB]: No shape found for prim in storage, so setting default box shape");
322 prim.Shape = PrimitiveBaseShape.Default; 322 prim.Shape = PrimitiveBaseShape.Default;
323 } 323 }
324 createdObjects[new LLUUID(objID)].AddPart(prim); 324 createdObjects[new LLUUID(objID)].AddPart(prim);
@@ -331,11 +331,11 @@ namespace OpenSim.Data.SQLite
331 } 331 }
332 catch (Exception e) 332 catch (Exception e)
333 { 333 {
334 m_log.Error("[DATASTORE]: Failed create prim object, exception and data follows"); 334 m_log.Error("[REGION DB]: Failed create prim object, exception and data follows");
335 m_log.Info("[DATASTORE]: " + e.ToString()); 335 m_log.Info("[REGION DB]: " + e.ToString());
336 foreach (DataColumn col in prims.Columns) 336 foreach (DataColumn col in prims.Columns)
337 { 337 {
338 m_log.Info("[DATASTORE]: Col: " + col.ColumnName + " => " + primRow[col]); 338 m_log.Info("[REGION DB]: Col: " + col.ColumnName + " => " + primRow[col]);
339 } 339 }
340 } 340 }
341 } 341 }
@@ -384,7 +384,7 @@ namespace OpenSim.Data.SQLite
384 384
385 // the following is an work around for .NET. The perf 385 // the following is an work around for .NET. The perf
386 // issues associated with it aren't as bad as you think. 386 // issues associated with it aren't as bad as you think.
387 m_log.Info("[DATASTORE]: Storing terrain revision r" + revision.ToString()); 387 m_log.Info("[REGION DB]: Storing terrain revision r" + revision.ToString());
388 String sql = "insert into terrain(RegionUUID, Revision, Heightfield)" + 388 String sql = "insert into terrain(RegionUUID, Revision, Heightfield)" +
389 " values(:RegionUUID, :Revision, :Heightfield)"; 389 " values(:RegionUUID, :Revision, :Heightfield)";
390 390
@@ -448,11 +448,11 @@ namespace OpenSim.Data.SQLite
448 } 448 }
449 else 449 else
450 { 450 {
451 m_log.Info("[DATASTORE]: No terrain found for region"); 451 m_log.Info("[REGION DB]: No terrain found for region");
452 return null; 452 return null;
453 } 453 }
454 454
455 m_log.Info("[DATASTORE]: Loaded terrain revision r" + rev.ToString()); 455 m_log.Info("[REGION DB]: Loaded terrain revision r" + rev.ToString());
456 } 456 }
457 } 457 }
458 return terret; 458 return terret;
@@ -988,7 +988,7 @@ namespace OpenSim.Data.SQLite
988 m_conn.Close(); 988 m_conn.Close();
989 m_conn.Dispose(); 989 m_conn.Dispose();
990 990
991 m_log.Error("[SQLITE]: The land table was recently updated. You need to restart the simulator. Exiting now."); 991 m_log.Error("[REGION DB]: The land table was recently updated. You need to restart the simulator. Exiting now.");
992 992
993 System.Threading.Thread.Sleep(10000); 993 System.Threading.Thread.Sleep(10000);
994 994
@@ -999,7 +999,7 @@ namespace OpenSim.Data.SQLite
999 catch (System.Exception) 999 catch (System.Exception)
1000 { 1000 {
1001 // ICK! but it's better then A thousand red SQLITE error messages! 1001 // ICK! but it's better then A thousand red SQLITE error messages!
1002 m_log.Error("[SQLITE]: The land table was recently updated. You need to restart the simulator"); 1002 m_log.Error("[REGION DB]: The land table was recently updated. You need to restart the simulator");
1003 Environment.Exit(0); 1003 Environment.Exit(0);
1004 } 1004 }
1005 } 1005 }
@@ -1314,7 +1314,7 @@ namespace OpenSim.Data.SQLite
1314 if (!persistPrimInventories) 1314 if (!persistPrimInventories)
1315 return; 1315 return;
1316 1316
1317 m_log.InfoFormat("[DATASTORE]: Entered StorePrimInventory with prim ID {0}", primID); 1317 m_log.InfoFormat("[REGION DB]: Entered StorePrimInventory with prim ID {0}", primID);
1318 1318
1319 DataTable dbItems = ds.Tables["primitems"]; 1319 DataTable dbItems = ds.Tables["primitems"];
1320 1320
@@ -1555,7 +1555,7 @@ namespace OpenSim.Data.SQLite
1555 } 1555 }
1556 catch (SqliteSyntaxException) 1556 catch (SqliteSyntaxException)
1557 { 1557 {
1558 m_log.Warn("[SQLITE]: Primitives Table Already Exists"); 1558 m_log.Warn("[REGION DB]: Primitives Table Already Exists");
1559 } 1559 }
1560 1560
1561 try 1561 try
@@ -1564,7 +1564,7 @@ namespace OpenSim.Data.SQLite
1564 } 1564 }
1565 catch (SqliteSyntaxException) 1565 catch (SqliteSyntaxException)
1566 { 1566 {
1567 m_log.Warn("[SQLITE]: Shapes Table Already Exists"); 1567 m_log.Warn("[REGION DB]: Shapes Table Already Exists");
1568 } 1568 }
1569 1569
1570 if (persistPrimInventories) 1570 if (persistPrimInventories)
@@ -1575,7 +1575,7 @@ namespace OpenSim.Data.SQLite
1575 } 1575 }
1576 catch (SqliteSyntaxException) 1576 catch (SqliteSyntaxException)
1577 { 1577 {
1578 m_log.Warn("[SQLITE]: Primitives Inventory Table Already Exists"); 1578 m_log.Warn("[REGION DB]: Primitives Inventory Table Already Exists");
1579 } 1579 }
1580 } 1580 }
1581 1581
@@ -1585,7 +1585,7 @@ namespace OpenSim.Data.SQLite
1585 } 1585 }
1586 catch (SqliteSyntaxException) 1586 catch (SqliteSyntaxException)
1587 { 1587 {
1588 m_log.Warn("[SQLITE]: Terrain Table Already Exists"); 1588 m_log.Warn("[REGION DB]: Terrain Table Already Exists");
1589 } 1589 }
1590 1590
1591 try 1591 try
@@ -1594,7 +1594,7 @@ namespace OpenSim.Data.SQLite
1594 } 1594 }
1595 catch (SqliteSyntaxException) 1595 catch (SqliteSyntaxException)
1596 { 1596 {
1597 m_log.Warn("[SQLITE]: Land Table Already Exists"); 1597 m_log.Warn("[REGION DB]: Land Table Already Exists");
1598 } 1598 }
1599 1599
1600 try 1600 try
@@ -1660,7 +1660,7 @@ namespace OpenSim.Data.SQLite
1660 { 1660 {
1661 if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName)) 1661 if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName))
1662 { 1662 {
1663 m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); 1663 m_log.Info("[REGION DB]: Missing required column:" + col.ColumnName);
1664 return false; 1664 return false;
1665 } 1665 }
1666 } 1666 }
@@ -1669,7 +1669,7 @@ namespace OpenSim.Data.SQLite
1669 { 1669 {
1670 if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName)) 1670 if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName))
1671 { 1671 {
1672 m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); 1672 m_log.Info("[REGION DB]: Missing required column:" + col.ColumnName);
1673 return false; 1673 return false;
1674 } 1674 }
1675 } 1675 }
@@ -1680,7 +1680,7 @@ namespace OpenSim.Data.SQLite
1680 { 1680 {
1681 if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName)) 1681 if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName))
1682 { 1682 {
1683 m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName); 1683 m_log.Info("[REGION DB]: Missing require column:" + col.ColumnName);
1684 return false; 1684 return false;
1685 } 1685 }
1686 } 1686 }
@@ -1689,7 +1689,7 @@ namespace OpenSim.Data.SQLite
1689 { 1689 {
1690 if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName)) 1690 if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName))
1691 { 1691 {
1692 m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName); 1692 m_log.Info("[REGION DB]: Missing require column:" + col.ColumnName);
1693 return false; 1693 return false;
1694 } 1694 }
1695 } 1695 }