From aadd5627fedba6a50e9680e174bad3f0045c4943 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Fri, 24 Jul 2015 13:00:05 +0300 Subject: [PATCH] Removed unused code that checked wait_timeout in MySQLEstateData --- OpenSim/Data/MySQL/MySQLEstateData.cs | 34 --------------------------- 1 file changed, 34 deletions(-) diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs index 69c89d445b..fe1487bba8 100644 --- a/OpenSim/Data/MySQL/MySQLEstateData.cs +++ b/OpenSim/Data/MySQL/MySQLEstateData.cs @@ -43,12 +43,7 @@ namespace OpenSim.Data.MySQL private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private const string m_waitTimeoutSelect = "select @@wait_timeout"; - private string m_connectionString; - private long m_waitTimeout; - private long m_waitTimeoutLeeway = 60 * TimeSpan.TicksPerSecond; -// private long m_lastConnectionUse; private FieldInfo[] m_Fields; private Dictionary m_FieldMap = @@ -81,8 +76,6 @@ namespace OpenSim.Data.MySQL m_log.Debug("Exception: password not found in connection string\n" + e.ToString()); } - GetWaitTimeout(); - using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) { dbcon.Open(); @@ -108,33 +101,6 @@ namespace OpenSim.Data.MySQL get { return new List(m_FieldMap.Keys).ToArray(); } } - protected void GetWaitTimeout() - { - using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) - { - dbcon.Open(); - - using (MySqlCommand cmd = new MySqlCommand(m_waitTimeoutSelect, dbcon)) - { - using (MySqlDataReader dbReader = cmd.ExecuteReader(CommandBehavior.SingleRow)) - { - if (dbReader.Read()) - { - m_waitTimeout - = Convert.ToInt32(dbReader["@@wait_timeout"]) * - TimeSpan.TicksPerSecond + m_waitTimeoutLeeway; - } - } - } - -// m_lastConnectionUse = DateTime.Now.Ticks; - - m_log.DebugFormat( - "[REGION DB]: Connection wait timeout {0} seconds", - m_waitTimeout / TimeSpan.TicksPerSecond); - } - } - public EstateSettings LoadEstateSettings(UUID regionID, bool create) { string sql = "select estate_settings." + String.Join(",estate_settings.", FieldList) +