From 95fec142015fed4449a827155bcb12e019aaa7a2 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Sun, 23 Nov 2008 21:03:54 +0000
Subject: Remove code from an experimantal patch that wasn't supposed to be
committed
---
OpenSim/Data/MySQL/MySQLRegionData.cs | 52 +++++++++--------------------------
1 file changed, 13 insertions(+), 39 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs
index f57d485..2e36123 100644
--- a/OpenSim/Data/MySQL/MySQLRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLRegionData.cs
@@ -141,14 +141,6 @@ namespace OpenSim.Data.MySQL
Migration m = new Migration(m_connection, assem, "RegionStore");
m.Update();
- PrepareConnection();
- }
-
- public void Dispose() {}
-
- private void PrepareConnection()
- {
- GetWaitTimeout();
MySqlCommand primSelectCmd = new MySqlCommand(m_primSelect, m_connection);
m_primDataAdapter = new MySqlDataAdapter(primSelectCmd);
@@ -211,6 +203,8 @@ namespace OpenSim.Data.MySQL
}
}
+ public void Dispose() {}
+
///
/// Get the wait_timeout value for our connection
///
@@ -260,8 +254,6 @@ namespace OpenSim.Data.MySQL
m_connection.Close();
m_connection = new MySqlConnection(m_connectionString);
m_connection.Open();
-
- PrepareConnection();
}
}
@@ -316,40 +308,22 @@ namespace OpenSim.Data.MySQL
/// The region UUID
public void StoreObject(SceneObjectGroup obj, UUID regionUUID)
{
- int tries = 3;
- while (tries > 0)
+ lock (m_dataSet)
{
- tries--;
-
- try
+ foreach (SceneObjectPart prim in obj.Children.Values)
{
- lock (m_dataSet)
+ if ((prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Temporary) == 0
+ && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) == 0)
{
- foreach (SceneObjectPart prim in obj.Children.Values)
- {
- if ((prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Temporary) == 0
- && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) == 0)
- {
- //m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
- addPrim(prim, obj.UUID, regionUUID);
- }
- else
- {
- // m_log.Info("[DATASTORE]: Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID);
- }
- }
- Commit();
- return;
+ //m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
+ addPrim(prim, obj.UUID, regionUUID);
+ }
+ else
+ {
+ // m_log.Info("[DATASTORE]: Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID);
}
}
- catch(MySqlException)
- {
- m_connection.Close();
- m_connection = new MySqlConnection(m_connectionString);
- m_connection.Open();
-
- PrepareConnection();
- }
+ Commit();
}
}
--
cgit v1.1