diff options
author | John Hurliman | 2009-11-02 11:19:55 -0800 |
---|---|---|
committer | John Hurliman | 2009-11-02 11:19:55 -0800 |
commit | 6309fcc5b4b42102b5bb901dbbdf44846f5643f2 (patch) | |
tree | 9f71f2801c6ed6eaa40fe637b0cda520a9e5894f /OpenSim/Data/MySQL/MySQLFramework.cs | |
parent | Fix an invalid argument exception in the remote admin module when. (diff) | |
download | opensim-SC_OLD-6309fcc5b4b42102b5bb901dbbdf44846f5643f2.zip opensim-SC_OLD-6309fcc5b4b42102b5bb901dbbdf44846f5643f2.tar.gz opensim-SC_OLD-6309fcc5b4b42102b5bb901dbbdf44846f5643f2.tar.bz2 opensim-SC_OLD-6309fcc5b4b42102b5bb901dbbdf44846f5643f2.tar.xz |
Reverting the memory leak patch for MySQL. Problems have been reported with the grid server after running for several hours
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLFramework.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLFramework.cs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/OpenSim/Data/MySQL/MySQLFramework.cs b/OpenSim/Data/MySQL/MySQLFramework.cs index ccd1ab0..fd428ae 100644 --- a/OpenSim/Data/MySQL/MySQLFramework.cs +++ b/OpenSim/Data/MySQL/MySQLFramework.cs | |||
@@ -40,10 +40,6 @@ namespace OpenSim.Data.MySQL | |||
40 | /// </summary> | 40 | /// </summary> |
41 | public class MySqlFramework | 41 | public class MySqlFramework |
42 | { | 42 | { |
43 | private static readonly log4net.ILog m_log = | ||
44 | log4net.LogManager.GetLogger( | ||
45 | System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
47 | protected MySqlConnection m_Connection; | 43 | protected MySqlConnection m_Connection; |
48 | 44 | ||
49 | protected MySqlFramework(string connectionString) | 45 | protected MySqlFramework(string connectionString) |
@@ -73,11 +69,12 @@ namespace OpenSim.Data.MySQL | |||
73 | } | 69 | } |
74 | catch (MySqlException e) | 70 | catch (MySqlException e) |
75 | { | 71 | { |
76 | m_log.Error(e.Message, e); | 72 | Console.WriteLine(e.ToString()); |
77 | if (errorSeen) | 73 | if (errorSeen) |
78 | throw; | 74 | throw; |
79 | 75 | ||
80 | // This is "Server has gone away" and "Server lost" | 76 | // This is "Server has gone away" and "Server lost" |
77 | // | ||
81 | if (e.Number == 2006 || e.Number == 2013) | 78 | if (e.Number == 2006 || e.Number == 2013) |
82 | { | 79 | { |
83 | errorSeen = true; | 80 | errorSeen = true; |
@@ -96,7 +93,7 @@ namespace OpenSim.Data.MySQL | |||
96 | } | 93 | } |
97 | catch (Exception e) | 94 | catch (Exception e) |
98 | { | 95 | { |
99 | m_log.Error(e.Message, e); | 96 | Console.WriteLine(e.ToString()); |
100 | return 0; | 97 | return 0; |
101 | } | 98 | } |
102 | } | 99 | } |
@@ -113,11 +110,11 @@ namespace OpenSim.Data.MySQL | |||
113 | return cmd.ExecuteReader(); | 110 | return cmd.ExecuteReader(); |
114 | } | 111 | } |
115 | 112 | ||
116 | protected void CloseDBConnection(IDataReader reader, MySqlCommand cmd) | 113 | protected void CloseReaderCommand(MySqlCommand cmd) |
117 | { | 114 | { |
118 | reader.Close(); | ||
119 | cmd.Connection.Close(); | 115 | cmd.Connection.Close(); |
120 | cmd.Connection.Dispose(); | 116 | cmd.Connection.Dispose(); |
117 | cmd.Dispose(); | ||
121 | } | 118 | } |
122 | } | 119 | } |
123 | } | 120 | } |