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.cs14
1 files changed, 4 insertions, 10 deletions
diff --git a/OpenSim/Data/MySQL/MySQLFramework.cs b/OpenSim/Data/MySQL/MySQLFramework.cs
index 6c73249..c756c9c 100644
--- a/OpenSim/Data/MySQL/MySQLFramework.cs
+++ b/OpenSim/Data/MySQL/MySQLFramework.cs
@@ -40,6 +40,8 @@ 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 = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
44
43 protected MySqlConnection m_Connection; 45 protected MySqlConnection m_Connection;
44 46
45 protected MySqlFramework(string connectionString) 47 protected MySqlFramework(string connectionString)
@@ -70,12 +72,11 @@ namespace OpenSim.Data.MySQL
70 } 72 }
71 catch (MySqlException e) 73 catch (MySqlException e)
72 { 74 {
73Console.WriteLine(e.ToString()); 75 m_log.Error(e.Message, e);
74 if (errorSeen) 76 if (errorSeen)
75 throw; 77 throw;
76 78
77 // This is "Server has gone away" and "Server lost" 79 // This is "Server has gone away" and "Server lost"
78 //
79 if (e.Number == 2006 || e.Number == 2013) 80 if (e.Number == 2006 || e.Number == 2013)
80 { 81 {
81 errorSeen = true; 82 errorSeen = true;
@@ -94,7 +95,7 @@ Console.WriteLine(e.ToString());
94 } 95 }
95 catch (Exception e) 96 catch (Exception e)
96 { 97 {
97Console.WriteLine(e.ToString()); 98 m_log.Error(e.Message, e);
98 return 0; 99 return 0;
99 } 100 }
100 } 101 }
@@ -112,12 +113,5 @@ Console.WriteLine(e.ToString());
112 113
113 return cmd.ExecuteReader(); 114 return cmd.ExecuteReader();
114 } 115 }
115
116 protected void CloseReaderCommand(MySqlCommand cmd)
117 {
118 cmd.Connection.Close();
119 cmd.Connection.Dispose();
120 cmd.Dispose();
121 }
122 } 116 }
123} 117}