aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb b/server/sonar-web/src/main/webapp/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb
index 5d709c0d0c3..201fee6405e 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb
@@ -489,6 +489,12 @@ module ActiveRecord
begin
ddl_transaction do
migration.migrate(@direction)
+
+ #SONAR fix closed connections (mainly MySQL) when Java migration is long to be executed.
+ # Database can close the underlying connection if no activity for a while.
+ Base.connection.reconnect!
+ #/SONAR
+
record_version_state_after_migrating(migration.version)
end
rescue => e