Revert "Don't try to EXPLAIN select_db calls"

Reason: This was backported, but the test does not pass as is.

This reverts commit a33d320cf4.
This commit is contained in:
Xavier Noria
2013-05-11 01:28:06 +02:00
parent 0be27b709b
commit 0549ebea22
2 changed files with 1 additions and 8 deletions

View File

@@ -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)\b/i
EXPLAINED_SQLS = /\A\s*(select|update|delete|insert)/i
def ignore_payload?(payload)
payload[:exception] || IGNORED_PAYLOADS.include?(payload[:name]) || payload[:sql] !~ EXPLAINED_SQLS
end