Removed unused code that checked wait_timeout in MySQLEstateData

0.8.2-post-fixes
Oren Hurvitz 2015-07-24 13:00:05 +03:00
parent 7457173fe4
commit aadd5627fe
1 changed files with 0 additions and 34 deletions

View File

@ -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<string, FieldInfo> 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<string>(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) +