From ebcc9874d4d285ab2b45d62cc4fe89e9830111b7 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 22 Apr 2010 17:45:03 +0100 Subject: Insert a ROLLBACK command on migration step failure. This ensures that updating the Migrations table will not occur in a partial transaction, which would be auto-rolled-back later. --- OpenSim/Data/Migration.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Data/Migration.cs b/OpenSim/Data/Migration.cs index 4622e23..68e25ef 100644 --- a/OpenSim/Data/Migration.cs +++ b/OpenSim/Data/Migration.cs @@ -146,6 +146,8 @@ namespace OpenSim.Data { m_log.DebugFormat("[MIGRATIONS] Cmd was {0}", cmd.CommandText); m_log.DebugFormat("[MIGRATIONS]: An error has occurred in the migration {0}.\n This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Continuing.", e.Message); + cmd.CommandText = "ROLLBACK;"; + cmd.ExecuteNonQuery(); } if (version == 0) -- cgit v1.1