diff options
author | Oren Hurvitz | 2015-07-24 13:00:05 +0300 |
---|---|---|
committer | Oren Hurvitz | 2015-08-11 07:35:39 +0100 |
commit | aadd5627fedba6a50e9680e174bad3f0045c4943 (patch) | |
tree | 3071c2d5b80541916b708fa3d822d373b00e3d36 /OpenSim/Data/MySQL/MySQLEstateData.cs | |
parent | Fixed calling "debug xengine log" without the 'level' parameter: this should ... (diff) | |
download | opensim-SC-aadd5627fedba6a50e9680e174bad3f0045c4943.zip opensim-SC-aadd5627fedba6a50e9680e174bad3f0045c4943.tar.gz opensim-SC-aadd5627fedba6a50e9680e174bad3f0045c4943.tar.bz2 opensim-SC-aadd5627fedba6a50e9680e174bad3f0045c4943.tar.xz |
Removed unused code that checked wait_timeout in MySQLEstateData
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLEstateData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLEstateData.cs | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs index 69c89d4..fe1487b 100644 --- a/OpenSim/Data/MySQL/MySQLEstateData.cs +++ b/OpenSim/Data/MySQL/MySQLEstateData.cs | |||
@@ -43,12 +43,7 @@ namespace OpenSim.Data.MySQL | |||
43 | private static readonly ILog m_log = | 43 | private static readonly ILog m_log = |
44 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
46 | private const string m_waitTimeoutSelect = "select @@wait_timeout"; | ||
47 | |||
48 | private string m_connectionString; | 46 | private string m_connectionString; |
49 | private long m_waitTimeout; | ||
50 | private long m_waitTimeoutLeeway = 60 * TimeSpan.TicksPerSecond; | ||
51 | // private long m_lastConnectionUse; | ||
52 | 47 | ||
53 | private FieldInfo[] m_Fields; | 48 | private FieldInfo[] m_Fields; |
54 | private Dictionary<string, FieldInfo> m_FieldMap = | 49 | private Dictionary<string, FieldInfo> m_FieldMap = |
@@ -81,8 +76,6 @@ namespace OpenSim.Data.MySQL | |||
81 | m_log.Debug("Exception: password not found in connection string\n" + e.ToString()); | 76 | m_log.Debug("Exception: password not found in connection string\n" + e.ToString()); |
82 | } | 77 | } |
83 | 78 | ||
84 | GetWaitTimeout(); | ||
85 | |||
86 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) | 79 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) |
87 | { | 80 | { |
88 | dbcon.Open(); | 81 | dbcon.Open(); |
@@ -108,33 +101,6 @@ namespace OpenSim.Data.MySQL | |||
108 | get { return new List<string>(m_FieldMap.Keys).ToArray(); } | 101 | get { return new List<string>(m_FieldMap.Keys).ToArray(); } |
109 | } | 102 | } |
110 | 103 | ||
111 | protected void GetWaitTimeout() | ||
112 | { | ||
113 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) | ||
114 | { | ||
115 | dbcon.Open(); | ||
116 | |||
117 | using (MySqlCommand cmd = new MySqlCommand(m_waitTimeoutSelect, dbcon)) | ||
118 | { | ||
119 | using (MySqlDataReader dbReader = cmd.ExecuteReader(CommandBehavior.SingleRow)) | ||
120 | { | ||
121 | if (dbReader.Read()) | ||
122 | { | ||
123 | m_waitTimeout | ||
124 | = Convert.ToInt32(dbReader["@@wait_timeout"]) * | ||
125 | TimeSpan.TicksPerSecond + m_waitTimeoutLeeway; | ||
126 | } | ||
127 | } | ||
128 | } | ||
129 | |||
130 | // m_lastConnectionUse = DateTime.Now.Ticks; | ||
131 | |||
132 | m_log.DebugFormat( | ||
133 | "[REGION DB]: Connection wait timeout {0} seconds", | ||
134 | m_waitTimeout / TimeSpan.TicksPerSecond); | ||
135 | } | ||
136 | } | ||
137 | |||
138 | public EstateSettings LoadEstateSettings(UUID regionID, bool create) | 104 | public EstateSettings LoadEstateSettings(UUID regionID, bool create) |
139 | { | 105 | { |
140 | string sql = "select estate_settings." + String.Join(",estate_settings.", FieldList) + | 106 | string sql = "select estate_settings." + String.Join(",estate_settings.", FieldList) + |