Index: includes/coder_sql.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/coder/includes/Attic/coder_sql.inc,v
retrieving revision 1.1.4.12.2.3
diff -u -7 -r1.1.4.12.2.3 coder_sql.inc
--- includes/coder_sql.inc	14 Aug 2009 00:18:30 -0000	1.1.4.12.2.3
+++ includes/coder_sql.inc	17 Feb 2010 06:56:22 -0000
@@ -8,14 +8,19 @@
 
 /**
  * Implementation of hook_reviews().
  */
 function coder_sql_reviews() {
   $table = '\{[A-Za-z_]+\}'; // table-regex
   $bad = '[A-Za-z_]+';
+  $information_schema = 'information_schema.[A-Za-z_]+';
+  $information_schema_bad = '\{'. $information_schema .'\}'; // exception to the table regex.
+  // updating $table and $bad to correctly handle information_schema
+  $table = '('. $information_schema .'|'. $table .')';
+  $bad = '((^'. $information_schema .')('. $bad .'))';
   $rules = array(
     // NOTE: this doesn't catch all non-upper case keywords, but is a good start
     array(
       '#type' => 'regex',
       '#value' => '^(select\s+.*\s+from\s+'. $table .'|insert\s+into\s+'. $table .'|update\s+'. $table .'\s+set|delete\s+from\s+'. $table .')',
       '#source' => 'quote',
       '#warning' => 'SQL keywords should be upper case',
@@ -27,14 +32,21 @@
       '#value' => '^(select\s+.*\s+from\s+'. $bad .'|insert\s+into\s+'. $bad .'|update\s+'. $bad .'\s+set|delete\s+from\s'. $bad .')',
       '#source' => 'quote',
       '#warning' => 'table names should be enclosed in {curly_brackets}',
       '#severity' => 'critical',
     ),
     array(
       '#type' => 'regex',
+      '#value' => '^(select\s+.*\s+from\s+'. $information_schema_bad .'|insert\s+into\s+'. $information_schema_bad .'|update\s+'. $information_schema_bad .'\s+set|delete\s+from\s'. $information_schema_bad .')',
+      '#source' => 'quote',
+      '#warning' => 'table names in information_schema should NOT be enclosed in {curly_brackets}',
+      '#severity' => 'critical',
+    ),
+    array(
+      '#type' => 'regex',
       '#value' => '^(select\s+.*\s+from\s+'. $table .'|insert\s+into\s+'. $table .'|update\s+'. $table .'\s+set|delete\s+from\s'. $table .')\s+.*[Ll][Ii][Mm][Ii][Tt]\s[0-9]+',
       '#source' => 'quote',
       '#warning_callback' => '_coder_sql_db_query_range_warning',
     ),
     array(
       '#type' => 'regex',
       '#value' => '^(select\s+.*\s+from\s+'. $table .'|update\s+'. $table .'\s+set|delete\s+from\s'. $table .')\s+.*!=',
