Remove code from an experimantal patch that wasn't supposed to be committed

0.6.1-post-fixes
Melanie Thielker 2008-11-23 21:03:54 +00:00
parent fba9e3f513
commit 95fec14201
1 changed files with 13 additions and 39 deletions

View File

@ -141,14 +141,6 @@ namespace OpenSim.Data.MySQL
Migration m = new Migration(m_connection, assem, "RegionStore"); Migration m = new Migration(m_connection, assem, "RegionStore");
m.Update(); m.Update();
PrepareConnection();
}
public void Dispose() {}
private void PrepareConnection()
{
GetWaitTimeout();
MySqlCommand primSelectCmd = new MySqlCommand(m_primSelect, m_connection); MySqlCommand primSelectCmd = new MySqlCommand(m_primSelect, m_connection);
m_primDataAdapter = new MySqlDataAdapter(primSelectCmd); m_primDataAdapter = new MySqlDataAdapter(primSelectCmd);
@ -211,6 +203,8 @@ namespace OpenSim.Data.MySQL
} }
} }
public void Dispose() {}
/// <summary> /// <summary>
/// Get the wait_timeout value for our connection /// Get the wait_timeout value for our connection
/// </summary> /// </summary>
@ -260,8 +254,6 @@ namespace OpenSim.Data.MySQL
m_connection.Close(); m_connection.Close();
m_connection = new MySqlConnection(m_connectionString); m_connection = new MySqlConnection(m_connectionString);
m_connection.Open(); m_connection.Open();
PrepareConnection();
} }
} }
@ -316,40 +308,22 @@ namespace OpenSim.Data.MySQL
/// <param name="regionUUID">The region UUID</param> /// <param name="regionUUID">The region UUID</param>
public void StoreObject(SceneObjectGroup obj, UUID regionUUID) public void StoreObject(SceneObjectGroup obj, UUID regionUUID)
{ {
int tries = 3; lock (m_dataSet)
while (tries > 0)
{ {
tries--; foreach (SceneObjectPart prim in obj.Children.Values)
try
{ {
lock (m_dataSet) if ((prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Temporary) == 0
&& (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) == 0)
{ {
foreach (SceneObjectPart prim in obj.Children.Values) //m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
{ addPrim(prim, obj.UUID, regionUUID);
if ((prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Temporary) == 0 }
&& (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) == 0) else
{ {
//m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); // m_log.Info("[DATASTORE]: Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID);
addPrim(prim, obj.UUID, regionUUID);
}
else
{
// m_log.Info("[DATASTORE]: Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID);
}
}
Commit();
return;
} }
} }
catch(MySqlException) Commit();
{
m_connection.Close();
m_connection = new MySqlConnection(m_connectionString);
m_connection.Open();
PrepareConnection();
}
} }
} }