diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-12-02 15:52:36 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-12-02 15:52:36 +0100 |
commit | b85022a92061e8f320ea605309fa99107351d506 (patch) | |
tree | 263c51e890412647f9cb491bb7d7de67eb1af3fb /server | |
parent | a92fbd733456d69b385324fab85e7ad541d3038a (diff) | |
download | sonarqube-b85022a92061e8f320ea605309fa99107351d506.tar.gz sonarqube-b85022a92061e8f320ea605309fa99107351d506.zip |
Fix problem of MySQL closed connections between Ruby and Java migrations
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-web/src/main/webapp/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb | 6 |
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 |