Skip to content

Conversation

@yahonda
Copy link
Collaborator

@yahonda yahonda commented Sep 23, 2024

This commit implements build_explain_clause(options = []) that is no-op to remove the warning below because Oracle Database does not support something like explain analyze in MySQL.

$ bundle exec rspec spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb:356
==> Loading config from ENV or use default
==> Running specs with ruby version 3.3.5
/home/yahonda/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/bundler/gems/rails-cefd9e9942c5/activesupport/lib/active_support/logger_silence.rb:5: warning: logger was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add logger to your Gemfile or gemspec to silence this warning.
==> Effective ActiveRecord version 7.1.4
Run options: include {:locations=>{"./spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb"=>[356]}}
DEPRECATION WARNING: The current database adapter, OracleEnhanced, does not support explain options. To remove this warning, the adapter must implement `build_explain_clause(options = [])`. (called from block (3 levels) in <top (required)> at /home/yahonda/src/github.com/rsim/oracle-enhanced/spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb:356)
.

Finished in 0.50556 seconds (files took 0.54442 seconds to load)
1 example, 0 failures

$

Fix #2394
Refer to rails/rails#47043

This commit implements `build_explain_clause(options = [])` that is no-op to remove the warning below
because Oracle Database does not support something like `explain analyze` in MySQL.

```ruby
$ bundle exec rspec spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb:356
==> Loading config from ENV or use default
==> Running specs with ruby version 3.3.5
/home/yahonda/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/bundler/gems/rails-cefd9e9942c5/activesupport/lib/active_support/logger_silence.rb:5: warning: logger was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add logger to your Gemfile or gemspec to silence this warning.
==> Effective ActiveRecord version 7.1.4
Run options: include {:locations=>{"./spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb"=>[356]}}
DEPRECATION WARNING: The current database adapter, OracleEnhanced, does not support explain options. To remove this warning, the adapter must implement `build_explain_clause(options = [])`. (called from block (3 levels) in <top (required)> at /home/yahonda/src/github.com/rsim/oracle-enhanced/spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb:356)
.

Finished in 0.50556 seconds (files took 0.54442 seconds to load)
1 example, 0 failures

$
```

Fix rsim#2394
Refer to rails/rails#47043
@yahonda yahonda merged commit f6463d5 into rsim:master Sep 23, 2024
13 checks passed
yahonda added a commit to yahonda/oracle-enhanced that referenced this pull request Sep 23, 2024
Support `build_explain_clause(options = [])`
yahonda added a commit that referenced this pull request Sep 24, 2024
Merge pull request #2398 from yahonda/diag_2394
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support build_explain_clause(options = [])

1 participant