diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-11-15 11:29:12 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-11-15 11:29:12 -0800 |
commit | 314e2cc05b6cad93b6e8a3414b2c0106174239be (patch) | |
tree | ddcfbe280bfad2407cd3dfc5e9774fc30031e5fb /activerecord/lib/active_record | |
parent | 8c66623627277df9dcc3c6215d369d2c50775cc1 (diff) | |
parent | 2b0406cedb61c4c2f74ecca61fc07771e911fd35 (diff) | |
download | rails-314e2cc05b6cad93b6e8a3414b2c0106174239be.tar.gz rails-314e2cc05b6cad93b6e8a3414b2c0106174239be.tar.bz2 rails-314e2cc05b6cad93b6e8a3414b2c0106174239be.zip |
Merge pull request #12779 from dougbarth/dont_swallow_exceptions_during_transactional_statements_in_mysql
Don't swallow exceptions in transctional statements
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb | 8 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/mysql_adapter.rb | 2 |
2 files changed, 0 insertions, 10 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb index ee6ca4fb6f..dcbc3466b2 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb @@ -320,27 +320,19 @@ module ActiveRecord def begin_db_transaction execute "BEGIN" - rescue - # Transactions aren't supported end def begin_isolated_db_transaction(isolation) execute "SET TRANSACTION ISOLATION LEVEL #{transaction_isolation_levels.fetch(isolation)}" begin_db_transaction - rescue - # Transactions aren't supported end def commit_db_transaction #:nodoc: execute "COMMIT" - rescue - # Transactions aren't supported end def rollback_db_transaction #:nodoc: execute "ROLLBACK" - rescue - # Transactions aren't supported end # In the simple case, MySQL allows us to place JOINs directly into the UPDATE diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb index 7b18b95c44..c4dcba0501 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb @@ -462,8 +462,6 @@ module ActiveRecord def begin_db_transaction #:nodoc: exec_query "BEGIN" - rescue Mysql::Error - # Transactions aren't supported end private |