Permalink
Browse files

Ignore Postgresql "SELECT tablename FROM pg_tables" when counting que…

…ries
  • Loading branch information...
1 parent 24a9bc4 commit 9ea80288f69eb775f095d74a644bdc432984cc85 @amatsuda amatsuda committed Aug 20, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/test/cases/test_case.rb
View
2 activerecord/test/cases/test_case.rb
@@ -94,7 +94,7 @@ def clear_log; self.log = []; self.log_all = []; end
# 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, /^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]
+ postgresql_ignored = [/^\s*select\b.*\bfrom\b.*pg_namespace\b/im, /^\s*select tablename\b.*from pg_tables\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]
[oracle_ignored, mysql_ignored, postgresql_ignored, sqlite3_ignored].each do |db_ignored_sql|

0 comments on commit 9ea8028

Please sign in to comment.