Skip to content

Commit

Permalink
ds: ability to disable the MYSQL and RAILS query caches during profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
dsboulder committed May 9, 2008
1 parent 5ab0dd7 commit f6b53e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/query_reviewer/mysql_adapter_extensions.rb
Expand Up @@ -41,7 +41,7 @@ def delete_with_review(sql, *args)
end

def select_with_review(sql, *args)
sql.gsub!(/^SELECT /i, "SELECT SQL_NO_CACHE ")
sql.gsub!(/^SELECT /i, "SELECT SQL_NO_CACHE ") if QueryReviewer::CONFIGURATION["disable_sql_cache"]
@logger.silence { execute("SET PROFILING=1") } if QueryReviewer::CONFIGURATION["profiling"]
t1 = Time.now
query_results = select_without_review(sql, *args)
Expand Down
1 change: 1 addition & 0 deletions query_reviewer_defaults.yml
Expand Up @@ -6,6 +6,7 @@ all:
profiling: enabled
production_data: true
max_safe_key_length: 100
disable_sql_cache: true

warn_severity: 3
critical_severity: 7
Expand Down

0 comments on commit f6b53e0

Please sign in to comment.