Michael Schoen
2006-Jul-06 17:33 UTC
Rails AR/Oracle Unit Test: [4571] failed (but getting better)
"bitsweat" has given AR/Oracle some love, but it''s still unhappy... http://dev.rubyonrails.org/changeset/4571 ------------------------------------------------------------------------ r4571 | bitsweat | 2006-07-06 10:30:54 -0700 (Thu, 06 Jul 2006) | 1 line Rename test file so it runs for MySQL only. ------------------------------------------------------------------------ D activerecord/test/active_schema_mysql_test.rb A activerecord/test/active_schema_test_mysql.rb Updated to revision 4571. 1) Error: test_join_with_group(HasAndBelongsToManyAssociationsTest): ActiveRecord::StatementInvalid: OCIError: ORA-00979: not a GROUP BY expression: SELECT developers.id AS t0_r0, developers.name AS t0_r1, developers.salary AS t0_r2, developers.created_at AS t0_r3, developers.updated_at AS t0_r4, projects.id AS t1_r0, projects.name AS t1_r1, projects.type AS t1_r2, developers_projects_2.id AS t2_r0, developers_projects_2.name AS t2_r1, developers_projects_2.salary AS t2_r2, developers_projects_2.created_at AS t2_r3, developers_projects_2.updated_at AS t2_r4 FROM developers LEFT OUTER JOIN developers_projects ON developers_projects.developer_id = developers.id LEFT OUTER JOIN projects ON projects.id = developers_projects.project_id LEFT OUTER JOIN developers_projects developers_projects_join ON developers_projects_join.project_id = projects.id LEFT OUTER JOIN developers developers_projects_2 ON developers_projects_2.id = developers_projects_join.develo per_id WHERE (developers_projects_join.joined_on IS NOT NULL) GROUP BY developers.name ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:120:in `log'' ./test/../lib/active_record/connection_adapters/oracle_adapter.rb:277:in `execute'' ./test/../lib/active_record/connection_adapters/oracle_adapter.rb:477:in `select'' ./test/../lib/active_record/connection_adapters/oracle_adapter.rb:268:in `select_all'' ./test/../lib/active_record/associations.rb:1135:in `select_all_rows'' ./test/../lib/active_record/associations.rb:998:in `find_with_associations'' ./test/../lib/active_record/associations.rb:996:in `find_with_associations'' ./test/../lib/active_record/base.rb:955:in `find_every'' ./test/../lib/active_record/base.rb:413:in `find'' ./test/associations_test.rb:1624:in `test_join_with_group'' 2) Failure: test_sane_find_with_lock(PessimisticLockingTest) [./test/locking_test.rb:90]: Exception raised: Class: <ActiveRecord::StatementInvalid> Message: <"OCIError: ORA-02014: cannot select FOR UPDATE from view with DISTINCT, GROUP BY, etc.: select * from (select raw_sql_.*, rownum raw_rnum_ from (SELECT * FROM people WHERE (people.id = 1) ) raw_sql_ where rownum <= 1) where raw_rnum_ > 0 FOR UPDATE"> ---Backtrace--- ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:120:in `log'' ./test/../lib/active_record/connection_adapters/oracle_adapter.rb:277:in `execute'' ./test/../lib/active_record/connection_adapters/oracle_adapter.rb:477:in `select'' ./test/../lib/active_record/connection_adapters/oracle_adapter.rb:268:in `select_all'' ./test/../lib/active_record/base.rb:422:in `find_by_sql'' ./test/../lib/active_record/base.rb:956:in `find_every'' ./test/../lib/active_record/base.rb:950:in `find_initial'' ./test/../lib/active_record/base.rb:984:in `find_one'' ./test/../lib/active_record/base.rb:973:in `find_from_ids'' ./test/../lib/active_record/base.rb:414:in `find'' ./test/locking_test.rb:93:in `test_sane_find_with_lock'' ./test/../lib/active_record/base.rb:905:in `with_scope'' ./test/locking_test.rb:92:in `test_sane_find_with_lock'' ./test/../lib/active_record/connection_adapters/abstract/database_statements.rb:51:in `transaction'' ./test/../lib/active_record/transactions.rb:86:in `transaction'' ./test/locking_test.rb:91:in `test_sane_find_with_lock'' ./test/locking_test.rb:90:in `test_sane_find_with_lock'' --------------- 3) Failure: test_sane_lock_method(PessimisticLockingTest) [./test/locking_test.rb:101]: Exception raised: Class: <ActiveRecord::StatementInvalid> Message: <"OCIError: ORA-02014: cannot select FOR UPDATE from view with DISTINCT, GROUP BY, etc.: select * from (select raw_sql_.*, rownum raw_rnum_ from (SELECT * FROM people WHERE (people.id = 1) ) raw_sql_ where rownum <= 1) where raw_rnum_ > 0 FOR UPDATE"> ---Backtrace--- ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:120:in `log'' ./test/../lib/active_record/connection_adapters/oracle_adapter.rb:277:in `execute'' ./test/../lib/active_record/connection_adapters/oracle_adapter.rb:477:in `select'' ./test/../lib/active_record/connection_adapters/oracle_adapter.rb:268:in `select_all'' ./test/../lib/active_record/base.rb:422:in `find_by_sql'' ./test/../lib/active_record/base.rb:956:in `find_every'' ./test/../lib/active_record/base.rb:950:in `find_initial'' ./test/../lib/active_record/base.rb:984:in `find_one'' ./test/../lib/active_record/base.rb:973:in `find_from_ids'' ./test/../lib/active_record/base.rb:414:in `find'' ./test/../lib/active_record/base.rb:1561:in `reload'' ./test/../lib/active_record/locking/pessimistic.rb:72:in `lock!'' ./test/locking_test.rb:105:in `test_sane_lock_method'' ./test/../lib/active_record/connection_adapters/abstract/database_statements.rb:51:in `transaction'' ./test/../lib/active_record/transactions.rb:86:in `transaction'' ./test/locking_test.rb:102:in `test_sane_lock_method'' ./test/locking_test.rb:101:in `test_sane_lock_method'' --------------- 905 tests, 3178 assertions, 2 failures, 1 errors rake aborted! Command faile