aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/explain_subscriber.rb
diff options
context:
space:
mode:
authorDaniel Schierbeck <dasch@zendesk.com>2013-05-10 16:21:59 +0200
committerDaniel Schierbeck <dasch@zendesk.com>2013-05-10 16:21:59 +0200
commit1cc63e94dbe52a9cf01a71c1dc45ee18443f97dc (patch)
treeb0180866fbdf5a6b302cf1e869f6b65f8a4ac6de /activerecord/lib/active_record/explain_subscriber.rb
parent04d27153fcefaea380fce63e4c9d6e65b27d78b2 (diff)
downloadrails-1cc63e94dbe52a9cf01a71c1dc45ee18443f97dc.tar.gz
rails-1cc63e94dbe52a9cf01a71c1dc45ee18443f97dc.tar.bz2
rails-1cc63e94dbe52a9cf01a71c1dc45ee18443f97dc.zip
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.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 a3bc56d600..6a49936644 100644
--- a/activerecord/lib/active_record/explain_subscriber.rb
+++ b/activerecord/lib/active_record/explain_subscriber.rb
@@ -19,7 +19,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