mirror of
https://github.com/opensim/opensim.git
synced 2026-06-19 20:05:47 +08:00
Reverting the memory leak patch for MySQL. Problems have been reported with the grid server after running for several hours
This commit is contained in:
@@ -40,10 +40,6 @@ namespace OpenSim.Data.MySQL
|
||||
/// </summary>
|
||||
public class MySqlFramework
|
||||
{
|
||||
private static readonly log4net.ILog m_log =
|
||||
log4net.LogManager.GetLogger(
|
||||
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected MySqlConnection m_Connection;
|
||||
|
||||
protected MySqlFramework(string connectionString)
|
||||
@@ -73,11 +69,12 @@ namespace OpenSim.Data.MySQL
|
||||
}
|
||||
catch (MySqlException e)
|
||||
{
|
||||
m_log.Error(e.Message, e);
|
||||
Console.WriteLine(e.ToString());
|
||||
if (errorSeen)
|
||||
throw;
|
||||
|
||||
// This is "Server has gone away" and "Server lost"
|
||||
//
|
||||
if (e.Number == 2006 || e.Number == 2013)
|
||||
{
|
||||
errorSeen = true;
|
||||
@@ -96,7 +93,7 @@ namespace OpenSim.Data.MySQL
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error(e.Message, e);
|
||||
Console.WriteLine(e.ToString());
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -113,11 +110,11 @@ namespace OpenSim.Data.MySQL
|
||||
return cmd.ExecuteReader();
|
||||
}
|
||||
|
||||
protected void CloseDBConnection(IDataReader reader, MySqlCommand cmd)
|
||||
protected void CloseReaderCommand(MySqlCommand cmd)
|
||||
{
|
||||
reader.Close();
|
||||
cmd.Connection.Close();
|
||||
cmd.Connection.Dispose();
|
||||
cmd.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user