diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-05-11 16:01:44 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-05-11 16:01:44 -0700 |
commit | 5c6cf4e59e3e9c75395541162f2741b82347af0a (patch) | |
tree | 322bb73eb0638494e12e33faa183d5e0dcca858f /activerecord/lib/active_record/explain_subscriber.rb | |
parent | e2804c62dfdd1946a11048196ea32aae17a7edd5 (diff) | |
parent | ddaa5d5181e8ed576c4a033062545b0d41a7da72 (diff) | |
download | rails-5c6cf4e59e3e9c75395541162f2741b82347af0a.tar.gz rails-5c6cf4e59e3e9c75395541162f2741b82347af0a.tar.bz2 rails-5c6cf4e59e3e9c75395541162f2741b82347af0a.zip |
Merge pull request #10571 from dasch/dasch/restore-explain-fix
Don't try to EXPLAIN select_db calls
Diffstat (limited to 'activerecord/lib/active_record/explain_subscriber.rb')
-rw-r--r-- | activerecord/lib/active_record/explain_subscriber.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/explain_subscriber.rb b/activerecord/lib/active_record/explain_subscriber.rb index 859c8edfc5..1d861a57db 100644 --- a/activerecord/lib/active_record/explain_subscriber.rb +++ b/activerecord/lib/active_record/explain_subscriber.rb @@ -15,7 +15,7 @@ module ActiveRecord # On the other hand, we want to monitor the performance of our real database # queries, not the performance of the access to the query cache. IGNORED_PAYLOADS = %w(SCHEMA EXPLAIN CACHE) - EXPLAINED_SQLS = /\A\s*(select|update|delete|insert)/i + EXPLAINED_SQLS = /\A\s*(select|update|delete|insert)\b/i def ignore_payload?(payload) payload[:exception] || IGNORED_PAYLOADS.include?(payload[:name]) || payload[:sql] !~ EXPLAINED_SQLS end |