Closed adamonduty closed 12 years ago
This test should definitely pass. It's not safe to use it unless all tests pass. We must investigate this issue together.
On my installation of mysql 5.1.61 with default configuration all tests pass.
So firstly I'd like to investigate whether it is the gem's fault or perhaps just your configuration. Could you please test whether raising ActiveRecord::Rollback actually rolls back the transaction without the gem? I.e. you can check it manually on the console. See the failing test for the idea.
You're spot on! I checked and ActiveRecord::Rollback had no effect. It turns out that my InnoDB engine wasn't loaded. After a recent upgrade, mysql couldn't load the InnoDB engine and I had to delete ib_logfile0 and ib_logfile1. Once I did this, InnoDB came up and the tests passed.
It might make sense to explicitly check for InnoDB and other engines where raising ActiveRecord::Rollback would result in more than a no-op.
Thanks for the help and the library!
My pleasure.
Hi! Its great to see someone finally taking a serious stab at this problem. Its plagued our application for months.
When running the unit tests on mysql, I noticed that test_does_not_break_transaction_rollback is failing. Here's the output using ea36ecd:
Could you speak to the impact of this test not passing? As I recall, some features like ActiveRecord validations rely on ActiveRecord::Rollback.