Activerecord rake test_mysql


#1

Hi
I posted this on rails-core (hoping that was more development
oriented), but got no responses, so I figured I’d try here.

I’d like to submit a patch and am following the steps on this page:
http://dev.rubyonrails.org/

Here’s what I did (using mysql 5.0.15-nt):

created 2 databases:
activerecord_unittest
activerecord_unittest2

created 1 user: rails (giving all priveleges to both databases)

ran $RAILS_HOME/activerecord\test\fixtures\db_definitions\mysql.sql on
activerecord_unittest
ran $RAILS_HOME/activerecord\test\fixtures\db_definitions\mysql2.sql
on activerecord_unittest2

modified
$RAILS_HOME/activerecord\test\connections\native_mysql/connect.rb
accordingly

I removed all my local changes, so I’m running with a pristine copy of
the current trunk.
cd $RAILS_HOME/activerecord
rake test_mysql

below I posted the output I received. Is this correct or should all
tests pass? I am assuming I’ve got something screwed up? Anyone have
any idea?
Thanks,
Ben

(in
C:/ruby/projects/rails/projects/myWardrobe/vendor/rails/activerecord)
Using native MySQL
Loaded suite
c:/ruby/ruby-1.8.2-15/ruby/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader
Started
…EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE…EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE…F…F…EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE…EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE…EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE…E…E…E…F…EEE…EEEEEEE…FF…F…
Finished in 77.0 seconds.

  1. Error:
    test_adding_macro_callbacks(AssociationCallbacksTest):
    ActiveRecord::StatementInvalid: Mysql::Error: #HY000Field ‘type’
    doesn’t have a default value: INSERT INTO projects (name, id)
    VALUES (‘Active Record’, 1)
    ./test/…/lib/active_record/connection_adapters/abstract_adapter.rb:78:in
    log' ./test/../lib/active_record/connection_adapters/mysql_adapter.rb:181:inexecute’
    ./test/…/lib/active_record/fixtures.rb:284:in insert_fixtures' ./test/../lib/active_record/fixtures.rb:283:ineach’
    ./test/…/lib/active_record/fixtures.rb:283:in insert_fixtures' ./test/../lib/active_record/fixtures.rb:253:increate_fixtures’
    ./test/…/lib/active_record/fixtures.rb:253:in each' ./test/../lib/active_record/fixtures.rb:253:increate_fixtures’
    ./test/…/lib/active_record/fixtures.rb:251:in transaction' ./test/../lib/active_record/fixtures.rb:251:increate_fixtures’
    ./test/…/lib/active_record/fixtures.rb:244:in silence' ./test/../lib/active_record/fixtures.rb:244:increate_fixtures’
    ./test/…/lib/active_record/fixtures.rb:539:in load_fixtures' ./test/../lib/active_record/fixtures.rb:487:insetup_with_fixtures’
    ./test/…/lib/active_record/fixtures.rb:521:in setup' ./test/../lib/active_record/fixtures.rb:520:insetup’

  2. Error:
    test_adding_with_proc_callbacks(AssociationCallbacksTest):
    ActiveRecord::StatementInvalid: Mysql::Error: #HY000Field ‘type’
    doesn’t have a default value: INSERT INTO projects (name, id)
    VALUES (‘Active Record’, 1)
    ./test/…/lib/active_record/connection_adapters/abstract_adapter.rb:78:in
    log' ./test/../lib/active_record/connection_adapters/mysql_adapter.rb:181:inexecute’
    ./test/…/lib/active_record/fixtures.rb:284:in insert_fixtures' ./test/../lib/active_record/fixtures.rb:283:ineach’
    ./test/…/lib/active_record/fixtures.rb:283:in insert_fixtures' ./test/../lib/active_record/fixtures.rb:253:increate_fixtures’
    ./test/…/lib/active_record/fixtures.rb:253:in each' ./test/../lib/active_record/fixtures.rb:253:increate_fixtures’
    ./test/…/lib/active_record/fixtures.rb:251:in transaction' ./test/../lib/active_record/fixtures.rb:251:increate_fixtures’
    ./test/…/lib/active_record/fixtures.rb:244:in silence' ./test/../lib/active_record/fixtures.rb:244:increate_fixtures’
    ./test/…/lib/active_record/fixtures.rb:539:in load_fixtures' ./test/../lib/active_record/fixtures.rb:487:insetup_with_fixtures’
    ./test/…/lib/active_record/fixtures.rb:521:in setup' ./test/../lib/active_record/fixtures.rb:520:insetup’

  3. Error:
    test_dont_add_if_before_callback_raises_exception(AssociationCallbacksTest):
    ActiveRecord::StatementInvalid: Mysql::Error: #HY000Field ‘type’
    doesn’t have a default value: INSERT INTO projects (name, id)
    VALUES (‘Active Record’, 1)
    ./test/…/lib/active_record/connection_adapters/abstract_adapter.rb:78:in
    log' ./test/../lib/active_record/connection_adapters/mysql_adapter.rb:181:inexecute’
    ./test/…/lib/active_record/fixtures.rb:284:in insert_fixtures' ./test/../lib/active_record/fixtures.rb:283:ineach’
    ./test/…/lib/active_record/fixtures.rb:283:in insert_fixtures' ./test/../lib/active_record/fixtures.rb:253:increate_fixtures’
    ./test/…/lib/active_record/fixtures.rb:253:in each' ./test/../lib/active_record/fixtures.rb:253:increate_fixtures’
    ./test/…/lib/active_record/fixtures.rb:251:in transaction' ./test/../lib/active_record/fixtures.rb:251:increate_fixtures’
    ./test/…/lib/active_record/fixtures.rb:244:in silence' ./test/../lib/active_record/fixtures.rb:244:increate_fixtures’
    ./test/…/lib/active_record/fixtures.rb:539:in load_fixtures' ./test/../lib/active_record/fixtures.rb:487:insetup_with_fixtures’
    ./test/…/lib/active_record/fixtures.rb:521:in setup' ./test/../lib/active_record/fixtures.rb:520:insetup’

  4. Error:
    test_has_and_belongs_to_many_add_callback(AssociationCallbacksTest):
    ActiveRecord::StatementInvalid: Mysql::Error: #HY000Field ‘type’
    doesn’t have a default value: INSERT INTO projects (name, id)
    VALUES (‘Active Record’, 1)
    ./test/…/lib/active_record/connection_adapters/abstract_adapter.rb:78:in
    log' ./test/../lib/active_record/connection_adapters/mysql_adapter.rb:181:inexecute’
    ./test/…/lib/active_record/fixtures.rb:284:in insert_fixtures' ./test/../lib/active_record/fixtures.rb:283:ineach’
    ./test/…/lib/active_record/fixtures.rb:283:in insert_fixtures' ./test/../lib/active_record/fixtures.rb:253:increate_fixtures’
    ./test/…/lib/active_record/fixtures.rb:253:in each' ./test/../lib/active_record/fixtures.rb:253:increate_fixtures’
    ./test/…/lib/active_record/fixtures.rb:251:in transaction' ./test/../lib/active_record/fixtures.rb:251:increate_fixtures’
    ./test/…/lib/active_record/fixtures.rb:244:in silence' ./test/../lib/active_record/fixtures.rb:244:increate_fixtures’
    ./test/…/lib/active_record/fixtures.rb:539:in load_fixtures' ./test/../lib/active_record/fixtures.rb:487:insetup_with_fixtures’
    ./test/…/lib/active_record/fixtures.rb:521:in setup' ./test/../lib/active_record/fixtures.rb:520:insetup’


bunch of smiliar stuff in the middle

  1. Error:
    test_readonly_scoping(ReadOnlyTest):
    ActiveRecord::StatementInvalid: Mysql::Error: #HY000Field ‘type’
    doesn’t have a default value: INSERT INTO projects (name, id)
    VALUES (‘Active Record’, 1)
    ./test/…/lib/active_record/connection_adapters/abstract_adapter.rb:78:in
    log' ./test/../lib/active_record/connection_adapters/mysql_adapter.rb:181:inexecute’
    ./test/…/lib/active_record/fixtures.rb:284:in insert_fixtures' ./test/../lib/active_record/fixtures.rb:283:ineach’
    ./test/…/lib/active_record/fixtures.rb:283:in insert_fixtures' ./test/../lib/active_record/fixtures.rb:253:increate_fixtures’
    ./test/…/lib/active_record/fixtures.rb:253:in each' ./test/../lib/active_record/fixtures.rb:253:increate_fixtures’
    ./test/…/lib/active_record/fixtures.rb:251:in transaction' ./test/../lib/active_record/fixtures.rb:251:increate_fixtures’
    ./test/…/lib/active_record/fixtures.rb:244:in silence' ./test/../lib/active_record/fixtures.rb:244:increate_fixtures’
    ./test/…/lib/active_record/fixtures.rb:539:in load_fixtures' ./test/../lib/active_record/fixtures.rb:487:insetup’

  2. Failure:
    test_callback_rollback_in_save(TransactionTest)
    [./test/transactions_test.rb:119]:
    is not true.

  3. Failure:
    test_failing_on_exception(TransactionTest)
    [./test/transactions_test.rb:87]:
    First shouldn’t have been approved.
    is not true.

  4. Failure:
    test_successful_with_return(TransactionTest)
    [./test/transactions_test.rb:49]:
    is not true.

659 tests, 1142 assertions, 6 failures, 323 errors
rake aborted!
Command failed with status (1): [c:/ruby/ruby-1.8.2-15/ruby/bin/ruby
-Ilib;…]