aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-05-11 16:01:44 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-05-11 16:01:44 -0700
commit5c6cf4e59e3e9c75395541162f2741b82347af0a (patch)
tree322bb73eb0638494e12e33faa183d5e0dcca858f /activerecord/lib/active_record
parente2804c62dfdd1946a11048196ea32aae17a7edd5 (diff)
parentddaa5d5181e8ed576c4a033062545b0d41a7da72 (diff)
downloadrails-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')
-rw-r--r--activerecord/lib/active_record/explain_subscriber.rb2
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