Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RELEASE SAVEPOINT active_record_1' at line 1: RELEASE SAVEPOINT active_record_1
a rails ticket concerning this error which was marked invalid: https://rails.lighthouseapp.com/projects/8994/tickets/1925-mysqlerror-savepoint-active_record_1-does-not-exist-rollback-to-savepoint-active_record_1 another rails doc concerning issue: http://github.com/lifo/docrails/commit/0e6b9695aff6500ad48c4dd9ab61343d7090b030 Good grief! Apparently any nested transaction (ex. a create statement inside a test) will fail if you're using MySQL. still fighting it. If you create an ActiveRecord object in one 'it' block, it's still there in the next block ?!? The only workaround I've found for the MySQL's unsupported nested transactions is the following: User.transaction do user1 = User.create(:name => "Alice") User.transaction(:requires_new => true) do user2 = User.create(:name => "Bob") end end This is actually emulated using save points because most databases do not support nested transactions. Some databases (SQLite) don’t support either save points or nested transactions, so in that case this works just like Rails 2.2 where the inner transaction(s) have no effect and if there are any exceptions the entire transaction is rolled back. PLUGIN SOLUTIONS that DON'T fix spec issues: http://svn.viney.net.nz/things/rails/plugins/savepoints/ http://github.com/spint/savepoints/tree/master (github version with added support for oracle) HELP, RSPEC COMMUNITY!!!
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users