aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLFramework.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLFramework.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLFramework.cs13
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); 72Console.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); 96Console.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}