diff options
author | Dries Buytaert <dries@buytaert.net> | 2011-09-11 17:09:40 -0400 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2011-09-11 17:09:40 -0400 |
commit | a2e549e35c4fa798a6b386fc4d3e2841b450fcf6 (patch) | |
tree | f6da784d338176fdbaef3adc5adadc70b2e2ec69 /includes/database/sqlite | |
parent | aa78d4987d461a98b42b78fcef9eefdddd7512a8 (diff) | |
download | brdo-a2e549e35c4fa798a6b386fc4d3e2841b450fcf6.tar.gz brdo-a2e549e35c4fa798a6b386fc4d3e2841b450fcf6.tar.bz2 |
- Patch #897650 by Garrett Albright, Damien Tournoud: DatabaseSchema_sqlite()::findTables() shouldn't find indexes.
Diffstat (limited to 'includes/database/sqlite')
-rw-r--r-- | includes/database/sqlite/schema.inc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/includes/database/sqlite/schema.inc b/includes/database/sqlite/schema.inc index 3c8cd3f55..c5882f127 100644 --- a/includes/database/sqlite/schema.inc +++ b/includes/database/sqlite/schema.inc @@ -672,9 +672,10 @@ class DatabaseSchema_sqlite extends DatabaseSchema { // 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 " . $info['schema'] . ".sqlite_master WHERE name LIKE :table_name", array( + // Can't use query placeholders for the schema because the query would have + // to be :prefixsqlite_master, which does not work. + $result = db_query("SELECT name FROM " . $info['schema'] . ".sqlite_master WHERE type = :type AND name LIKE :table_name", array( + ':type' => 'table', ':table_name' => $info['table'], )); return $result->fetchAllKeyed(0, 0); |