Skip to content

Commit

Permalink
We rely on these exceptions being tossed in TorqueBox when a database…
Browse files Browse the repository at this point in the history
… doesn't support transactions. Eating them causes us problems. One could argue that it might lead to surprising results if errors occur in the callbacks around a save. Since InnoDB supports transactions, and it's the default engine starting with MySQL 5.5, I propose we toss exceptions when tx's aren't supported.
  • Loading branch information
jcrossley3 committed Sep 27, 2011
1 parent 6377c53 commit 81d9c2c
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions lib/arjdbc/mysql/adapter.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -138,24 +138,6 @@ def quoted_false
"0" "0"
end end


def begin_db_transaction #:nodoc:
@connection.begin
rescue Exception
# Transactions aren't supported
end

def commit_db_transaction #:nodoc:
@connection.commit
rescue Exception
# Transactions aren't supported
end

def rollback_db_transaction #:nodoc:
@connection.rollback
rescue Exception
# Transactions aren't supported
end

def supports_savepoints? #:nodoc: def supports_savepoints? #:nodoc:
true true
end end
Expand Down

0 comments on commit 81d9c2c

Please sign in to comment.