Rich Cox
2007-Jan-28 18:00 UTC
Rails AR/SQLServer Unit Test: [6084] failed (but getting better)
"bitsweat" has given AR/SQLServer some love, but it''s still unhappy... http://dev.rubyonrails.org/changeset/6084 ------------------------------------------------------------------------ r6084 | bitsweat | 2007-01-28 10:51:21 -0700 (Sun, 28 Jan 2007) | 1 line SQLServer: don''t choke on strings containing ''null''. Closes #7083. ------------------------------------------------------------------------ U activerecord\test\base_test.rb U activerecord\lib\active_record\connection_adapters\sqlserver_adapter.rb U activerecord\CHANGELOG Updated to revision 6084. 1) Error: test_limited_eager_with_multiple_order_columns(EagerAssociationTest): ActiveRecord::StatementInvalid: DBI::DatabaseError: Execute OLE error code:80040E14 in Microsoft OLE DB Provider for SQL Server ORDER BY items must appear in the select list if SELECT DISTINCT is specified. HRESULT error code:0x80020009 Exception occurred.: SELECT * FROM (SELECT TOP 2 * FROM (SELECT DISTINCT TOP 3 posts.id FROM posts LEFT OUTER JOIN authors ON authors.id = posts.author_id LEFT OUTER JOIN comments ON comments.post_id = posts.id WHERE (authors.name = ''David'') ORDER BY UPPER(posts.title), posts.id) AS tmp1 ORDER BY title DESC, id DESC) AS tmp2 ORDER BY title, id ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:128:in `log'' ./test/../lib/active_record/connection_adapters/sqlserver_adapter.rb:318:in `execute'' ./test/../lib/active_record/connection_adapters/sqlserver_adapter.rb:507:in `select'' ./test/../lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all'' ./test/../lib/active_record/associations.rb:1255:in `select_limited_ids_list'' ./test/../lib/active_record/associations.rb:1247:in `add_limited_ids_condition!'' ./test/../lib/active_record/associations.rb:1235:in `construct_finder_sql_with_included_associations'' ./test/../lib/active_record/associations.rb:1223:in `select_all_rows'' ./test/../lib/active_record/associations.rb:1079:in `find_with_associations'' ./test/../lib/active_record/associations.rb:1077:in `catch'' ./test/../lib/active_record/associations.rb:1077:in `find_with_associations'' ./test/../lib/active_record/base.rb:1000:in `find_every'' ./test/../lib/active_record/base.rb:418:in `find'' ./test/associations/eager_test.rb:300:in `test_limited_eager_with_multiple_order_columns'' 2) Error: test_limited_eager_with_order(EagerAssociationTest): ActiveRecord::StatementInvalid: DBI::DatabaseError: Execute OLE error code:80040E14 in Microsoft OLE DB Provider for SQL Server ORDER BY items must appear in the select list if SELECT DISTINCT is specified. HRESULT error code:0x80020009 Exception occurred.: SELECT * FROM (SELECT TOP 2 * FROM (SELECT DISTINCT TOP 3 posts.id FROM posts LEFT OUTER JOIN authors ON authors.id = posts.author_id LEFT OUTER JOIN comments ON comments.post_id = posts.id WHERE (authors.name = ''David'') ORDER BY UPPER(posts.title)) AS tmp1 ORDER BY title DESC) AS tmp2 ORDER BY title ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:128:in `log'' ./test/../lib/active_record/connection_adapters/sqlserver_adapter.rb:318:in `execute'' ./test/../lib/active_record/connection_adapters/sqlserver_adapter.rb:507:in `select'' ./test/../lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all'' ./test/../lib/active_record/associations.rb:1255:in `select_limited_ids_list'' ./test/../lib/active_record/associations.rb:1247:in `add_limited_ids_condition!'' ./test/../lib/active_record/associations.rb:1235:in `construct_finder_sql_with_included_associations'' ./test/../lib/active_record/associations.rb:1223:in `select_all_rows'' ./test/../lib/active_record/associations.rb:1079:in `find_with_associations'' ./test/../lib/active_record/associations.rb:1077:in `catch'' ./test/../lib/active_record/associations.rb:1077:in `find_with_associations'' ./test/../lib/active_record/base.rb:1000:in `find_every'' ./test/../lib/active_record/base.rb:418:in `find'' ./test/associations/eager_test.rb:295:in `test_limited_eager_with_order'' 3) Error: test_additional_columns_from_join_table(HasAndBelongsToManyAssociationsTest): NoMethodError: undefined method `strftime'' for "2004/10/10 00:00:00":String ./test/abstract_unit.rb:30:in `assert_date_from_db'' ./test/associations_test.rb:1656:in `test_additional_columns_from_join_table'' 4) Error: test_habtm_adding_before_save_with_join_attributes(HasAndBelongsToManyAssociationsTest): NoMethodError: undefined method `strftime'' for "2007/01/28 00:00:00":String ./test/abstract_unit.rb:30:in `assert_date_from_db'' ./test/associations_test.rb:1518:in `test_habtm_adding_before_save_with_join_attributes'' ./test/../lib/active_record/associations/association_proxy.rb:127:in `each'' ./test/../lib/active_record/associations/association_proxy.rb:127:in `send'' ./test/../lib/active_record/associations/association_proxy.rb:127:in `method_missing'' ./test/../lib/active_record/associations/association_collection.rb:162:in `method_missing'' ./test/associations_test.rb:1518:in `test_habtm_adding_before_save_with_join_attributes'' 5) Error: test_select_limited_ids_list(HasAndBelongsToManyAssociationsTest): ActiveRecord::StatementInvalid: DBI::DatabaseError: Execute OLE error code:80040E14 in Microsoft OLE DB Provider for SQL Server ORDER BY items must appear in the select list if SELECT DISTINCT is specified. HRESULT error code:0x80020009 Exception occurred.: SELECT DISTINCT projects.id FROM projects LEFT OUTER JOIN developers_projects ON developers_projects.project_id = projects.id LEFT OUTER JOIN developers ON developers.id = developers_projects.developer_id ORDER BY developers.created_at ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:128:in `log'' ./test/../lib/active_record/connection_adapters/sqlserver_adapter.rb:318:in `execute'' ./test/../lib/active_record/connection_adapters/sqlserver_adapter.rb:507:in `select'' ./test/../lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all'' ./test/../lib/active_record/associations.rb:1255:in `select_limited_ids_list'' ./test/associations_test.rb:1855:in `send'' ./test/associations_test.rb:1855:in `test_select_limited_ids_list'' 6) Failure: test_not_resaved_when_unchanged(HasOneAssociationsTest) [./test/abstract_unit.rb:48:in `assert_queries'' ./test/associations_test.rb:397:in `test_not_resaved_when_unchanged'']: 2 instead of 1 queries were executed. <1> expected but was <2>. 7) Error: test_change_column_default(MigrationTest): NotImplementedError: change_column_default is not implemented ./test/../lib/active_record/connection_adapters/abstract/schema_statements.rb:150:in `change_column_default'' ./test/migration_test.rb:451:in `test_change_column_default'' 8) Error: test_change_column_default_to_null(MigrationTest): NotImplementedError: change_column_default is not implemented ./test/../lib/active_record/connection_adapters/abstract/schema_statements.rb:150:in `change_column_default'' ./test/migration_test.rb:457:in `test_change_column_default_to_null'' 9) Failure: test_native_decimal_insert_manual_vs_automatic(MigrationTest) [./test/migration_test.rb:229]: <#<BigDecimal:af898f0,''0.1234567890 1234567890 0123456789E20'',32(36)>> expected but was <#<BigDecimal:af7a8dc,''0.1234567890 1234567890 012345678E20'',32(36)>>. 10) Failure: test_native_types(MigrationTest) [./test/migration_test.rb:273]: <#<BigDecimal:af256fc,''0.1234567890 1234567890 0123456789E20'',32(36)>> expected but was <#<BigDecimal:af25684,''0.1234567890 1234567890 012345678E20'',32(36)>>. 11) Failure: test_no_dump_errors(SchemaDumperTest) [./test/schema_dumper_test.rb:48]: </\# Could not dump table/> expected to not match <"# This file is autogenerated. Instead of editing this file, please use the\n# migrations feature of ActiveRecord to incrementally modif --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Rich C
2007-Jan-28 21:20 UTC
Re: Rails AR/SQLServer Unit Test: [6084] failed (but getting better)
The patches attached to the tickets below: http://dev.rubyonrails.org/ticket/6777 http://dev.rubyonrails.org/ticket/7159 will fix these SQL Server errors... It would be nice to get them applied so we can show some progress on the SQL Server adapter :-> Thanks, Rich C.> > 3) Error: > test_additional_columns_from_join_table(HasAndBelongsToManyAssociationsTest ): > NoMethodError: undefined method `strftime'' for "2004/10/10 00:00:00":String > ./test/abstract_unit.rb:30:in `assert_date_from_db'' > ./test/associations_test.rb:1656:in `test_additional_columns_from_join_table'' > > 4) Error: > test_habtm_adding_before_save_with_join_attributes(HasAndBelongsToManyAssoc iationsTest): > NoMethodError: undefined method `strftime'' for "2007/01/28 00:00:00":String > ./test/abstract_unit.rb:30:in `assert_date_from_db'' > ./test/associations_test.rb:1518:in `test_habtm_adding_before_save_with_join_attributes'' > ./test/../lib/active_record/associations/association_proxy.rb:127:in `each'' > ./test/../lib/active_record/associations/association_proxy.rb:127:in `send'' > ./test/../lib/active_record/associations/association_proxy.rb:127:in `method_missing'' > ./test/../lib/active_record/associations/association_collection.rb:162:in `method_missing'' > ./test/associations_test.rb:1518:in `test_habtm_adding_before_save_with_join_attributes'' >> 11) Failure: > test_no_dump_errors(SchemaDumperTest) [./test/schema_dumper_test.rb:48]: > </\# Could not dump table/> expected to not match > <"# This file is autogenerated. Instead of editing this file, please use the\n# migrations feature of ActiveRecord to incrementally modif--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---