From c57215687f6ab0a9585c5331edc2da89a88b8a28 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 6 May 2017 21:43:22 +0100 Subject: a few more changes on mysql --- OpenSim/Data/MySQL/MySQLEstateData.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'OpenSim/Data/MySQL/MySQLEstateData.cs') diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs index 12593f6..eeedf02 100644 --- a/OpenSim/Data/MySQL/MySQLEstateData.cs +++ b/OpenSim/Data/MySQL/MySQLEstateData.cs @@ -82,6 +82,7 @@ namespace OpenSim.Data.MySQL Migration m = new Migration(dbcon, Assembly, "EstateStore"); m.Update(); + dbcon.Close(); Type t = typeof(EstateSettings); m_Fields = t.GetFields(BindingFlags.NonPublic | @@ -143,7 +144,6 @@ namespace OpenSim.Data.MySQL using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) { dbcon.Open(); - cmd.Connection = dbcon; bool found = false; @@ -171,13 +171,14 @@ namespace OpenSim.Data.MySQL } } } + dbcon.Close(); + cmd.Connection = null; + if (!found && create) { DoCreate(es); LinkRegion(regionID, (int)es.EstateID); } - cmd.Connection = null; - dbcon.Close(); } LoadBanList(es); -- cgit v1.1