* 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
0.6.0-stable
Justin Clarke Casey 2008-05-01 13:27:40 +00:00
parent 6e9042c3d3
commit d72bdf432a
14 changed files with 98 additions and 98 deletions

View File

@ -49,7 +49,7 @@ namespace OpenSim.Data.MSSQL
// null as the version, indicates that the table didn't exist // null as the version, indicates that the table didn't exist
if (tableName == null) if (tableName == null)
{ {
m_log.Info("[ASSETS]: Creating new database tables"); m_log.Info("[ASSET DB]: Creating new database tables");
database.ExecuteResourceSql("CreateAssetsTable.sql"); database.ExecuteResourceSql("CreateAssetsTable.sql");
return; return;
} }

View File

@ -84,7 +84,7 @@ namespace OpenSim.Data.MSSQL
m_dataSet = new DataSet(); m_dataSet = new DataSet();
this.persistPrimInventories = persistPrimInventories; this.persistPrimInventories = persistPrimInventories;
m_log.Info("[DATASTORE]: MSSql - connecting: " + connectionString); m_log.Info("[REGION DB]: MSSql - connecting: " + connectionString);
m_connection = new SqlConnection(connectionString); m_connection = new SqlConnection(connectionString);
SqlCommand primSelectCmd = new SqlCommand(m_primSelect, m_connection); SqlCommand primSelectCmd = new SqlCommand(m_primSelect, m_connection);
@ -154,7 +154,7 @@ namespace OpenSim.Data.MSSQL
{ {
if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0) if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0)
{ {
m_log.Info("[DATASTORE]: Adding obj: " + obj.UUID + " to region: " + regionUUID); m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
addPrim(prim, obj.UUID, regionUUID); addPrim(prim, obj.UUID, regionUUID);
} }
else else
@ -171,7 +171,7 @@ namespace OpenSim.Data.MSSQL
{ {
// Instance.RemoveObject(obj, regionUUID); // Instance.RemoveObject(obj, regionUUID);
m_log.InfoFormat("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID);
DataTable prims = m_primTable; DataTable prims = m_primTable;
DataTable shapes = m_shapeTable; DataTable shapes = m_shapeTable;
@ -238,7 +238,7 @@ namespace OpenSim.Data.MSSQL
lock (m_dataSet) lock (m_dataSet)
{ {
DataRow[] primsForRegion = prims.Select(byRegion, orderByParent); DataRow[] primsForRegion = prims.Select(byRegion, orderByParent);
m_log.Info("[DATASTORE]: " + m_log.Info("[REGION DB]: " +
"Loaded " + primsForRegion.Length + " prims for region: " + regionUUID); "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID);
foreach (DataRow primRow in primsForRegion) foreach (DataRow primRow in primsForRegion)
@ -342,7 +342,7 @@ namespace OpenSim.Data.MSSQL
public void StoreTerrain(double[,] ter, LLUUID regionID) public void StoreTerrain(double[,] ter, LLUUID regionID)
{ {
int revision = Util.UnixTimeSinceEpoch(); int revision = Util.UnixTimeSinceEpoch();
m_log.Info("[DATASTORE]: Storing terrain revision r" + revision.ToString()); m_log.Info("[REGION DB]: Storing terrain revision r" + revision.ToString());
DataTable terrain = m_dataSet.Tables["terrain"]; DataTable terrain = m_dataSet.Tables["terrain"];
lock (m_dataSet) lock (m_dataSet)
@ -395,11 +395,11 @@ namespace OpenSim.Data.MSSQL
} }
else else
{ {
m_log.Info("[DATASTORE]: No terrain found for region"); m_log.Info("[REGION DB]: No terrain found for region");
return null; return null;
} }
m_log.Info("[DATASTORE]: Loaded terrain revision r" + rev.ToString()); m_log.Info("[REGION DB]: Loaded terrain revision r" + rev.ToString());
} }
return terret; return terret;
@ -1200,7 +1200,7 @@ namespace OpenSim.Data.MSSQL
if (!persistPrimInventories) if (!persistPrimInventories)
return; return;
m_log.InfoFormat("[DATASTORE]: Persisting Prim Inventory with prim ID {0}", primID); m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID);
// For now, we're just going to crudely remove all the previous inventory items // For now, we're just going to crudely remove all the previous inventory items
// no matter whether they have changed or not, and replace them with the current set. // no matter whether they have changed or not, and replace them with the current set.
@ -1212,7 +1212,7 @@ namespace OpenSim.Data.MSSQL
foreach (TaskInventoryItem newItem in items) foreach (TaskInventoryItem newItem in items)
{ {
// m_log.InfoFormat( // m_log.InfoFormat(
// "[DATASTORE]: " + // "[REGION DB]: " +
// "Adding item {0}, {1} to prim ID {2}", // "Adding item {0}, {1} to prim ID {2}",
// newItem.Name, newItem.ItemID, newItem.ParentPartID); // newItem.Name, newItem.ItemID, newItem.ParentPartID);
@ -1516,7 +1516,7 @@ namespace OpenSim.Data.MSSQL
} }
catch (SqlException) catch (SqlException)
{ {
m_log.Info("[DATASTORE]: MySql Database doesn't exist... creating"); m_log.Info("[REGION DB]: MySql Database doesn't exist... creating");
InitDB(conn); InitDB(conn);
} }
@ -1534,7 +1534,7 @@ namespace OpenSim.Data.MSSQL
{ {
if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName)) if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName))
{ {
m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); m_log.Info("[REGION DB]: Missing required column:" + col.ColumnName);
return false; return false;
} }
} }
@ -1543,7 +1543,7 @@ namespace OpenSim.Data.MSSQL
{ {
if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName)) if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName))
{ {
m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); m_log.Info("[REGION DB]: Missing required column:" + col.ColumnName);
return false; return false;
} }
} }
@ -1554,7 +1554,7 @@ namespace OpenSim.Data.MSSQL
{ {
if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName)) if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName))
{ {
m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName); m_log.Info("[REGION DB]: Missing require column:" + col.ColumnName);
return false; return false;
} }
} }
@ -1563,7 +1563,7 @@ namespace OpenSim.Data.MSSQL
{ {
if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName)) if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName))
{ {
m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName); m_log.Info("[REGION DB]: Missing require column:" + col.ColumnName);
return false; return false;
} }
} }
@ -1572,7 +1572,7 @@ namespace OpenSim.Data.MSSQL
{ {
if (!tmpDS.Tables["landaccesslist"].Columns.Contains(col.ColumnName)) if (!tmpDS.Tables["landaccesslist"].Columns.Contains(col.ColumnName))
{ {
m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName); m_log.Info("[REGION DB]: Missing require column:" + col.ColumnName);
return false; return false;
} }
} }

View File

@ -87,7 +87,7 @@ namespace OpenSim.Data.MSSQL
} }
catch (Exception) catch (Exception)
{ {
m_log.Info("[DATASTORE]: MSSQL Database doesn't exist... creating"); m_log.Info("[GRID DB]: MSSQL Database doesn't exist... creating");
database.ExecuteResourceSql("Mssql-regions.sql"); database.ExecuteResourceSql("Mssql-regions.sql");
} }
} }
@ -217,7 +217,7 @@ namespace OpenSim.Data.MSSQL
} }
else else
{ {
m_log.Error("[DATABASE]: Searched for a Region Name shorter then 3 characters"); m_log.Error("[GRID DB]: Searched for a Region Name shorter then 3 characters");
return null; return null;
} }
} }
@ -380,7 +380,7 @@ namespace OpenSim.Data.MSSQL
} }
catch (Exception e) catch (Exception e)
{ {
m_log.Error("MSSQLManager : " + e.ToString()); m_log.Error("[GRID DB]: " + e.ToString());
} }
return returnval; return returnval;

View File

@ -49,7 +49,7 @@ namespace OpenSim.Data.MySQL
// null as the version, indicates that the table didn't exist // null as the version, indicates that the table didn't exist
if (oldVersion == null) if (oldVersion == null)
{ {
m_log.Info("[ASSETS]: Creating new database tables"); m_log.Info("[ASSETS DB]: Creating new database tables");
_dbConnection.ExecuteResourceSql("CreateAssetsTable.sql"); _dbConnection.ExecuteResourceSql("CreateAssetsTable.sql");
return; return;
} }
@ -102,7 +102,7 @@ namespace OpenSim.Data.MySQL
catch (Exception e) catch (Exception e)
{ {
m_log.ErrorFormat( m_log.ErrorFormat(
"[ASSETS]: MySql failure fetching asset {0}" + Environment.NewLine + e.ToString() "[ASSETS DB]: MySql failure fetching asset {0}" + Environment.NewLine + e.ToString()
+ Environment.NewLine + "Attempting reconnection", assetID); + Environment.NewLine + "Attempting reconnection", assetID);
_dbConnection.Reconnect(); _dbConnection.Reconnect();
} }
@ -141,7 +141,7 @@ namespace OpenSim.Data.MySQL
catch (Exception e) catch (Exception e)
{ {
m_log.ErrorFormat( m_log.ErrorFormat(
"[ASSETS]: " + "[ASSETS DB]: " +
"MySql failure creating asset {0} with name {1}" + Environment.NewLine + e.ToString() "MySql failure creating asset {0} with name {1}" + Environment.NewLine + e.ToString()
+ Environment.NewLine + "Attempting reconnection", asset.FullID, asset.Name); + Environment.NewLine + "Attempting reconnection", asset.FullID, asset.Name);
_dbConnection.Reconnect(); _dbConnection.Reconnect();

View File

@ -88,7 +88,7 @@ namespace OpenSim.Data.MySQL
m_dataSet = new DataSet(); m_dataSet = new DataSet();
this.persistPrimInventories = persistPrimInventories; this.persistPrimInventories = persistPrimInventories;
m_log.Info("[DATASTORE]: MySql - connecting: " + connectionstring); m_log.Info("[REGION DB]: MySql - connecting: " + connectionstring);
m_connection = new MySqlConnection(connectionstring); m_connection = new MySqlConnection(connectionstring);
TestTablesVersionable(m_connection); TestTablesVersionable(m_connection);
@ -256,7 +256,7 @@ namespace OpenSim.Data.MySQL
{ {
if ((prim.GetEffectiveObjectFlags() & (uint) LLObject.ObjectFlags.Physics) == 0) if ((prim.GetEffectiveObjectFlags() & (uint) LLObject.ObjectFlags.Physics) == 0)
{ {
m_log.Info("[DATASTORE]: Adding obj: " + obj.UUID + " to region: " + regionUUID); m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
addPrim(prim, obj.UUID, regionUUID); addPrim(prim, obj.UUID, regionUUID);
} }
else else
@ -270,7 +270,7 @@ namespace OpenSim.Data.MySQL
public void RemoveObject(LLUUID obj, LLUUID regionUUID) public void RemoveObject(LLUUID obj, LLUUID regionUUID)
{ {
m_log.InfoFormat("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID);
DataTable prims = m_primTable; DataTable prims = m_primTable;
DataTable shapes = m_shapeTable; DataTable shapes = m_shapeTable;
@ -334,7 +334,7 @@ namespace OpenSim.Data.MySQL
lock (m_dataSet) lock (m_dataSet)
{ {
DataRow[] primsForRegion = prims.Select(byRegion, orderByParent); DataRow[] primsForRegion = prims.Select(byRegion, orderByParent);
m_log.Info("[DATASTORE]: " + m_log.Info("[REGION DB]: " +
"Loaded " + primsForRegion.Length + " prims for region: " + regionUUID); "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID);
foreach (DataRow primRow in primsForRegion) foreach (DataRow primRow in primsForRegion)
@ -390,11 +390,11 @@ namespace OpenSim.Data.MySQL
} }
catch (Exception e) catch (Exception e)
{ {
m_log.Error("[DATASTORE]: Failed create prim object, exception and data follows"); m_log.Error("[REGION DB]: Failed create prim object, exception and data follows");
m_log.Info("[DATASTORE]: " + e.ToString()); m_log.Info("[REGION DB]: " + e.ToString());
foreach (DataColumn col in prims.Columns) foreach (DataColumn col in prims.Columns)
{ {
m_log.Info("[DATASTORE]: Col: " + col.ColumnName + " => " + primRow[col]); m_log.Info("[REGION DB]: Col: " + col.ColumnName + " => " + primRow[col]);
} }
} }
} }
@ -438,7 +438,7 @@ namespace OpenSim.Data.MySQL
public void StoreTerrain(double[,] ter, LLUUID regionID) public void StoreTerrain(double[,] ter, LLUUID regionID)
{ {
int revision = Util.UnixTimeSinceEpoch(); int revision = Util.UnixTimeSinceEpoch();
m_log.Info("[DATASTORE]: Storing terrain revision r" + revision.ToString()); m_log.Info("[REGION DB]: Storing terrain revision r" + revision.ToString());
DataTable terrain = m_dataSet.Tables["terrain"]; DataTable terrain = m_dataSet.Tables["terrain"];
lock (m_dataSet) lock (m_dataSet)
@ -493,11 +493,11 @@ namespace OpenSim.Data.MySQL
} }
else else
{ {
m_log.Info("[DATASTORE]: No terrain found for region"); m_log.Info("[REGION DB]: No terrain found for region");
return null; return null;
} }
m_log.Info("[DATASTORE]: Loaded terrain revision r" + rev.ToString()); m_log.Info("[REGION DB]: Loaded terrain revision r" + rev.ToString());
} }
} }
return terret; return terret;
@ -1329,7 +1329,7 @@ namespace OpenSim.Data.MySQL
if (!persistPrimInventories) if (!persistPrimInventories)
return; return;
m_log.InfoFormat("[DATASTORE]: Persisting Prim Inventory with prim ID {0}", primID); m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID);
// For now, we're just going to crudely remove all the previous inventory items // For now, we're just going to crudely remove all the previous inventory items
// no matter whether they have changed or not, and replace them with the current set. // no matter whether they have changed or not, and replace them with the current set.
@ -1341,7 +1341,7 @@ namespace OpenSim.Data.MySQL
foreach (TaskInventoryItem newItem in items) foreach (TaskInventoryItem newItem in items)
{ {
// m_log.InfoFormat( // m_log.InfoFormat(
// "[DATASTORE]: " + // "[REGION DB]: " +
// "Adding item {0}, {1} to prim ID {2}", // "Adding item {0}, {1} to prim ID {2}",
// newItem.Name, newItem.ItemID, newItem.ParentPartID); // newItem.Name, newItem.ItemID, newItem.ParentPartID);
@ -1572,8 +1572,8 @@ namespace OpenSim.Data.MySQL
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Error("[MySql]: Error connecting to MySQL server: " + ex.Message); m_log.Error("[REGION DB]: Error connecting to MySQL server: " + ex.Message);
m_log.Error("[MySql]: Application is terminating!"); m_log.Error("[REGION DB]: Application is terminating!");
Thread.CurrentThread.Abort(); Thread.CurrentThread.Abort();
} }
} }
@ -1584,7 +1584,7 @@ namespace OpenSim.Data.MySQL
} }
catch (MySqlException e) catch (MySqlException e)
{ {
m_log.WarnFormat("[MySql]: Primitives Table Already Exists: {0}", e); m_log.WarnFormat("[REGION DB]: Primitives Table Already Exists: {0}", e);
} }
try try
@ -1593,7 +1593,7 @@ namespace OpenSim.Data.MySQL
} }
catch (MySqlException e) catch (MySqlException e)
{ {
m_log.WarnFormat("[MySql]: Shapes Table Already Exists: {0}", e); m_log.WarnFormat("[REGION DB]: Shapes Table Already Exists: {0}", e);
} }
try try
@ -1602,7 +1602,7 @@ namespace OpenSim.Data.MySQL
} }
catch (MySqlException e) catch (MySqlException e)
{ {
m_log.WarnFormat("[MySql]: Items Table Already Exists: {0}", e); m_log.WarnFormat("[REGION DB]: Items Table Already Exists: {0}", e);
} }
try try
@ -1611,7 +1611,7 @@ namespace OpenSim.Data.MySQL
} }
catch (MySqlException e) catch (MySqlException e)
{ {
m_log.WarnFormat("[MySql]: Terrain Table Already Exists: {0}", e); m_log.WarnFormat("[REGION DB]: Terrain Table Already Exists: {0}", e);
} }
//try //try
@ -1629,7 +1629,7 @@ namespace OpenSim.Data.MySQL
} }
catch (MySqlException e) catch (MySqlException e)
{ {
m_log.WarnFormat("[MySql]: LandAccessList Table Already Exists: {0}", e); m_log.WarnFormat("[REGION DB]: LandAccessList Table Already Exists: {0}", e);
} }
conn.Close(); conn.Close();
} }
@ -1682,7 +1682,7 @@ namespace OpenSim.Data.MySQL
{ {
if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName)) if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName))
{ {
m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); m_log.Info("[REGION DB]: Missing required column:" + col.ColumnName);
return false; return false;
} }
} }
@ -1691,7 +1691,7 @@ namespace OpenSim.Data.MySQL
{ {
if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName)) if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName))
{ {
m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); m_log.Info("[REGION DB]: Missing required column:" + col.ColumnName);
return false; return false;
} }
} }
@ -1702,7 +1702,7 @@ namespace OpenSim.Data.MySQL
{ {
if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName)) if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName))
{ {
m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName); m_log.Info("[REGION DB]: Missing require column:" + col.ColumnName);
return false; return false;
} }
} }
@ -1711,7 +1711,7 @@ namespace OpenSim.Data.MySQL
{ {
if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName)) if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName))
{ {
m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName); m_log.Info("[REGION DB]: Missing require column:" + col.ColumnName);
return false; return false;
} }
} }

View File

@ -284,7 +284,7 @@ namespace OpenSim.Data.MySQL
} }
else else
{ {
m_log.Error("[DATABASE]: Searched for a Region Name shorter then 3 characters"); m_log.Error("[GRID DB]: Searched for a Region Name shorter then 3 characters");
return null; return null;
} }
} }

View File

@ -89,7 +89,7 @@ namespace OpenSim.Data.MySQL
} }
catch(Exception e) catch(Exception e)
{ {
throw new Exception( "Connection error while using connection string ["+connectionString+"]", e ); throw new Exception("Connection error while using connection string ["+connectionString+"]", e);
} }
m_log.Info("[MYSQL]: Connection established"); m_log.Info("[MYSQL]: Connection established");

View File

@ -346,7 +346,7 @@ namespace OpenSim.Data.MySQL
override public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) override public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid)
{ {
m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called"); m_log.Info("[USER DB]: Stub UpdateUserCUrrentRegion called");
} }
override public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) override public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)

View File

@ -12,12 +12,12 @@ CREATE TABLE `inventoryitems` (
`creatorID` varchar(36) default NULL, `creatorID` varchar(36) default NULL,
`inventoryBasePermissions` int(10) unsigned NOT NULL default 0, `inventoryBasePermissions` int(10) unsigned NOT NULL default 0,
`inventoryEveryOnePermissions` int(10) unsigned NOT NULL default 0, `inventoryEveryOnePermissions` int(10) unsigned NOT NULL default 0,
`salePrice` int(11) default NULL, `salePrice` int(11) NOT NULL default 0,
`saleType` tinyint(4) default NULL, `saleType` tinyint(4) NOT NULL default 0,
`creationDate` int(11) default NULL, `creationDate` int(11) NOT NULL default 0,
`groupID` varchar(36) default NULL, `groupID` varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
`groupOwned` tinyint(4) default NULL, `groupOwned` tinyint(4) NOT NULL default 0,
`flags` int(11) unsigned default NULL, `flags` int(11) unsigned NOT NULL default 0,
PRIMARY KEY (`inventoryID`), PRIMARY KEY (`inventoryID`),
KEY `owner` (`avatarID`), KEY `owner` (`avatarID`),
KEY `folder` (`parentFolderID`) KEY `folder` (`parentFolderID`)

View File

@ -1,7 +1,7 @@
ALTER TABLE `inventoryitems` ALTER TABLE `inventoryitems`
ADD COLUMN `salePrice` int(11) NOT NULL default 0, ADD COLUMN `salePrice` int(11) NOT NULL default 0,
ADD COLUMN `saleType` tinyint(4) NOT NULL default 0, ADD COLUMN `saleType` tinyint(4) NOT NULL default 0,
ADD COLUMN `creationDate` int(11) NOT NULL default 3000, ADD COLUMN `creationDate` int(11) NOT NULL default 0,
ADD COLUMN `groupID` varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000', ADD COLUMN `groupID` varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
ADD COLUMN `groupOwned` tinyint(4) NOT NULL default 0, ADD COLUMN `groupOwned` tinyint(4) NOT NULL default 0,
ADD COLUMN `flags` int(11) unsigned NOT NULL default 0, ADD COLUMN `flags` int(11) unsigned NOT NULL default 0,

View File

@ -92,10 +92,10 @@ namespace OpenSim.Data.SQLite
override public void CreateAsset(AssetBase asset) override public void CreateAsset(AssetBase asset)
{ {
m_log.Info("[SQLITE]: Creating Asset " + Util.ToRawUuidString(asset.FullID)); m_log.Info("[ASSET DB]: Creating Asset " + Util.ToRawUuidString(asset.FullID));
if (ExistsAsset(asset.FullID)) if (ExistsAsset(asset.FullID))
{ {
m_log.Info("[SQLITE]: Asset exists already, ignoring."); m_log.Info("[ASSET DB]: Asset exists already, ignoring.");
} }
else else
{ {
@ -142,7 +142,7 @@ namespace OpenSim.Data.SQLite
int assetLength = (asset.Data != null) ? asset.Data.Length : 0; int assetLength = (asset.Data != null) ? asset.Data.Length : 0;
m_log.Info("[SQLITE]: " + m_log.Info("[ASSET DB]: " +
string.Format("Loaded {6} {5} Asset: [{0}][{3}/{4}] \"{1}\":{2} ({7} bytes)", string.Format("Loaded {6} {5} Asset: [{0}][{3}/{4}] \"{1}\":{2} ({7} bytes)",
asset.FullID, asset.Name, asset.Description, asset.Type, asset.FullID, asset.Name, asset.Description, asset.Type,
asset.InvType, temporary, local, assetLength)); asset.InvType, temporary, local, assetLength));
@ -181,7 +181,7 @@ namespace OpenSim.Data.SQLite
override public void CommitAssets() // force a sync to the database override public void CommitAssets() // force a sync to the database
{ {
m_log.Info("[SQLITE]: Attempting commit"); m_log.Info("[ASSET DB]: Attempting commit");
// lock (ds) // lock (ds)
// { // {
// da.Update(ds, "assets"); // da.Update(ds, "assets");
@ -268,7 +268,7 @@ namespace OpenSim.Data.SQLite
} }
catch (SqliteSyntaxException) catch (SqliteSyntaxException)
{ {
m_log.Info("[SQLITE]: SQLite Database doesn't exist... creating"); m_log.Info("[ASSET DB]: SQLite Database doesn't exist... creating");
InitDB(conn); InitDB(conn);
} }
return true; return true;

View File

@ -210,7 +210,7 @@ namespace OpenSim.Data.SQLite
if (inventoryRow == null) if (inventoryRow == null)
{ {
if (! add) if (! add)
m_log.ErrorFormat("Interface Misuse: Attempting to Update non-existant inventory item: {0}", item.ID); m_log.ErrorFormat("[INVENTORY DB]: Interface Misuse: Attempting to Update non-existant inventory item: {0}", item.ID);
inventoryRow = inventoryItemTable.NewRow(); inventoryRow = inventoryItemTable.NewRow();
fillItemRow(inventoryRow, item); fillItemRow(inventoryRow, item);
@ -219,7 +219,7 @@ namespace OpenSim.Data.SQLite
else else
{ {
if (add) if (add)
m_log.ErrorFormat("Interface Misuse: Attempting to Add inventory item that already exists: {0}", item.ID); m_log.ErrorFormat("[INVENTORY DB]: Interface Misuse: Attempting to Add inventory item that already exists: {0}", item.ID);
fillItemRow(inventoryRow, item); fillItemRow(inventoryRow, item);
} }

View File

@ -79,7 +79,7 @@ namespace OpenSim.Data.SQLite
ds = new DataSet(); ds = new DataSet();
m_log.Info("[DATASTORE]: Sqlite - connecting: " + connectionString); m_log.Info("[REGION DB]: Sqlite - connecting: " + connectionString);
m_conn = new SqliteConnection(m_connectionString); m_conn = new SqliteConnection(m_connectionString);
m_conn.Open(); m_conn.Open();
@ -143,7 +143,7 @@ namespace OpenSim.Data.SQLite
} }
catch (Exception) catch (Exception)
{ {
m_log.Info("[DATASTORE]: Caught fill error on primshapes table"); m_log.Info("[REGION DB]: Caught fill error on primshapes table");
} }
try try
@ -152,7 +152,7 @@ namespace OpenSim.Data.SQLite
} }
catch (Exception) catch (Exception)
{ {
m_log.Info("[DATASTORE]: Caught fill error on terrain table"); m_log.Info("[REGION DB]: Caught fill error on terrain table");
} }
try try
@ -161,7 +161,7 @@ namespace OpenSim.Data.SQLite
} }
catch (Exception) catch (Exception)
{ {
m_log.Info("[DATASTORE]: Caught fill error on land table"); m_log.Info("[REGION DB]: Caught fill error on land table");
} }
try try
@ -170,7 +170,7 @@ namespace OpenSim.Data.SQLite
} }
catch (Exception) catch (Exception)
{ {
m_log.Info("[DATASTORE]: Caught fill error on landaccesslist table"); m_log.Info("[REGION DB]: Caught fill error on landaccesslist table");
} }
return; return;
} }
@ -184,7 +184,7 @@ namespace OpenSim.Data.SQLite
{ {
if ((prim.GetEffectiveObjectFlags() & (uint) LLObject.ObjectFlags.Physics) == 0) if ((prim.GetEffectiveObjectFlags() & (uint) LLObject.ObjectFlags.Physics) == 0)
{ {
m_log.Info("[DATASTORE]: Adding obj: " + obj.UUID + " to region: " + regionUUID); m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID)); addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID));
} }
else if (prim.Stopped) else if (prim.Stopped)
@ -206,7 +206,7 @@ namespace OpenSim.Data.SQLite
public void RemoveObject(LLUUID obj, LLUUID regionUUID) public void RemoveObject(LLUUID obj, LLUUID regionUUID)
{ {
m_log.InfoFormat("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID);
DataTable prims = ds.Tables["prims"]; DataTable prims = ds.Tables["prims"];
DataTable shapes = ds.Tables["primshapes"]; DataTable shapes = ds.Tables["primshapes"];
@ -275,7 +275,7 @@ namespace OpenSim.Data.SQLite
lock (ds) lock (ds)
{ {
DataRow[] primsForRegion = prims.Select(byRegion, orderByParent); DataRow[] primsForRegion = prims.Select(byRegion, orderByParent);
m_log.Info("[DATASTORE]: " + m_log.Info("[REGION DB]: " +
"Loaded " + primsForRegion.Length + " prims for region: " + regionUUID); "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID);
foreach (DataRow primRow in primsForRegion) foreach (DataRow primRow in primsForRegion)
@ -298,7 +298,7 @@ namespace OpenSim.Data.SQLite
else else
{ {
m_log.Info( m_log.Info(
"No shape found for prim in storage, so setting default box shape"); "[REGION DB]: No shape found for prim in storage, so setting default box shape");
prim.Shape = PrimitiveBaseShape.Default; prim.Shape = PrimitiveBaseShape.Default;
} }
group.AddPart(prim); group.AddPart(prim);
@ -318,7 +318,7 @@ namespace OpenSim.Data.SQLite
else else
{ {
m_log.Info( m_log.Info(
"No shape found for prim in storage, so setting default box shape"); "[REGION DB]: No shape found for prim in storage, so setting default box shape");
prim.Shape = PrimitiveBaseShape.Default; prim.Shape = PrimitiveBaseShape.Default;
} }
createdObjects[new LLUUID(objID)].AddPart(prim); createdObjects[new LLUUID(objID)].AddPart(prim);
@ -331,11 +331,11 @@ namespace OpenSim.Data.SQLite
} }
catch (Exception e) catch (Exception e)
{ {
m_log.Error("[DATASTORE]: Failed create prim object, exception and data follows"); m_log.Error("[REGION DB]: Failed create prim object, exception and data follows");
m_log.Info("[DATASTORE]: " + e.ToString()); m_log.Info("[REGION DB]: " + e.ToString());
foreach (DataColumn col in prims.Columns) foreach (DataColumn col in prims.Columns)
{ {
m_log.Info("[DATASTORE]: Col: " + col.ColumnName + " => " + primRow[col]); m_log.Info("[REGION DB]: Col: " + col.ColumnName + " => " + primRow[col]);
} }
} }
} }
@ -384,7 +384,7 @@ namespace OpenSim.Data.SQLite
// the following is an work around for .NET. The perf // the following is an work around for .NET. The perf
// issues associated with it aren't as bad as you think. // issues associated with it aren't as bad as you think.
m_log.Info("[DATASTORE]: Storing terrain revision r" + revision.ToString()); m_log.Info("[REGION DB]: Storing terrain revision r" + revision.ToString());
String sql = "insert into terrain(RegionUUID, Revision, Heightfield)" + String sql = "insert into terrain(RegionUUID, Revision, Heightfield)" +
" values(:RegionUUID, :Revision, :Heightfield)"; " values(:RegionUUID, :Revision, :Heightfield)";
@ -448,11 +448,11 @@ namespace OpenSim.Data.SQLite
} }
else else
{ {
m_log.Info("[DATASTORE]: No terrain found for region"); m_log.Info("[REGION DB]: No terrain found for region");
return null; return null;
} }
m_log.Info("[DATASTORE]: Loaded terrain revision r" + rev.ToString()); m_log.Info("[REGION DB]: Loaded terrain revision r" + rev.ToString());
} }
} }
return terret; return terret;
@ -988,7 +988,7 @@ namespace OpenSim.Data.SQLite
m_conn.Close(); m_conn.Close();
m_conn.Dispose(); m_conn.Dispose();
m_log.Error("[SQLITE]: The land table was recently updated. You need to restart the simulator. Exiting now."); m_log.Error("[REGION DB]: The land table was recently updated. You need to restart the simulator. Exiting now.");
System.Threading.Thread.Sleep(10000); System.Threading.Thread.Sleep(10000);
@ -999,7 +999,7 @@ namespace OpenSim.Data.SQLite
catch (System.Exception) catch (System.Exception)
{ {
// ICK! but it's better then A thousand red SQLITE error messages! // ICK! but it's better then A thousand red SQLITE error messages!
m_log.Error("[SQLITE]: The land table was recently updated. You need to restart the simulator"); m_log.Error("[REGION DB]: The land table was recently updated. You need to restart the simulator");
Environment.Exit(0); Environment.Exit(0);
} }
} }
@ -1314,7 +1314,7 @@ namespace OpenSim.Data.SQLite
if (!persistPrimInventories) if (!persistPrimInventories)
return; return;
m_log.InfoFormat("[DATASTORE]: Entered StorePrimInventory with prim ID {0}", primID); m_log.InfoFormat("[REGION DB]: Entered StorePrimInventory with prim ID {0}", primID);
DataTable dbItems = ds.Tables["primitems"]; DataTable dbItems = ds.Tables["primitems"];
@ -1555,7 +1555,7 @@ namespace OpenSim.Data.SQLite
} }
catch (SqliteSyntaxException) catch (SqliteSyntaxException)
{ {
m_log.Warn("[SQLITE]: Primitives Table Already Exists"); m_log.Warn("[REGION DB]: Primitives Table Already Exists");
} }
try try
@ -1564,7 +1564,7 @@ namespace OpenSim.Data.SQLite
} }
catch (SqliteSyntaxException) catch (SqliteSyntaxException)
{ {
m_log.Warn("[SQLITE]: Shapes Table Already Exists"); m_log.Warn("[REGION DB]: Shapes Table Already Exists");
} }
if (persistPrimInventories) if (persistPrimInventories)
@ -1575,7 +1575,7 @@ namespace OpenSim.Data.SQLite
} }
catch (SqliteSyntaxException) catch (SqliteSyntaxException)
{ {
m_log.Warn("[SQLITE]: Primitives Inventory Table Already Exists"); m_log.Warn("[REGION DB]: Primitives Inventory Table Already Exists");
} }
} }
@ -1585,7 +1585,7 @@ namespace OpenSim.Data.SQLite
} }
catch (SqliteSyntaxException) catch (SqliteSyntaxException)
{ {
m_log.Warn("[SQLITE]: Terrain Table Already Exists"); m_log.Warn("[REGION DB]: Terrain Table Already Exists");
} }
try try
@ -1594,7 +1594,7 @@ namespace OpenSim.Data.SQLite
} }
catch (SqliteSyntaxException) catch (SqliteSyntaxException)
{ {
m_log.Warn("[SQLITE]: Land Table Already Exists"); m_log.Warn("[REGION DB]: Land Table Already Exists");
} }
try try
@ -1660,7 +1660,7 @@ namespace OpenSim.Data.SQLite
{ {
if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName)) if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName))
{ {
m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); m_log.Info("[REGION DB]: Missing required column:" + col.ColumnName);
return false; return false;
} }
} }
@ -1669,7 +1669,7 @@ namespace OpenSim.Data.SQLite
{ {
if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName)) if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName))
{ {
m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); m_log.Info("[REGION DB]: Missing required column:" + col.ColumnName);
return false; return false;
} }
} }
@ -1680,7 +1680,7 @@ namespace OpenSim.Data.SQLite
{ {
if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName)) if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName))
{ {
m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName); m_log.Info("[REGION DB]: Missing require column:" + col.ColumnName);
return false; return false;
} }
} }
@ -1689,7 +1689,7 @@ namespace OpenSim.Data.SQLite
{ {
if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName)) if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName))
{ {
m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName); m_log.Info("[REGION DB]: Missing require column:" + col.ColumnName);
return false; return false;
} }
} }

View File

@ -93,7 +93,7 @@ namespace OpenSim.Data.SQLite
} }
catch (SqliteSyntaxException) catch (SqliteSyntaxException)
{ {
m_log.Info("[SQLITE]: userfriends table not found, creating.... "); m_log.Info("[USER DB]: userfriends table not found, creating.... ");
InitDB(conn); InitDB(conn);
daf.Fill(ds.Tables["userfriends"]); daf.Fill(ds.Tables["userfriends"]);
} }
@ -221,7 +221,7 @@ namespace OpenSim.Data.SQLite
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Error("[USER]: Exception getting friends list for user: " + ex.ToString()); m_log.Error("[USER DB]: Exception getting friends list for user: " + ex.ToString());
} }
} }
@ -235,7 +235,7 @@ namespace OpenSim.Data.SQLite
override public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) override public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid)
{ {
m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called"); m_log.Info("[USER DB]: Stub UpdateUserCUrrentRegion called");
} }
@ -343,7 +343,7 @@ namespace OpenSim.Data.SQLite
DataRow row = users.Rows.Find(Util.ToRawUuidString(AgentID)); DataRow row = users.Rows.Find(Util.ToRawUuidString(AgentID));
if (row == null) if (row == null)
{ {
m_log.Warn("[WEBLOGIN]: Unable to store new web login key for non-existant user"); m_log.Warn("[USER DB]: Unable to store new web login key for non-existant user");
} }
else else
{ {
@ -415,7 +415,7 @@ namespace OpenSim.Data.SQLite
} }
} }
m_log.Info("[SQLITE]: " + m_log.Info("[USER DB]: " +
"Syncing user database: " + ds.Tables["users"].Rows.Count + " users stored"); "Syncing user database: " + ds.Tables["users"].Rows.Count + " users stored");
// save changes off to disk // save changes off to disk
da.Update(ds, "users"); da.Update(ds, "users");
@ -769,7 +769,7 @@ namespace OpenSim.Data.SQLite
} }
catch (Exception) catch (Exception)
{ {
m_log.Info("[USERS]: users table already exists"); m_log.Info("[USER DB]: users table already exists");
} }
try try
@ -778,7 +778,7 @@ namespace OpenSim.Data.SQLite
} }
catch (Exception) catch (Exception)
{ {
m_log.Info("[USERS]: userfriends table already exists"); m_log.Info("[USER DB]: userfriends table already exists");
} }
conn.Close(); conn.Close();
@ -801,7 +801,7 @@ namespace OpenSim.Data.SQLite
} }
catch (SqliteSyntaxException) catch (SqliteSyntaxException)
{ {
m_log.Info("[DATASTORE]: SQLite Database doesn't exist... creating"); m_log.Info("[USER DB]: SQLite Database doesn't exist... creating");
InitDB(conn); InitDB(conn);
} }
conn.Open(); conn.Open();