ArgumentError: wrong number of arguments (1 for 0) after 51676652a3568ad09b06385564de4fdcb13af05e merged to 3-2-stable #8322

Closed
yahonda opened this Issue Nov 26, 2012 · 3 comments

Projects

None yet

3 participants

Contributor
yahonda commented Nov 26, 2012

Commit 5167665 at 3-2-stable branch introduces ArgumentError: wrong number of arguments (1 for 0)

$ git checkout 3-2-stable
$ for i in sqlite3 mysql mysql2 postgresql; do echo $i; ARCONN=$i ruby -Itest test/cases/bind_parameter_test.rb -n test_binds_are_logged; done
sqlite3
Using sqlite3 with Identity Map off
Run options: -n test_binds_are_logged

# Running tests:

E

Finished tests in 0.098976s, 10.1034 tests/s, 0.0000 assertions/s.

  1) Error:
test_binds_are_logged(ActiveRecord::BindParameterTest):
ArgumentError: wrong number of arguments (1 for 0)
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:269:in `insert_fixture'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:502:in `block (5 levels) in create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:501:in `each'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:501:in `block (4 levels) in create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:500:in `each'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:500:in `block (3 levels) in create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:492:in `each'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:492:in `block (2 levels) in create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:491:in `block in create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:168:in `disable_referential_integrity'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:476:in `create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:895:in `load_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:849:in `setup_fixtures'
    /home/yahonda/git/rails/activesupport/lib/active_support/callbacks.rb:407:in `_run__4515227419365149131__setup__2227804621340325033__callbacks'
    /home/yahonda/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
    /home/yahonda/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_setup_callbacks'
    /home/yahonda/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
    /home/yahonda/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:35:in `run'

1 tests, 0 assertions, 0 failures, 1 errors, 0 skips
mysql
Using mysql with Identity Map off
Run options: -n test_binds_are_logged

# Running tests:

E

Finished tests in 0.109103s, 9.1657 tests/s, 0.0000 assertions/s.

  1) Error:
test_binds_are_logged(ActiveRecord::BindParameterTest):
ArgumentError: wrong number of arguments (1 for 0)
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:269:in `insert_fixture'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:502:in `block (5 levels) in create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:501:in `each'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:501:in `block (4 levels) in create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:500:in `each'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:500:in `block (3 levels) in create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:492:in `each'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:492:in `block (2 levels) in create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:491:in `block in create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:232:in `disable_referential_integrity'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:476:in `create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:895:in `load_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:849:in `setup_fixtures'
    /home/yahonda/git/rails/activesupport/lib/active_support/callbacks.rb:407:in `_run__501914904522867406__setup__1883179870148242045__callbacks'
    /home/yahonda/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
    /home/yahonda/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_setup_callbacks'
    /home/yahonda/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
    /home/yahonda/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:35:in `run'

1 tests, 0 assertions, 0 failures, 1 errors, 0 skips
mysql2
Using mysql2 with Identity Map off
Run options: -n test_binds_are_logged

# Running tests:

E

Finished tests in 0.115938s, 8.6253 tests/s, 0.0000 assertions/s.

  1) Error:
test_binds_are_logged(ActiveRecord::BindParameterTest):
ArgumentError: wrong number of arguments (1 for 0)
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:269:in `insert_fixture'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:502:in `block (5 levels) in create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:501:in `each'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:501:in `block (4 levels) in create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:500:in `each'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:500:in `block (3 levels) in create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:492:in `each'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:492:in `block (2 levels) in create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:491:in `block in create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:232:in `disable_referential_integrity'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:476:in `create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:895:in `load_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:849:in `setup_fixtures'
    /home/yahonda/git/rails/activesupport/lib/active_support/callbacks.rb:407:in `_run__388947774065290089__setup__4464694297783063733__callbacks'
    /home/yahonda/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
    /home/yahonda/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_setup_callbacks'
    /home/yahonda/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
    /home/yahonda/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:35:in `run'

1 tests, 0 assertions, 0 failures, 1 errors, 0 skips
postgresql
Using postgresql with Identity Map off
Run options: -n test_binds_are_logged

# Running tests:

E

Finished tests in 0.147741s, 6.7686 tests/s, 0.0000 assertions/s.

  1) Error:
test_binds_are_logged(ActiveRecord::BindParameterTest):
ArgumentError: wrong number of arguments (1 for 0)
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:269:in `insert_fixture'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:502:in `block (5 levels) in create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:501:in `each'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:501:in `block (4 levels) in create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:500:in `each'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:500:in `block (3 levels) in create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:492:in `each'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:492:in `block (2 levels) in create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:491:in `block in create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:525:in `disable_referential_integrity'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:476:in `create_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:895:in `load_fixtures'
    /home/yahonda/git/rails/activerecord/lib/active_record/fixtures.rb:849:in `setup_fixtures'
    /home/yahonda/git/rails/activesupport/lib/active_support/callbacks.rb:407:in `_run__117433807347760199__setup__2398785654749014769__callbacks'
    /home/yahonda/git/rails/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
    /home/yahonda/git/rails/activesupport/lib/active_support/callbacks.rb:385:in `_run_setup_callbacks'
    /home/yahonda/git/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
    /home/yahonda/git/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:35:in `run'

1 tests, 0 assertions, 0 failures, 1 errors, 0 skips
$
@tenderlove tenderlove added a commit that referenced this issue Nov 26, 2012
@tenderlove @carlosantoniodasilva tenderlove + carlosantoniodasilva schema cache already has the columns as a hash, so use that
Commits

  978ec98 and
  5167665

changed database statements to use the schema_cache methods, added on
master in

  c99e34e and
  dc973e7

But apparently the methods weren't added to schema_cache, resulting in
the failure described in #8322 for 3-2-stable.

Fixes #8322.

Conflicts:
	activerecord/lib/active_record/connection_adapters/schema_cache.rb
941f019

@yahonda can you check it now? It is passing for me with the last cherry-pick. Thanks for reporting! :)

Contributor
yahonda commented Nov 26, 2012

Verified with current 3-2-stable branch. Thanks!

Great ❤️

On Mon, Nov 26, 2012 at 6:13 PM, Yasuo Honda notifications@github.comwrote:

Verified with current 3-2-stable branch. Thanks!


Reply to this email directly or view it on GitHubhttps://github.com/rails/rails/issues/8322#issuecomment-10731725.

At.
Carlos Antonio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment