Commit aa46bb2d authored by Dries's avatar Dries
Browse files

- Patch #897650 by Garrett Albright, Damien Tournoud:...

- Patch #897650 by Garrett Albright, Damien Tournoud: DatabaseSchema_sqlite()::findTables() shouldn't find indexes.
parent 74b78a54
......@@ -672,9 +672,10 @@ public function findTables($table_expression) {
// 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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment