diff --git a/config/initializers/db_preferences.rb b/config/initializers/db_preferences.rb index 265b0d552..26aeccf0a 100644 --- a/config/initializers/db_preferences.rb +++ b/config/initializers/db_preferences.rb @@ -10,7 +10,7 @@ when 'mysql2' # Because of missing ticket updates in high load environments # we changed the transaction isolation level equally to postgres # to READ COMMITTED which fixed the problem entirely #3877 - ActiveRecord::ConnectionAdapters::Mysql2Adapter.set_callback :checkout, :before do |conn| + ActiveRecord::ConnectionAdapters::Mysql2Adapter.set_callback :checkout, :after do |conn| conn.execute('SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED') end when 'postgresql'