Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return row-count for pluck #1171

Merged
merged 2 commits into from
May 14, 2024
Merged

Return row-count for pluck #1171

merged 2 commits into from
May 14, 2024

Conversation

aidanharan
Copy link
Contributor

Fix:

https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/actions/runs/9061194112/job/24892482330

25) Error:
ActiveRecord::InstrumentationTest#test_payload_row_count_on_pluck:
ActiveRecord::RecordNotUnique: TinyTds::Error: Cannot insert duplicate key row in object 'dbo.books' with unique index 'index_books_on_author_id_and_name'. The duplicate key value is (<NULL>, row count book 2).
    /activerecord-sqlserver-adapter/lib/active_record/connection_adapters/sqlserver/database_statements.rb:433:in `each'
    /activerecord-sqlserver-adapter/lib/active_record/connection_adapters/sqlserver/database_statements.rb:433:in `handle_to_names_and_values'
    /activerecord-sqlserver-adapter/lib/active_record/connection_adapters/sqlserver/database_statements.rb:60:in `internal_exec_sql_query'
    /activerecord-sqlserver-adapter/lib/active_record/connection_adapters/sqlserver/database_statements.rb:48:in `block (2 levels) in internal_exec_query'
    /usr/local/bundle/bundler/gems/rails-dae4867b3350/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:997:in `block in with_raw_connection'
    /usr/local/bundle/bundler/gems/rails-dae4867b3350/activesupport/lib/active_support/c

@aidanharan aidanharan changed the title Remove index for test Return row-count for pluck May 14, 2024
@aidanharan aidanharan marked this pull request as ready for review May 14, 2024 19:13
@aidanharan aidanharan merged commit ae733fd into main May 14, 2024
2 of 8 checks passed
@aidanharan aidanharan deleted the coerce-test-instrumentation branch May 14, 2024 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant