Index: simpletest.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/simpletest.module,v
retrieving revision 1.33.2.4.2.13
diff -u -p -r1.33.2.4.2.13 simpletest.module
--- simpletest.module	8 Feb 2009 21:03:18 -0000	1.33.2.4.2.13
+++ simpletest.module	12 Mar 2009 23:39:47 -0000
@@ -563,23 +563,17 @@ function simpletest_clean_database() {
  * @return mixed Array of matching tables or count of tables.
  */
 function simpletest_get_like_tables($base_table = 'simpletest', $count = FALSE) {
-  global $db_url, $db_prefix;
-  $url = parse_url($db_url);
-  $database = substr($url['path'], 1);
-  $select = $count ? 'COUNT(table_name)' : 'table_name';
-  $result = db_query("SELECT $select FROM information_schema.tables WHERE table_schema = '$database' AND table_name LIKE '$db_prefix$base_table%'");
+  global $db_prefix;
+  $result = db_query("SHOW TABLES LIKE '$db_prefix$base_table%'");
   $schema = drupal_get_schema_unprocessed('simpletest');
 
-  if ($count) {
-    return db_result($result);
-  }
   $tables = array();
   while ($table = db_result($result)) {
     if (!isset($schema[$table])) {
       $tables[] = $table;
     }
   }
-  return $tables;
+  return ($count) ? count($tables) : $tables;
 }
 
 /**
