Rich Cox
2007-Sep-30 06:52 UTC
Rails AR/SQLServer Unit Test: [7692] failed (getting worse)
"rick" has kicked AR/SQLServer while it was down... http://dev.rubyonrails.org/changeset/7692 ------------------------------------------------------------------------ r7692 | rick | 2007-09-29 23:47:20 -0700 (Sat, 29 Sep 2007) | 1 line Make size for has_many :through use counter cache if it exists. Closes #9734 [xaviershay] ------------------------------------------------------------------------ U activerecord\test\associations\join_model_test.rb U activerecord\lib\active_record\associations\has_many_through_association.rb U activerecord\CHANGELOG Updated to revision 7692. 1) Error: test_load_schema(AAACreateTablesTest): ActiveRecord::StatementInvalid: ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:137:in `log'': DBI::DatabaseError: Execute OLE error code:80040E14 in Microsoft OLE DB Provider for SQL Server Column or parameter #1: Cannot find data type primary_key. HRESULT error code:0x80020009 Exception occurred.: CREATE TABLE taggings ([id] primary_key, [tag_id] integer DEFAULT NULL, [super_tag_id] integer DEFAULT NULL, [taggable_type] string DEFAULT NULL, [taggable_id] integer DEFAULT NULL) ./test/aaa_create_tables_test.rb:18:in `test_load_schema'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:303:in `execute_without_counting'' ./test/abstract_unit.rb:71:in `execute'' ./test/../lib/active_record/connection_adapters/abstract/schema_statements.rb:104:in `create_table'' ./test/../lib/active_record/migration.rb:278:in `send'' ./test/../lib/active_record/migration.rb:278:in `method_missing'' ./test/../lib/active_record/migration.rb:258:in `say_with_time'' c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'' ./test/../lib/active_record/migration.rb:258:in `say_with_time'' ./test/../lib/active_record/migration.rb:274:in `method_missing'' (eval):13:in `test_load_schema'' ./test/../lib/active_record/schema.rb:43:in `instance_eval'' ./test/../lib/active_record/schema.rb:43:in `define'' (eval):1:in `test_load_schema'' c:/ruby/lib/ruby/gems/1.8/gems/mocha-0.4.0/lib/mocha/test_case_adapter.rb:19:in `eval'' ./test/aaa_create_tables_test.rb:18:in `test_load_schema'' c:/ruby/lib/ruby/gems/1.8/gems/mocha-0.4.0/lib/mocha/test_case_adapter.rb:19:in `__send__'' c:/ruby/lib/ruby/gems/1.8/gems/mocha-0.4.0/lib/mocha/test_case_adapter.rb:19:in `run'' 2) Error: test_schema_define(ActiveRecordSchemaTest): ActiveRecord::StatementInvalid: DBI::DatabaseError: Execute OLE error code:80040E14 in Microsoft OLE DB Provider for SQL Server Column or parameter #1: Cannot find data type primary_key. HRESULT error code:0x80020009 Exception occurred.: CREATE TABLE fruits ([id] primary_key, [color] string DEFAULT NULL, [fruit_size] string DEFAULT NULL, [texture] string DEFAULT NULL, [flavor] string DEFAULT NULL) ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:137:in `log'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:303:in `execute_without_counting'' ./test/abstract_unit.rb:71:in `execute'' ./test/../lib/active_record/connection_adapters/abstract/schema_statements.rb:104:in `create_table'' ./test/../lib/active_record/migration.rb:278:in `send'' ./test/../lib/active_record/migration.rb:278:in `method_missing'' ./test/../lib/active_record/migration.rb:258:in `say_with_time'' c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'' ./test/../lib/active_record/migration.rb:258:in `say_with_time'' ./test/../lib/active_record/migration.rb:274:in `method_missing'' ./test/ar_schema_test.rb:19:in `test_schema_define'' ./test/../lib/active_record/schema.rb:43:in `instance_eval'' ./test/../lib/active_record/schema.rb:43:in `define'' ./test/ar_schema_test.rb:18:in `test_schema_define'' c:/ruby/lib/ruby/gems/1.8/gems/mocha-0.4.0/lib/mocha/test_case_adapter.rb:19:in `__send__'' c:/ruby/lib/ruby/gems/1.8/gems/mocha-0.4.0/lib/mocha/test_case_adapter.rb:19:in `run'' 3) Error: test_add_to_self_referential_has_many_through(AssociationsJoinModelTest): ActiveRecord::StatementInvalid: DBI::DatabaseError: Execute OLE error code:80040E37 in Microsoft OLE DB Provider for SQL Server Invalid object name ''taggings''. HRESULT error code:0x80020009 Exception occurred.: DELETE FROM taggings ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:137:in `log'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:298:in `execute_without_counting'' ./test/abstract_unit.rb:71:in `execute'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:308:in `delete'' ./test/../lib/active_record/fixtures.rb:321:in `delete_existing_fixtures'' ./test/../lib/active_record/fixtures.rb:291:in `create_fixtures'' ./test/../lib/active_record/fixtures.rb:291:in `each'' ./test/../lib/active_record/fixtures.rb:291:in `create_fixtures'' ./test/../lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction'' ./test/../lib/active_record/fixtures.rb:290:in `create_fixtures'' ./test/../lib/active_record/base.rb:952:in `silence'' ./test/../lib/active_record/fixtures.rb:281:in `create_fixtures'' ./test/../lib/active_record/fixtures.rb:646:in `load_fixtures'' ./test/../lib/active_record/fixtures.rb:598:in `setup'' c:/ruby/lib/ruby/gems/1.8/gems/mocha-0.4.0/lib/mocha/test_case_adapter.rb:18:in `run'' 4) Error: test_adding_junk_to_has_many_through_should_raise_type_mismatch(AssociationsJoinModelTest): ActiveRecord::StatementInvalid: DBI::DatabaseError: Execute OLE error code:80040E37 in Microsoft OLE DB Provider for SQL Server Invalid object name ''taggings''. HRESULT error code:0x80020009 Exception occurred.: DELETE FROM taggings ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:137:in `log'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:298:in `execute_without_counting'' ./test/abstract_unit.rb:71:in `execute'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:308:in `delete'' ./test/../lib/active_record/fixtures.rb:321:in `delete_existing_fixtures'' ./test/../lib/active_record/fixtures.rb:291:in `create_fixtures'' ./test/../lib/active_record/fixtures.rb:291:in `each'' ./test/../lib/active_record/fixtures.rb:291:in `create_fixtures'' ./test/../lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction'' ./test/../lib/active_record/fixtures.rb:290:in `create_fixtures'' ./test/../lib/active_record/base.rb:952:in `silence'' ./test/../lib/active_record/fixtures.rb:281:in `create_fixtures'' ./test/../lib/active_record/fixtures.rb:646:in `load_fixtures'' ./test/../lib/active_record/fixtures.rb:598:in `setup'' c:/ruby/lib/ruby/gems/1.8/gems/mocha-0.4.0/lib/mocha/test_case_adapter.rb:18:in `run'' 5) Error: test_adding_to_has_many_through_should_return_self(AssociationsJoinModelTest): ActiveRecord::StatementInvalid: DBI::DatabaseError: Execute OLE error code:80040E37 in Microsoft OLE DB Provider for SQL Server Invalid object name ''taggings''. HRESULT error code:0x80020009 Exception occurred.: DELETE FROM taggings ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:137:in `log'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:298:in `execute_without_counting'' ./test/abstract_unit.rb:71:in `execute'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:308:in `delete'' ./test/../lib/active_record/fixtures.rb:321:in `delete_existing_fixtures'' ./test/../lib/active_record/fixtures.rb:291:in `create_fixtures'' --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Lawrence Pit
2007-Sep-30 08:40 UTC
Re: Rails AR/SQLServer Unit Test: [7692] failed (getting worse)
With regards to SQL Server fixes, please have a look at the following: http://dev.rubyonrails.org/ticket/9638 http://dev.rubyonrails.org/ticket/9616 http://dev.rubyonrails.org/ticket/9558 http://dev.rubyonrails.org/ticket/9537 http://dev.rubyonrails.org/ticket/8103 (also fixes mySQL issue) adding this would help (me at least :) for testing purposes: http://dev.rubyonrails.org/ticket/9588 Quite a few tests on SQL Server are falling over because queries using SELECT DISTINCT and using ORDER BY on a column that is not part of the SELECT DISTINCT. Afaik there is no workaround for SQL Server to get similar output compared to say mySQL. I''ve described this in http://dev.rubyonrails.org/ticket/9639. Unfortunately I was too quick providing an initial patch as I found later that it breaks for other databases. I''ll have another look at it tomorrow. Regards, Lawrence PS. When is rails 2.0 planned to be released?> "rick" has kicked AR/SQLServer while it was down... > > http://dev.rubyonrails.org/changeset/7692 > ------------------------------------------------------------------------ > r7692 | rick | 2007-09-29 23:47:20 -0700 (Sat, 29 Sep 2007) | 1 line > > Make size for has_many :through use counter cache if it exists. Closes #9734 [xaviershay] > ------------------------------------------------------------------------ > > U activerecord\test\associations\join_model_test.rb > U activerecord\lib\active_record\associations\has_many_through_association.rb > U activerecord\CHANGELOG > Updated to revision 7692. > > 1) Error: > test_load_schema(AAACreateTablesTest): > ActiveRecord::StatementInvalid: ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:137:in `log'': DBI::DatabaseError: Execute > OLE error code:80040E14 in Microsoft OLE DB Provider for SQL Server > Column or parameter #1: Cannot find data type primary_key. > HRESULT error code:0x80020009 > Exception occurred.: CREATE TABLE taggings ([id] primary_key, [tag_id] integer DEFAULT NULL, [super_tag_id] integer DEFAULT NULL, [taggable_type] string DEFAULT NULL, [taggable_id] integer DEFAULT NULL) > ./test/aaa_create_tables_test.rb:18:in `test_load_schema'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:303:in `execute_without_counting'' > ./test/abstract_unit.rb:71:in `execute'' > ./test/../lib/active_record/connection_adapters/abstract/schema_statements.rb:104:in `create_table'' > ./test/../lib/active_record/migration.rb:278:in `send'' > ./test/../lib/active_record/migration.rb:278:in `method_missing'' > ./test/../lib/active_record/migration.rb:258:in `say_with_time'' > c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'' > ./test/../lib/active_record/migration.rb:258:in `say_with_time'' > ./test/../lib/active_record/migration.rb:274:in `method_missing'' > (eval):13:in `test_load_schema'' > ./test/../lib/active_record/schema.rb:43:in `instance_eval'' > ./test/../lib/active_record/schema.rb:43:in `define'' > (eval):1:in `test_load_schema'' > c:/ruby/lib/ruby/gems/1.8/gems/mocha-0.4.0/lib/mocha/test_case_adapter.rb:19:in `eval'' > ./test/aaa_create_tables_test.rb:18:in `test_load_schema'' > c:/ruby/lib/ruby/gems/1.8/gems/mocha-0.4.0/lib/mocha/test_case_adapter.rb:19:in `__send__'' > c:/ruby/lib/ruby/gems/1.8/gems/mocha-0.4.0/lib/mocha/test_case_adapter.rb:19:in `run'' > > 2) Error: > test_schema_define(ActiveRecordSchemaTest): > ActiveRecord::StatementInvalid: DBI::DatabaseError: Execute > OLE error code:80040E14 in Microsoft OLE DB Provider for SQL Server > Column or parameter #1: Cannot find data type primary_key. > HRESULT error code:0x80020009 > Exception occurred.: CREATE TABLE fruits ([id] primary_key, [color] string DEFAULT NULL, [fruit_size] string DEFAULT NULL, [texture] string DEFAULT NULL, [flavor] string DEFAULT NULL) > ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:137:in `log'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:303:in `execute_without_counting'' > ./test/abstract_unit.rb:71:in `execute'' > ./test/../lib/active_record/connection_adapters/abstract/schema_statements.rb:104:in `create_table'' > ./test/../lib/active_record/migration.rb:278:in `send'' > ./test/../lib/active_record/migration.rb:278:in `method_missing'' > ./test/../lib/active_record/migration.rb:258:in `say_with_time'' > c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'' > ./test/../lib/active_record/migration.rb:258:in `say_with_time'' > ./test/../lib/active_record/migration.rb:274:in `method_missing'' > ./test/ar_schema_test.rb:19:in `test_schema_define'' > ./test/../lib/active_record/schema.rb:43:in `instance_eval'' > ./test/../lib/active_record/schema.rb:43:in `define'' > ./test/ar_schema_test.rb:18:in `test_schema_define'' > c:/ruby/lib/ruby/gems/1.8/gems/mocha-0.4.0/lib/mocha/test_case_adapter.rb:19:in `__send__'' > c:/ruby/lib/ruby/gems/1.8/gems/mocha-0.4.0/lib/mocha/test_case_adapter.rb:19:in `run'' > > 3) Error: > test_add_to_self_referential_has_many_through(AssociationsJoinModelTest): > ActiveRecord::StatementInvalid: DBI::DatabaseError: Execute > OLE error code:80040E37 in Microsoft OLE DB Provider for SQL Server > Invalid object name ''taggings''. > HRESULT error code:0x80020009 > Exception occurred.: DELETE FROM taggings > ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:137:in `log'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:298:in `execute_without_counting'' > ./test/abstract_unit.rb:71:in `execute'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:308:in `delete'' > ./test/../lib/active_record/fixtures.rb:321:in `delete_existing_fixtures'' > ./test/../lib/active_record/fixtures.rb:291:in `create_fixtures'' > ./test/../lib/active_record/fixtures.rb:291:in `each'' > ./test/../lib/active_record/fixtures.rb:291:in `create_fixtures'' > ./test/../lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction'' > ./test/../lib/active_record/fixtures.rb:290:in `create_fixtures'' > ./test/../lib/active_record/base.rb:952:in `silence'' > ./test/../lib/active_record/fixtures.rb:281:in `create_fixtures'' > ./test/../lib/active_record/fixtures.rb:646:in `load_fixtures'' > ./test/../lib/active_record/fixtures.rb:598:in `setup'' > c:/ruby/lib/ruby/gems/1.8/gems/mocha-0.4.0/lib/mocha/test_case_adapter.rb:18:in `run'' > > 4) Error: > test_adding_junk_to_has_many_through_should_raise_type_mismatch(AssociationsJoinModelTest): > ActiveRecord::StatementInvalid: DBI::DatabaseError: Execute > OLE error code:80040E37 in Microsoft OLE DB Provider for SQL Server > Invalid object name ''taggings''. > HRESULT error code:0x80020009 > Exception occurred.: DELETE FROM taggings > ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:137:in `log'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:298:in `execute_without_counting'' > ./test/abstract_unit.rb:71:in `execute'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:308:in `delete'' > ./test/../lib/active_record/fixtures.rb:321:in `delete_existing_fixtures'' > ./test/../lib/active_record/fixtures.rb:291:in `create_fixtures'' > ./test/../lib/active_record/fixtures.rb:291:in `each'' > ./test/../lib/active_record/fixtures.rb:291:in `create_fixtures'' > ./test/../lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction'' > ./test/../lib/active_record/fixtures.rb:290:in `create_fixtures'' > ./test/../lib/active_record/base.rb:952:in `silence'' > ./test/../lib/active_record/fixtures.rb:281:in `create_fixtures'' > ./test/../lib/active_record/fixtures.rb:646:in `load_fixtures'' > ./test/../lib/active_record/fixtures.rb:598:in `setup'' > c:/ruby/lib/ruby/gems/1.8/gems/mocha-0.4.0/lib/mocha/test_case_adapter.rb:18:in `run'' > > 5) Error: > test_adding_to_has_many_through_should_return_self(AssociationsJoinModelTest): > ActiveRecord::StatementInvalid: DBI::DatabaseError: Execute > OLE error code:80040E37 in Microsoft OLE DB Provider for SQL Server > Invalid object name ''taggings''. > HRESULT error code:0x80020009 > Exception occurred.: DELETE FROM taggings > ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:137:in `log'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:298:in `execute_without_counting'' > ./test/abstract_unit.rb:71:in `execute'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:308:in `delete'' > ./test/../lib/active_record/fixtures.rb:321:in `delete_existing_fixtures'' > ./test/../lib/active_record/fixtures.rb:291:in `create_fixtures'' > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---