Index: simpletest.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/simpletest.module,v
retrieving revision 1.33.2.4.2.15
diff -u -r1.33.2.4.2.15 simpletest.module
--- simpletest.module	23 Mar 2009 03:36:21 -0000	1.33.2.4.2.15
+++ simpletest.module	23 Mar 2009 03:43:39 -0000
@@ -563,8 +563,10 @@
  * @return mixed Array of matching tables or count of tables.
  */
 function simpletest_get_like_tables($base_table = 'simpletest', $count = FALSE) {
-  global $db_prefix;
-  $result = db_query("SHOW TABLES LIKE '$db_prefix$base_table%'");
+  global $db_url, $db_prefix;
+  $url = parse_url(is_array($db_url) ? $db_url['default'] : $db_url);
+  $database = substr($url['path'], 1);
+  $result = db_query("SELECT table_name FROM information_schema.tables WHERE table_schema = '$database' AND table_name LIKE '$db_prefix$base_table%'");
   $schema = drupal_get_schema_unprocessed('simpletest');
 
   $tables = array();
