Permalink
Browse files

Ignore MySQL "SHOW VARIABLES" when counting queries

  • Loading branch information...
1 parent 6c51cc8 commit c8ede235374e948f2922250b2c322b6bc70a2449 @amatsuda amatsuda committed Aug 14, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/test/cases/test_case.rb
@@ -93,7 +93,7 @@ def clear_log; self.log = []; self.log_all = []; end
# ignored SQL, or better yet, use a different notification for the queries
# instead examining the SQL content.
oracle_ignored = [/^select .*nextval/i, /^SAVEPOINT/, /^ROLLBACK TO/, /^\s*select .* from all_triggers/im, /^\s*select .* from all_constraints/im, /^\s*select .* from all_tab_cols/im]
- mysql_ignored = [/^SHOW TABLES/i, /^SHOW FULL FIELDS/, /^SHOW CREATE TABLE /i]
+ mysql_ignored = [/^SHOW TABLES/i, /^SHOW FULL FIELDS/, /^SHOW CREATE TABLE /i, /^SHOW VARIABLES /]
postgresql_ignored = [/^\s*select\b.*\bfrom\b.*pg_namespace\b/im, /^\s*select\b.*\battname\b.*\bfrom\b.*\bpg_attribute\b/im, /^SHOW search_path/i]
sqlite3_ignored = [/^\s*SELECT name\b.*\bFROM sqlite_master/im]

0 comments on commit c8ede23

Please sign in to comment.