Index: includes/database.mysqli.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database.mysqli.inc,v
retrieving revision 1.32
diff -u -r1.32 database.mysqli.inc
--- includes/database.mysqli.inc	27 Dec 2006 22:50:09 -0000	1.32
+++ includes/database.mysqli.inc	6 Jan 2007 15:43:45 -0000
@@ -398,7 +398,7 @@
  * Check if a table exists.
  */
 function db_table_exists($table) {
-  return db_num_rows(db_query("SHOW TABLES LIKE '{" . db_escape_table($table) . "}'"));
+  return (empty($table)) ? 0 : db_num_rows(db_query("SHOW TABLES LIKE '{" . db_escape_table($table) . "}'"));
 }
 
 /**
Index: includes/database.mysql.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database.mysql.inc,v
retrieving revision 1.66
diff -u -r1.66 database.mysql.inc
--- includes/database.mysql.inc	27 Dec 2006 22:50:09 -0000	1.66
+++ includes/database.mysql.inc	6 Jan 2007 15:43:37 -0000
@@ -413,7 +413,7 @@
  * Check if a table exists.
  */
 function db_table_exists($table) {
-  return db_num_rows(db_query("SHOW TABLES LIKE '{" . db_escape_table($table) . "}'"));
+  return (empty($table)) ? 0 : db_num_rows(db_query("SHOW TABLES LIKE '{" . db_escape_table($table) . "}'"));
 }
 
 /**
