aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorDaniel Schierbeck <dasch@zendesk.com>2013-05-11 16:14:49 +0200
committerDaniel Schierbeck <dasch@zendesk.com>2013-05-12 00:33:01 +0200
commitddaa5d5181e8ed576c4a033062545b0d41a7da72 (patch)
tree428179a4a05151e77a8552abfa9707eedc0e41fb /activerecord/lib/active_record
parent0549ebea223beeb68c09ac9656579f02e893c0f7 (diff)
downloadrails-ddaa5d5181e8ed576c4a033062545b0d41a7da72.tar.gz
rails-ddaa5d5181e8ed576c4a033062545b0d41a7da72.tar.bz2
rails-ddaa5d5181e8ed576c4a033062545b0d41a7da72.zip
Don't try to EXPLAIN select_db calls
Now with a non-broken test.
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