Merge pull request #6047 from nextcloud/fix-6017-select-indexed-columns

Use indexed column path_hash to find the parent
This commit is contained in:
Morris Jobke 2017-08-09 13:53:23 +02:00 committed by GitHub
commit e08768ee04
1 changed files with 2 additions and 2 deletions

View File

@ -92,11 +92,11 @@ class RepairInvalidPaths implements IRepairStep {
$this->getIdQuery = $builder->select('fileid')
->from('filecache')
->where($builder->expr()->eq('storage', $builder->createParameter('storage')))
->andWhere($builder->expr()->eq('path', $builder->createParameter('path')));
->andWhere($builder->expr()->eq('path_hash', $builder->createParameter('path_hash')));
}
$this->getIdQuery->setParameter('storage', $storage, IQueryBuilder::PARAM_INT);
$this->getIdQuery->setParameter('path', $path);
$this->getIdQuery->setParameter('path_hash', md5($path));
return $this->getIdQuery->execute()->fetchColumn();
}