From e1b5c612472b9d1acf47383c0bf75b555daff2e6 Mon Sep 17 00:00:00 2001 From: Master ScienceSim Date: Thu, 4 Feb 2010 13:19:30 -0800 Subject: Updated MySQL connection management to use the MySQL connection pooling. This should accommodate various timeout problems that exist with the current connection pool code in a more general and standard way. --- OpenSim/Data/MySQL/MySQLLogData.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'OpenSim/Data/MySQL/MySQLLogData.cs') diff --git a/OpenSim/Data/MySQL/MySQLLogData.cs b/OpenSim/Data/MySQL/MySQLLogData.cs index 8f67eeb..304883c 100644 --- a/OpenSim/Data/MySQL/MySQLLogData.cs +++ b/OpenSim/Data/MySQL/MySQLLogData.cs @@ -79,14 +79,19 @@ namespace OpenSim.Data.MySQL // This actually does the roll forward assembly stuff Assembly assem = GetType().Assembly; - Migration m = new Migration(database.Connection, assem, "LogStore"); - // TODO: After rev 6000, remove this. People should have - // been rolled onto the new migration code by then. - TestTables(m); + using (MySql.Data.MySqlClient.MySqlConnection dbcon = new MySql.Data.MySqlClient.MySqlConnection(connect)) + { + dbcon.Open(); + + Migration m = new Migration(dbcon, assem, "LogStore"); - m.Update(); + // TODO: After rev 6000, remove this. People should have + // been rolled onto the new migration code by then. + TestTables(m); + m.Update(); + } } /// @@ -128,7 +133,6 @@ namespace OpenSim.Data.MySQL } catch { - database.Reconnect(); } } -- cgit v1.1