Index: includes/database/database.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/database.inc,v
retrieving revision 1.71
diff -u -r1.71 database.inc
--- includes/database/database.inc	10 Aug 2009 21:00:31 -0000	1.71
+++ includes/database/database.inc	21 Aug 2009 05:22:31 -0000
@@ -1817,7 +1817,6 @@
     $args = func_get_args();
     array_shift($args);
   }
-  list($query, $args, $options) = _db_query_process_args($query, $args, $options);
 
   return Database::getConnection($options['target'])->query($query, $args, $options);
 }
@@ -1851,7 +1850,6 @@
     $count = array_pop($args);
     $from = array_pop($args);
   }
-  list($query, $args, $options) = _db_query_process_args($query, $args, $options);
 
   return Database::getConnection($options['target'])->queryRange($query, $args, $from, $count, $options);
 }
@@ -1879,7 +1877,6 @@
     $args = func_get_args();
     array_shift($args);
   }
-  list($query, $args, $options) = _db_query_process_args($query, $args, $options);
 
   return Database::getConnection($options['target'])->queryTemporary($query, $args, $options);
 }
@@ -2505,52 +2502,6 @@
 }
 
 /**
- * Backward-compatibility utility.
- *
- * This function should be removed after all queries have been converted
- * to the new API. It is temporary only.
- *
- * @todo Remove this once the query conversion is complete.
- */
-function _db_query_process_args($query, $args, $options) {
-
-  if (!is_array($options)) {
-    $options = array();
-  }
-  if (empty($options['target'])) {
-    $options['target'] = 'default';
-  }
-
-  // Temporary backward-compatibility hacks. Remove later.
-  $old_query = $query;
-  $query = str_replace(array('%n', '%d', '%f', '%b', "'%s'", '%s'), '?', $old_query);
-  if ($old_query !== $query) {
-    $args = array_values($args);  // The old system allowed named arrays, but PDO doesn't if you use ?.
-  }
-
-  // A large number of queries pass FALSE or empty-string for
-  // int/float fields because the previous version of db_query()
-  // casted them to int/float, resulting in 0. MySQL PDO happily
-  // accepts these values as zero but PostgreSQL PDO does not, and I
-  // do not feel like tracking down and fixing every such query at
-  // this time.
-  if (preg_match_all('/%([dsfb])/', $old_query, $m) > 0) {
-    foreach ($m[1] as $idx => $char) {
-      switch ($char) {
-        case 'd':
-          $args[$idx] = (int) $args[$idx];
-          break;
-        case 'f':
-          $args[$idx] = (float) $args[$idx];
-          break;
-      }
-    }
-  }
-
-  return array($query, $args, $options);
-}
-
-/**
  * Helper function for db_rewrite_sql.
  *
  * Collects JOIN and WHERE statements via hook_db_rewrite_sql()
