Index: includes/install.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/install.inc,v
retrieving revision 1.136
diff -u -p -r1.136 install.inc
--- includes/install.inc	21 Jun 2010 02:27:47 -0000	1.136
+++ includes/install.inc	17 Jul 2010 21:29:57 -0000
@@ -221,12 +221,15 @@ function drupal_detect_baseurl($file = '
 }
 
 /**
- * Detect all supported databases that are compiled into PHP.
+ * Detect all supported database drivers that are compiled into PHP.
  *
+ * @param $installable
+ *   Boolean to indicate whether only the drivers that support installing Drupal
+ *   will be returned.
  * @return
  *  An array of database types compiled into PHP.
  */
-function drupal_detect_database_types() {
+function drupal_detect_database_types($installable = TRUE) {
   $databases = array();
 
   // We define a driver as a directory in /includes/database that in turn
@@ -236,15 +239,30 @@ function drupal_detect_database_types() 
   // file for the driver explicitly.
   require_once DRUPAL_ROOT . '/includes/database/database.inc';
   spl_autoload_register('db_autoload');
+
+  if ($installable) {
+    $file_to_check = '/install.inc';
+  }
+  else {
+    $file_to_check = '/database.inc';
+  }
+
   foreach (file_scan_directory(DRUPAL_ROOT . '/includes/database', '/^[a-z]*$/i', array('recurse' => FALSE)) as $file) {
-    $drivers[$file->filename] = $file->uri;
+    if (file_exists($file->uri . $file_to_check)) {
+      $drivers[$file->filename] = $file->uri;
+    }
   }
 
   foreach ($drivers as $driver => $file) {
-    $class = 'DatabaseTasks_' . $driver;
-    $installer = new $class();
-    if ($installer->installable()) {
-      $databases[$driver] = $installer->name();
+    if ($installable) {
+      $class = 'DatabaseTasks_' . $driver;
+      $installer = new $class();
+      if ($installer->installable()) {
+        $databases[$driver] = $installer->name();
+      }
+    }
+    else if (in_array($driver, PDO::getAvailableDrivers())) {
+      $databases[$driver] = $driver;
     }
   }
 
Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.490
diff -u -p -r1.490 system.install
--- modules/system/system.install	14 Jul 2010 20:30:09 -0000	1.490
+++ modules/system/system.install	17 Jul 2010 21:29:58 -0000
@@ -149,7 +149,7 @@ function system_requirements($phase) {
   // Test for at least one suitable PDO extension, if PDO is available.
   $database_ok = extension_loaded('pdo');
   if ($database_ok) {
-    $drivers = drupal_detect_database_types();
+    $drivers = drupal_detect_database_types($phase == 'install');
     $database_ok = !empty($drivers);
   }
 
