Follow-up to #850852: fix notices that caused tests to fail.

From: Damien Tournoud <damien@commerceguys.com>


---
 database/sqlite/schema.inc |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git includes/database/sqlite/schema.inc includes/database/sqlite/schema.inc
index 3bc6f58..9d8e9d8 100644
--- includes/database/sqlite/schema.inc
+++ includes/database/sqlite/schema.inc
@@ -669,16 +669,13 @@ class DatabaseSchema_sqlite extends DatabaseSchema {
   }
 
   public function findTables($table_expression) {
-    // Don't use getPrefixInfo -- $table_expression includes the prefix.
-    list($prefix, $table) = explode('.', $table_expression);
-    if (empty($table)) {
-      $table = $prefix;
-      $prefix = NULL;
-    }
+    // Don't add the prefix, $table_expression already includes the prefix.
+    $info = $this->getPrefixInfo($table_expression, FALSE);
+
     // Can't use query placeholders because the query would have to be
     // :prefixsqlite_master, which does not work.
-    $result = db_query("SELECT name FROM " . ($prefix ? $prefix . '.' : '') . "sqlite_master WHERE name LIKE :table_name", array(
-      ':table_name' => $table,
+    $result = db_query("SELECT name FROM " . $info['schema'] . ".sqlite_master WHERE name LIKE :table_name", array(
+      ':table_name' => $info['table'],
     ));
     return $result->fetchAllKeyed(0, 0);
   }
