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, 7 insertions, 7 deletions
diff --git a/OpenSim/Data/MySQL/MySQLFramework.cs b/OpenSim/Data/MySQL/MySQLFramework.cs
index c756c9c..f37e9bc 100644
--- a/OpenSim/Data/MySQL/MySQLFramework.cs
+++ b/OpenSim/Data/MySQL/MySQLFramework.cs
@@ -47,7 +47,6 @@ namespace OpenSim.Data.MySQL
47 protected MySqlFramework(string connectionString) 47 protected MySqlFramework(string connectionString)
48 { 48 {
49 m_Connection = new MySqlConnection(connectionString); 49 m_Connection = new MySqlConnection(connectionString);
50
51 m_Connection.Open(); 50 m_Connection.Open();
52 } 51 }
53 52
@@ -82,8 +81,7 @@ namespace OpenSim.Data.MySQL
82 errorSeen = true; 81 errorSeen = true;
83 82
84 m_Connection.Close(); 83 m_Connection.Close();
85 MySqlConnection newConnection = (MySqlConnection) 84 MySqlConnection newConnection = (MySqlConnection)((ICloneable)m_Connection).Clone();
86 ((ICloneable)m_Connection).Clone();
87 m_Connection.Dispose(); 85 m_Connection.Dispose();
88 m_Connection = newConnection; 86 m_Connection = newConnection;
89 m_Connection.Open(); 87 m_Connection.Open();
@@ -104,14 +102,16 @@ namespace OpenSim.Data.MySQL
104 102
105 protected IDataReader ExecuteReader(MySqlCommand cmd) 103 protected IDataReader ExecuteReader(MySqlCommand cmd)
106 { 104 {
107 MySqlConnection newConnection = (MySqlConnection) 105 MySqlConnection newConnection = (MySqlConnection)((ICloneable)m_Connection).Clone();
108 ((ICloneable)m_Connection).Clone();
109
110 newConnection.Open(); 106 newConnection.Open();
111 107
112 cmd.Connection = newConnection; 108 cmd.Connection = newConnection;
113
114 return cmd.ExecuteReader(); 109 return cmd.ExecuteReader();
115 } 110 }
111
112 protected void CloseDBConnection(MySqlCommand cmd)
113 {
114 cmd.Connection.Dispose();
115 }
116 } 116 }
117} 117}