aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL
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/MSSQL
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/MSSQL')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLAssetData.cs2
-rw-r--r--OpenSim/Data/MSSQL/MSSQLDataStore.cs30
-rw-r--r--OpenSim/Data/MSSQL/MSSQLGridData.cs6
3 files changed, 19 insertions, 19 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
index d837e4e..5ae60a1 100644
--- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Data.MSSQL
49 // null as the version, indicates that the table didn't exist 49 // null as the version, indicates that the table didn't exist
50 if (tableName == null) 50 if (tableName == null)
51 { 51 {
52 m_log.Info("[ASSETS]: Creating new database tables"); 52 m_log.Info("[ASSET DB]: Creating new database tables");
53 database.ExecuteResourceSql("CreateAssetsTable.sql"); 53 database.ExecuteResourceSql("CreateAssetsTable.sql");
54 return; 54 return;
55 } 55 }
diff --git a/OpenSim/Data/MSSQL/MSSQLDataStore.cs b/OpenSim/Data/MSSQL/MSSQLDataStore.cs
index dd3d20e..82aab13 100644
--- a/OpenSim/Data/MSSQL/MSSQLDataStore.cs
+++ b/OpenSim/Data/MSSQL/MSSQLDataStore.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Data.MSSQL
84 m_dataSet = new DataSet(); 84 m_dataSet = new DataSet();
85 this.persistPrimInventories = persistPrimInventories; 85 this.persistPrimInventories = persistPrimInventories;
86 86
87 m_log.Info("[DATASTORE]: MSSql - connecting: " + connectionString); 87 m_log.Info("[REGION DB]: MSSql - connecting: " + connectionString);
88 m_connection = new SqlConnection(connectionString); 88 m_connection = new SqlConnection(connectionString);
89 89
90 SqlCommand primSelectCmd = new SqlCommand(m_primSelect, m_connection); 90 SqlCommand primSelectCmd = new SqlCommand(m_primSelect, m_connection);
@@ -154,7 +154,7 @@ namespace OpenSim.Data.MSSQL
154 { 154 {
155 if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0) 155 if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0)
156 { 156 {
157 m_log.Info("[DATASTORE]: Adding obj: " + obj.UUID + " to region: " + regionUUID); 157 m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
158 addPrim(prim, obj.UUID, regionUUID); 158 addPrim(prim, obj.UUID, regionUUID);
159 } 159 }
160 else 160 else
@@ -171,7 +171,7 @@ namespace OpenSim.Data.MSSQL
171 { 171 {
172 // Instance.RemoveObject(obj, regionUUID); 172 // Instance.RemoveObject(obj, regionUUID);
173 173
174 m_log.InfoFormat("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); 174 m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID);
175 175
176 DataTable prims = m_primTable; 176 DataTable prims = m_primTable;
177 DataTable shapes = m_shapeTable; 177 DataTable shapes = m_shapeTable;
@@ -238,7 +238,7 @@ namespace OpenSim.Data.MSSQL
238 lock (m_dataSet) 238 lock (m_dataSet)
239 { 239 {
240 DataRow[] primsForRegion = prims.Select(byRegion, orderByParent); 240 DataRow[] primsForRegion = prims.Select(byRegion, orderByParent);
241 m_log.Info("[DATASTORE]: " + 241 m_log.Info("[REGION DB]: " +
242 "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID); 242 "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID);
243 243
244 foreach (DataRow primRow in primsForRegion) 244 foreach (DataRow primRow in primsForRegion)
@@ -342,7 +342,7 @@ namespace OpenSim.Data.MSSQL
342 public void StoreTerrain(double[,] ter, LLUUID regionID) 342 public void StoreTerrain(double[,] ter, LLUUID regionID)
343 { 343 {
344 int revision = Util.UnixTimeSinceEpoch(); 344 int revision = Util.UnixTimeSinceEpoch();
345 m_log.Info("[DATASTORE]: Storing terrain revision r" + revision.ToString()); 345 m_log.Info("[REGION DB]: Storing terrain revision r" + revision.ToString());
346 346
347 DataTable terrain = m_dataSet.Tables["terrain"]; 347 DataTable terrain = m_dataSet.Tables["terrain"];
348 lock (m_dataSet) 348 lock (m_dataSet)
@@ -395,11 +395,11 @@ namespace OpenSim.Data.MSSQL
395 } 395 }
396 else 396 else
397 { 397 {
398 m_log.Info("[DATASTORE]: No terrain found for region"); 398 m_log.Info("[REGION DB]: No terrain found for region");
399 return null; 399 return null;
400 } 400 }
401 401
402 m_log.Info("[DATASTORE]: Loaded terrain revision r" + rev.ToString()); 402 m_log.Info("[REGION DB]: Loaded terrain revision r" + rev.ToString());
403 } 403 }
404 404
405 return terret; 405 return terret;
@@ -1200,7 +1200,7 @@ namespace OpenSim.Data.MSSQL
1200 if (!persistPrimInventories) 1200 if (!persistPrimInventories)
1201 return; 1201 return;
1202 1202
1203 m_log.InfoFormat("[DATASTORE]: Persisting Prim Inventory with prim ID {0}", primID); 1203 m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID);
1204 1204
1205 // For now, we're just going to crudely remove all the previous inventory items 1205 // For now, we're just going to crudely remove all the previous inventory items
1206 // no matter whether they have changed or not, and replace them with the current set. 1206 // no matter whether they have changed or not, and replace them with the current set.
@@ -1212,7 +1212,7 @@ namespace OpenSim.Data.MSSQL
1212 foreach (TaskInventoryItem newItem in items) 1212 foreach (TaskInventoryItem newItem in items)
1213 { 1213 {
1214 // m_log.InfoFormat( 1214 // m_log.InfoFormat(
1215 // "[DATASTORE]: " + 1215 // "[REGION DB]: " +
1216 // "Adding item {0}, {1} to prim ID {2}", 1216 // "Adding item {0}, {1} to prim ID {2}",
1217 // newItem.Name, newItem.ItemID, newItem.ParentPartID); 1217 // newItem.Name, newItem.ItemID, newItem.ParentPartID);
1218 1218
@@ -1516,7 +1516,7 @@ namespace OpenSim.Data.MSSQL
1516 } 1516 }
1517 catch (SqlException) 1517 catch (SqlException)
1518 { 1518 {
1519 m_log.Info("[DATASTORE]: MySql Database doesn't exist... creating"); 1519 m_log.Info("[REGION DB]: MySql Database doesn't exist... creating");
1520 InitDB(conn); 1520 InitDB(conn);
1521 } 1521 }
1522 1522
@@ -1534,7 +1534,7 @@ namespace OpenSim.Data.MSSQL
1534 { 1534 {
1535 if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName)) 1535 if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName))
1536 { 1536 {
1537 m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); 1537 m_log.Info("[REGION DB]: Missing required column:" + col.ColumnName);
1538 return false; 1538 return false;
1539 } 1539 }
1540 } 1540 }
@@ -1543,7 +1543,7 @@ namespace OpenSim.Data.MSSQL
1543 { 1543 {
1544 if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName)) 1544 if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName))
1545 { 1545 {
1546 m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); 1546 m_log.Info("[REGION DB]: Missing required column:" + col.ColumnName);
1547 return false; 1547 return false;
1548 } 1548 }
1549 } 1549 }
@@ -1554,7 +1554,7 @@ namespace OpenSim.Data.MSSQL
1554 { 1554 {
1555 if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName)) 1555 if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName))
1556 { 1556 {
1557 m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName); 1557 m_log.Info("[REGION DB]: Missing require column:" + col.ColumnName);
1558 return false; 1558 return false;
1559 } 1559 }
1560 } 1560 }
@@ -1563,7 +1563,7 @@ namespace OpenSim.Data.MSSQL
1563 { 1563 {
1564 if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName)) 1564 if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName))
1565 { 1565 {
1566 m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName); 1566 m_log.Info("[REGION DB]: Missing require column:" + col.ColumnName);
1567 return false; 1567 return false;
1568 } 1568 }
1569 } 1569 }
@@ -1572,7 +1572,7 @@ namespace OpenSim.Data.MSSQL
1572 { 1572 {
1573 if (!tmpDS.Tables["landaccesslist"].Columns.Contains(col.ColumnName)) 1573 if (!tmpDS.Tables["landaccesslist"].Columns.Contains(col.ColumnName))
1574 { 1574 {
1575 m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName); 1575 m_log.Info("[REGION DB]: Missing require column:" + col.ColumnName);
1576 return false; 1576 return false;
1577 } 1577 }
1578 } 1578 }
diff --git a/OpenSim/Data/MSSQL/MSSQLGridData.cs b/OpenSim/Data/MSSQL/MSSQLGridData.cs
index 3d859ff..3330732 100644
--- a/OpenSim/Data/MSSQL/MSSQLGridData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLGridData.cs
@@ -87,7 +87,7 @@ namespace OpenSim.Data.MSSQL
87 } 87 }
88 catch (Exception) 88 catch (Exception)
89 { 89 {
90 m_log.Info("[DATASTORE]: MSSQL Database doesn't exist... creating"); 90 m_log.Info("[GRID DB]: MSSQL Database doesn't exist... creating");
91 database.ExecuteResourceSql("Mssql-regions.sql"); 91 database.ExecuteResourceSql("Mssql-regions.sql");
92 } 92 }
93 } 93 }
@@ -217,7 +217,7 @@ namespace OpenSim.Data.MSSQL
217 } 217 }
218 else 218 else
219 { 219 {
220 m_log.Error("[DATABASE]: Searched for a Region Name shorter then 3 characters"); 220 m_log.Error("[GRID DB]: Searched for a Region Name shorter then 3 characters");
221 return null; 221 return null;
222 } 222 }
223 } 223 }
@@ -380,7 +380,7 @@ namespace OpenSim.Data.MSSQL
380 } 380 }
381 catch (Exception e) 381 catch (Exception e)
382 { 382 {
383 m_log.Error("MSSQLManager : " + e.ToString()); 383 m_log.Error("[GRID DB]: " + e.ToString());
384 } 384 }
385 385
386 return returnval; 386 return returnval;